[geeklog-devel] [geeklog-cvs] geeklog: Make sure we have {xhtml}, {site_url}, {site_admin_url}...

Rob Howard - KWFS rob.howard at kwfs.info
Wed Jan 27 17:58:48 EST 2010


Hi All,

I have updated the coding in plugins/polls/functions.inc and I now get this
error when accessing my site 

Fatal error: Cannot redeclare plugin_getmenuitems_links() (previously
declared in /home/www/kwfs.info/V2/plugins/links/functions.inc:87) in
/home/www/kwfs.info/V2/plugins/polls/functions.inc on line 85

-----Original Message-----
From: geeklog-cvs-bounces at lists.geeklog.net
[mailto:geeklog-cvs-bounces at lists.geeklog.net] On Behalf Of
geeklog-cvs at lists.geeklog.net
Sent: 10 January 2010 11:22
To: geeklog-cvs at lists.geeklog.net
Subject: [geeklog-cvs] geeklog: Make sure we have {xhtml}, {site_url},
{site_admin_url}...

changeset 7596:a411f5d356bb
url:
http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/a411f5d356bb
user: Dirk Haun <dirk at haun-online.de>
date: Sun Jan 10 11:17:57 2010 +0100
description:
Make sure we have {xhtml}, {site_url}, {site_admin_url}, and {layout_url}
defined (and in that order) in all templates

diffstat:

 plugins/calendar/functions.inc                  |  28 ++++----
 plugins/links/functions.inc                     |   5 +-
 plugins/polls/functions.inc                     |   4 +-
 plugins/staticpages/functions.inc               |  14 ++--
 plugins/staticpages/services.inc.php            |   7 +-
 public_html/admin/block.php                     |   2 +-
 public_html/admin/group.php                     |   8 +-
 public_html/admin/mail.php                      |   4 +-
 public_html/admin/moderation.php                |   4 +-
 public_html/admin/plugins/staticpages/index.php |  11 ++-
 public_html/admin/story.php                     |  13 ++--
 public_html/admin/trackback.php                 |  19 +++--
 public_html/admin/user.php                      |   3 +
 public_html/article.php                         |   6 +-
 public_html/directory.php                       |   1 +
 public_html/links/index.php                     |  11 ++-
 public_html/polls/index.php                     |   6 +-
 public_html/profiles.php                        |  18 +++--
 public_html/users.php                           |  11 ++-
 public_html/usersettings.php                    |  17 +++--
 system/classes/config.class.php                 |   6 +-
 system/classes/listfactory.class.php            |   1 +
 system/classes/search.class.php                 |  30 +++++-----
 system/lib-admin.php                            |  12 ++--
 system/lib-comment.php                          |  76
+++++++++++++-----------
 system/lib-story.php                            |   2 +-
 system/lib-trackback.php                        |   8 +-
 system/lib-user.php                             |  10 ++-
 28 files changed, 188 insertions(+), 149 deletions(-)

diffs (truncated from 991 to 300 lines):

diff -r 160e2ce741e6 -r a411f5d356bb plugins/calendar/functions.inc
--- a/plugins/calendar/functions.inc	Sun Jan 10 09:43:37 2010 +0100
+++ b/plugins/calendar/functions.inc	Sun Jan 10 11:17:57 2010 +0100
@@ -722,6 +722,10 @@
     $retval .= COM_startBlock ($LANG_CAL_1[26], 'submitevent.html');
     $eventform = new Template ($_CONF['path'] .
'plugins/calendar/templates/');
     $eventform->set_file ('eventform', 'submitevent.thtml');
+    $eventform->set_var ('xhtml', XHTML);
+    $eventform->set_var ('site_url', $_CONF['site_url']);
+    $eventform->set_var ('site_admin_url', $_CONF['site_admin_url']);
+    $eventform->set_var ('layout_url', $_CONF['layout_url']);
     if ($mode != 'personal') {
         $eventform->set_var ('explanation', $LANG_CAL_1[27]);
         $eventform->set_var ('submit_url', '/submit.php');
@@ -734,9 +738,6 @@
     } else {
         $eventform->set_var ('hour_mode', 12);
     }
-    $eventform->set_var ('site_url', $_CONF['site_url']);
-    $eventform->set_var ('site_admin_url', $_CONF['site_admin_url']);
-    $eventform->set_var ('layout_url', $_CONF['layout_url']);
     $eventform->set_var ('lang_title', $LANG_CAL_1[28]);
 
     $eventform->set_var('lang_eventtype', $LANG_CAL_1[37]);
@@ -816,7 +817,6 @@
     } else {
         $eventform->set_var('hidden_fields', '');
     }
-    $eventform->set_var('xhtml', XHTML);
     $eventform->parse('theform', 'eventform');
     $retval .= $eventform->finish($eventform->get_var('theform'));
     $retval .= COM_endBlock();
@@ -907,17 +907,17 @@
     );
 
     $cal_templates = new Template($_CONF['path'] .
'plugins/calendar/templates/admin');
-    $cal_templates->set_file (array ('form' => 'batchdelete.thtml'));
-    $cal_templates->set_var ('site_admin_url', $_CONF['site_admin_url']);
-    $cal_templates->set_var ('site_url', $_CONF['site_url']);
+    $cal_templates->set_file(array('form' => 'batchdelete.thtml'));
+    $cal_templates->set_var('xhtml', XHTML);
+    $cal_templates->set_var('site_url', $_CONF['site_url']);
+    $cal_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
     $cal_templates->set_var('layout_url', $_CONF['layout_url']);
-    $cal_templates->set_var('xhtml', XHTML);
-    $cal_templates->set_var ('usr_time', $usr_time);
-    $cal_templates->set_var ('lang_text_start', $LANG_CAL_ADMIN[28]);
-    $cal_templates->set_var ('lang_text_end', $LANG_CAL_ADMIN[29]);
-    $cal_templates->set_var ('lang_updatelist', $LANG_CAL_ADMIN[30]);
-    $cal_templates->set_var ('lang_delete_sel', $LANG_ADMIN['delete_sel']);
-    $cal_templates->set_var ('lang_delconfirm', $LANG_CAL_ADMIN[31]);
+    $cal_templates->set_var('usr_time', $usr_time);
+    $cal_templates->set_var('lang_text_start', $LANG_CAL_ADMIN[28]);
+    $cal_templates->set_var('lang_text_end', $LANG_CAL_ADMIN[29]);
+    $cal_templates->set_var('lang_updatelist', $LANG_CAL_ADMIN[30]);
+    $cal_templates->set_var('lang_delete_sel', $LANG_ADMIN['delete_sel']);
+    $cal_templates->set_var('lang_delconfirm', $LANG_CAL_ADMIN[31]);
     $cal_templates->parse('form', 'form');
     $desc = $cal_templates->finish($cal_templates->get_var('form'));
 
diff -r 160e2ce741e6 -r a411f5d356bb plugins/links/functions.inc
--- a/plugins/links/functions.inc	Sun Jan 10 09:43:37 2010 +0100
+++ b/plugins/links/functions.inc	Sun Jan 10 11:17:57 2010 +0100
@@ -10,7 +10,7 @@
 // | API method and 2) implements all the common code needed by the Links
|
 // | Plugins' PHP files.
|
 //
+---------------------------------------------------------------------------
+
-// | Copyright (C) 2000-2009 by the following authors:
|
+// | Copyright (C) 2000-2010 by the following authors:
|
 // |
|
 // | Authors: Tony Bibbs         - tony AT tonybibbs DOT com
|
 // |          Mark Limburg       - mlimburg AT users.sourceforge DOT net
|
@@ -879,7 +879,9 @@
 
     $linkform = new Template($_CONF['path'] . 'plugins/links/templates');
     $linkform->set_file('linkform', 'submitlink.thtml');
+    $linkform->set_var('xhtml', XHTML);
     $linkform->set_var('site_url', $_CONF['site_url']);
+    $linkform->set_var('site_admin_url', $_CONF['site_admin_url']);
     $linkform->set_var('layout_url', $_CONF['layout_url']);
     $linkform->set_var('lang_title', $LANG12[10]);
     $linkform->set_var('lang_link', $LANG_LINKS_SUBMIT[2]);
@@ -893,7 +895,6 @@
     $linkform->set_var('lang_htmlnotallowed', $LANG12[35]);
     $linkform->set_var('lang_submit', $LANG12[8]);
     $linkform->set_var('max_url_length', 255);
-    $linkform->set_var('xhtml', XHTML);
     $linkform->parse('theform', 'linkform');
     $retval .= $linkform->finish($linkform->get_var('theform'));
     $retval .= COM_endBlock();
diff -r 160e2ce741e6 -r a411f5d356bb plugins/polls/functions.inc
--- a/plugins/polls/functions.inc	Sun Jan 10 09:43:37 2010 +0100
+++ b/plugins/polls/functions.inc	Sun Jan 10 11:17:57 2010 +0100
@@ -10,7 +10,7 @@
 // | API method and 2) implements all the common code needed by the Polls
|
 // | plugin' PHP files.
|
 //
+---------------------------------------------------------------------------
+
-// | Copyright (C) 2000-2009 by the following authors:
|
+// | Copyright (C) 2000-2010 by the following authors:
|
 // |
|
 // | Authors: Tony Bibbs       - tony AT tonybibbs DOT com
|
 // |          Tom Willett      - twillett AT users DOT sourceforge DOT net
|
@@ -491,8 +491,8 @@
                                       'comments'   =>
'pollcomments.thtml'));
                 $poll->set_var('xhtml', XHTML);
                 $poll->set_var('site_url', $_CONF['site_url']);
+                $poll->set_var('site_admin_url', $_CONF['site_admin_url']);
                 $poll->set_var('layout_url', $_CONF['layout_url']);
-                $poll->set_var('site_admin_url', $_CONF['site_admin_url']);
                 $poll->set_var('poll_id', $pid );
                 $poll->set_var('poll_topic', $P['topic'] );
                 $poll->set_var('num_votes',
COM_numberFormat($P['voters']));
diff -r 160e2ce741e6 -r a411f5d356bb plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc	Sun Jan 10 09:43:37 2010 +0100
+++ b/plugins/staticpages/functions.inc	Sun Jan 10 11:17:57 2010 +0100
@@ -311,15 +311,15 @@
 
     $template_path = staticpages_templatePath();
     $spage = new Template($template_path);
+    $spage->set_file(array('page'     => 'staticpage.thtml',
+                           'comments' => 'spcomments.thtml'));
     $spage->set_var('xhtml', XHTML);
+    $spage->set_var('site_url', $_CONF['site_url']);
+    $spage->set_var('site_admin_url', $_CONF['site_admin_url']);
+    $spage->set_var('layout_url', $_CONF['layout_url']);
     if (XHTML != '') {
         $spage->set_var('xmlns', ' xmlns="http://www.w3.org/1999/xhtml"');
     }
-    $spage->set_var('site_url', $_CONF['site_url']);
-    $spage->set_var('site_admin_url', $_CONF['site_admin_url']);
-    $spage->set_var('layout_url', $_CONF['layout_url']);
-    $spage->set_file(array('page'     => 'staticpage.thtml',
-                           'comments' => 'spcomments.thtml'));
 
     $author_name = COM_getDisplayName($A['owner_id']);
     $author_username = DB_getItem($_TABLES['users'], 'username',
@@ -481,6 +481,7 @@
     $template_path = staticpages_templatePath();
     $print = new Template($template_path);
     $print->set_file(array('print' => 'printable.thtml'));
+    $print->set_var('xhtml', XHTML);
     $print->set_var('site_url', $_CONF['site_url']);
     $print->set_var('site_admin_url', $_CONF['site_admin_url']);
     $print->set_var('layout_url', $_CONF['layout_url']);
@@ -489,7 +490,6 @@
 
     $print->set_var('direction', $LANG_DIRECTION);
     COM_setLangIdAndAttribute($print);
-    $print->set_var('xhtml', XHTML);
     $print->set_var('page_title', $_CONF['site_name'] . ' - '
                                   . stripslashes($A['sp_title']));
     $sp_url = COM_buildUrl($_CONF['site_url']
@@ -988,8 +988,8 @@
             $spage->set_file(array('page' => 'centerblock.thtml'));
             $spage->set_var('xhtml', XHTML);
             $spage->set_var('site_url', $_CONF['site_url']);
+            $spage->set_var('site_admin_url', $_CONF['site_admin_url']);
             $spage->set_var('layout_url', $_CONF['layout_url']);
-            $spage->set_var('site_admin_url', $_CONF['site_admin_url']);
 
             if ($_CONF['hideprintericon'] == 0) {
                 $icon_url = $_CONF['layout_url'] . '/images/print.'
diff -r 160e2ce741e6 -r a411f5d356bb plugins/staticpages/services.inc.php
--- a/plugins/staticpages/services.inc.php	Sun Jan 10 09:43:37 2010
+0100
+++ b/plugins/staticpages/services.inc.php	Sun Jan 10 11:17:57 2010
+0100
@@ -8,7 +8,7 @@
 // |
|
 // | This file implements the services provided by the 'Static Pages'
plugin.  |
 //
+---------------------------------------------------------------------------
+
-// | Copyright (C) 2000-2009 by the following authors:
|
+// | Copyright (C) 2000-2010 by the following authors:
|
 // |
|
 // | Authors: Tony Bibbs       - tony AT tonybibbs DOT com
|
 // |          Tom Willett      - twillett AT users DOT sourceforge DOT net
|
@@ -621,8 +621,11 @@
                                 COM_getBlockTemplate('_msg_block',
'header'));
                     $login = new Template($_CONF['path_layout'] .
'submit');
                     $login->set_file(array('login' =>
'submitloginrequired.thtml'));
+                    $login->set_var('xhtml', XHTML);
+                    $login->set_var('site_url', $_CONF['site_url']);
+                    $login->set_var('site_admin_url',
$_CONF['site_admin_url']);
+                    $login->set_var('layout_url', $_CONF['layout_url']);
                     $login->set_var('login_message', $LANG_LOGIN[2]);
-                    $login->set_var('site_url', $_CONF['site_url']);
                     $login->set_var('lang_login', $LANG_LOGIN[3]);
                     $login->set_var('lang_newuser', $LANG_LOGIN[4]);
                     $login->parse('output', 'login');
diff -r 160e2ce741e6 -r a411f5d356bb public_html/admin/block.php
--- a/public_html/admin/block.php	Sun Jan 10 09:43:37 2010 +0100
+++ b/public_html/admin/block.php	Sun Jan 10 11:17:57 2010 +0100
@@ -258,8 +258,8 @@
 
     $block_templates = new Template($_CONF['path_layout'] . 'admin/block');
     $block_templates->set_file('editor','blockeditor.thtml');
+    $block_templates->set_var('xhtml', XHTML);
     $block_templates->set_var('site_url', $_CONF['site_url']);
-    $block_templates->set_var('xhtml', XHTML);
     $block_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
     $block_templates->set_var('layout_url', $_CONF['layout_url']);
     $block_start = COM_startBlock($LANG21[3], '',
diff -r 160e2ce741e6 -r a411f5d356bb public_html/admin/group.php
--- a/public_html/admin/group.php	Sun Jan 10 09:43:37 2010 +0100
+++ b/public_html/admin/group.php	Sun Jan 10 11:17:57 2010 +0100
@@ -106,10 +106,10 @@
 
     $group_templates = new Template($_CONF['path_layout'] . 'admin/group');
     $group_templates->set_file('editor', 'groupeditor.thtml');
+    $group_templates->set_var('xhtml', XHTML);
     $group_templates->set_var('site_url', $_CONF['site_url']);
     $group_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
     $group_templates->set_var('layout_url', $_CONF['layout_url']);
-    $group_templates->set_var('xhtml', XHTML);
 
     $group_templates->set_var('lang_save', $LANG_ADMIN['save']);
     $group_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
@@ -1052,11 +1052,12 @@
                 $_CONF['layout_url'] . '/images/icons/group.' .
$_IMAGE_TYPE);
 
     $groupmembers = new Template($_CONF['path_layout'] . 'admin/group');
-    $groupmembers->set_file(array('groupmembers'=>'groupmembers.thtml'));
+    $groupmembers->set_file(array('groupmembers' => 'groupmembers.thtml'));
+    $groupmembers->set_var('xhtml', XHTML);
     $groupmembers->set_var('site_url', $_CONF['site_url']);
     $groupmembers->set_var('site_admin_url', $_CONF['site_admin_url']);
+    $groupmembers->set_var('layout_url', $_CONF['layout_url']);
     $groupmembers->set_var('group_listing_url', $group_listing_url);
-    $groupmembers->set_var('layout_url', $_CONF['layout_url']);
     $groupmembers->set_var('phpself', $_CONF['site_admin_url'] .
'/group.php');
     $groupmembers->set_var('lang_adminhome', $LANG_ACCESS['adminhome']);
     $groupmembers->set_var('lang_instructions',
$LANG_ACCESS['editgroupmsg']);
@@ -1071,7 +1072,6 @@
     $groupmembers->set_var('lang_grouplist', $LANG28[38]);
     $groupmembers->set_var('show_all', $showall);
     $groupmembers->set_var('group_id',$group);
-    $groupmembers->set_var('xhtml', XHTML);
     $groupmembers->set_var('gltoken_name', CSRF_TOKEN);
     $groupmembers->set_var('gltoken', SEC_createToken());
     $groupmembers->parse('output', 'groupmembers');
diff -r 160e2ce741e6 -r a411f5d356bb public_html/admin/mail.php
--- a/public_html/admin/mail.php	Sun Jan 10 09:43:37 2010 +0100
+++ b/public_html/admin/mail.php	Sun Jan 10 11:17:57 2010 +0100
@@ -8,7 +8,7 @@
 // |
|
 // | Geeklog mail administration page.
|
 //
+---------------------------------------------------------------------------
+
-// | Copyright (C) 2001-2009 by the following authors:
|
+// | Copyright (C) 2001-2010 by the following authors:
|
 // |
|
 // | Authors: Tony Bibbs - tony AT tonybibbs DOT com
|
 // |          Dirk Haun  - dirk AT haun-online DOT de
|
@@ -86,6 +86,7 @@
 
     $mail_templates = new Template($_CONF['path_layout'] . 'admin/mail');
     $mail_templates->set_file(array('form' => 'mailform.thtml'));
+    $mail_templates->set_var('xhtml', XHTML);
     $mail_templates->set_var('site_url', $_CONF['site_url']);
     $mail_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
     $mail_templates->set_var('layout_url', $_CONF['layout_url']);
@@ -124,7 +125,6 @@
     $mail_templates->set_var('lang_send', $LANG31[12]);
     $mail_templates->set_var('end_block',
             COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')));
-    $mail_templates->set_var('xhtml', XHTML);
     $mail_templates->set_var('gltoken_name', CSRF_TOKEN);
     $mail_templates->set_var('gltoken', SEC_createToken());
 
diff -r 160e2ce741e6 -r a411f5d356bb public_html/admin/moderation.php
--- a/public_html/admin/moderation.php	Sun Jan 10 09:43:37 2010 +0100
+++ b/public_html/admin/moderation.php	Sun Jan 10 11:17:57 2010 +0100
@@ -8,7 +8,7 @@
 // |
|
 // | Geeklog main administration page.
|
 //
+---------------------------------------------------------------------------
+
-// | Copyright (C) 2000-2009 by the following authors:
|
+// | Copyright (C) 2000-2010 by the following authors:
|
 // |
|
 // | Authors: Tony Bibbs        - tony AT tonybibbs DOT com
|
 // |          Mark Limburg      - mlimburg AT users DOT sourceforge DOT net
|
@@ -90,9 +90,9 @@
                                        'ccrow'  => 'ccrow.thtml',
                                        'ccitem' => 'ccitem.thtml'));
     $admin_templates->set_var('xhtml', XHTML);
-    $admin_templates->set_var('layout_url', $_CONF['layout_url']);
     $admin_templates->set_var('site_url', $_CONF['site_url']);
     $admin_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
+    $admin_templates->set_var('layout_url', $_CONF['layout_url']);
 
     $retval .= COM_startBlock ('Geeklog ' . VERSION . ' -- ' . $LANG29[34],
'',
                                COM_getBlockTemplate ('_admin_block',
'header'));
diff -r 160e2ce741e6 -r a411f5d356bb
public_html/admin/plugins/staticpages/index.php
--- a/public_html/admin/plugins/staticpages/index.php	Sun Jan 10 09:43:37
2010 +0100
+++ b/public_html/admin/plugins/staticpages/index.php	Sun Jan 10 11:17:57
2010 +0100
@@ -8,7 +8,7 @@
 // |
|
 // | Administration page.
|
 //
+---------------------------------------------------------------------------
+
-// | Copyright (C) 2000-2009 by the following authors:
|
+// | Copyright (C) 2000-2010 by the following authors:
|
 // |
|
 // | Authors: Tony Bibbs       - tony AT tonybibbs DOT com
|
_______________________________________________
geeklog-cvs mailing list
geeklog-cvs at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-cvs




More information about the geeklog-devel mailing list