[geeklog-cvs] geeklog: "old_pid" hidden input field was missing from the polls...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Jan 7 03:53:27 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/6e9a1e838996
changeset: 6660:6e9a1e838996
user:      Dirk Haun <dirk at haun-online.de>
date:      Tue Jan 06 13:32:02 2009 +0100
description:
"old_pid" hidden input field was missing from the polls editor template file

diffstat:

3 files changed, 13 insertions(+), 4 deletions(-)
plugins/polls/templates/admin/polleditor.thtml |    7 ++++++-
public_html/admin/plugins/polls/index.php      |    7 ++++---
public_html/docs/theme.html                    |    3 +++

diffs (59 lines):

diff -r 68a8051fe997 -r 6e9a1e838996 plugins/polls/templates/admin/polleditor.thtml
--- a/plugins/polls/templates/admin/polleditor.thtml	Tue Jan 06 13:10:56 2009 +0100
+++ b/plugins/polls/templates/admin/polleditor.thtml	Tue Jan 06 13:32:02 2009 +0100
@@ -42,5 +42,10 @@
                                     <p>{lang_permissionskey}</p>
                                     <div>{permissions_editor}</div>
                                     <p>{lang_permissions_msg}</p>
-                                    <p><input type="submit" name="mode" value="{lang_save}"{xhtml}><input type="submit" name="mode" value="{lang_cancel}"{xhtml}>{delete_option}<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}></p>
+                                    <p>
+                                    <input type="submit" name="mode" value="{lang_save}"{xhtml}>
+                                    <input type="submit" name="mode" value="{lang_cancel}"{xhtml}>{delete_option}
+                                    <input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}>
+                                    <input type="hidden" value="{poll_id}" name="old_pid"{xhtml}>
+                                    </p>
                                 </form>
diff -r 68a8051fe997 -r 6e9a1e838996 public_html/admin/plugins/polls/index.php
--- a/public_html/admin/plugins/polls/index.php	Tue Jan 06 13:10:56 2009 +0100
+++ b/public_html/admin/plugins/polls/index.php	Tue Jan 06 13:32:02 2009 +0100
@@ -8,7 +8,7 @@
 // |                                                                           |
 // | Geeklog poll administration page                                          |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors:                         |
+// | Copyright (C) 2000-2009 by the following authors:                         |
 // |                                                                           |
 // | Authors: Tony Bibbs        - tony AT tonybibbs DOT com                    |
 // |          Mark Limburg      - mlimburg AT users DOT sourceforge DOT net    |
@@ -31,8 +31,6 @@
 // | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
 // |                                                                           |
 // +---------------------------------------------------------------------------+
-//
-// $Id: index.php,v 1.59 2008/06/10 17:26:50 dhaun Exp $
 
 // Set this to true if you want to log debug messages to error.log
 $_POLL_VERBOSE = false;
@@ -559,6 +557,9 @@
     if (empty($pid) && !empty($old_pid)) {
         $pid = $old_pid;
     }
+    if (empty($old_pid) && (! empty($pid))) {
+        $old_pid = $pid;
+    }
     if (!empty($pid)) {
         $statuscode = 0;
         if (isset ($_POST['statuscode'])) {
diff -r 68a8051fe997 -r 6e9a1e838996 public_html/docs/theme.html
--- a/public_html/docs/theme.html	Tue Jan 06 13:10:56 2009 +0100
+++ b/public_html/docs/theme.html	Tue Jan 06 13:32:02 2009 +0100
@@ -217,6 +217,9 @@
 <li>The <code>{site_admin_url}</code> was missing from the Configuration form
     action in <tt>admin/config/configuration.thtml</tt>. This may have caused
     problems making configuration changes on some setups.</li>
+<li>Added a hidden <code>old_pid</code> input field to the polls editor template
+    file, <tt>plugins/polls/templates/admin/polleditor.thtml</tt>, to fix
+    problems when changing a poll's ID.</li>
 </ul>
 
 <h3>Other changes</h3>



More information about the geeklog-cvs mailing list