[geeklog-cvs] geeklog: Ensure consistent template variable names for the Permi...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Feb 22 13:17:19 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/86ac6368a553
changeset: 6797:86ac6368a553
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Feb 22 18:50:02 2009 +0100
description:
Ensure consistent template variable names for the Permission Editor

diffstat:

20 files changed, 46 insertions(+), 24 deletions(-)
plugins/calendar/templates/admin/eventeditor.thtml                     |    2 -
plugins/links/templates/admin/categoryeditor.thtml                     |    4 +-
plugins/links/templates/admin/linkeditor.thtml                         |    4 +-
plugins/polls/templates/admin/polleditor.thtml                         |    2 -
plugins/staticpages/templates/admin/editor.thtml                       |    2 -
plugins/staticpages/templates/admin/editor_advanced.thtml              |    2 -
public_html/admin/block.php                                            |    7 ++---
public_html/admin/plugins/calendar/index.php                           |    2 +
public_html/admin/plugins/links/category.php                           |    2 +
public_html/admin/plugins/links/index.php                              |    2 +
public_html/admin/plugins/polls/index.php                              |    1 
public_html/admin/plugins/staticpages/index.php                        |    7 ++---
public_html/admin/story.php                                            |    1 
public_html/admin/topic.php                                            |    9 +++---
public_html/docs/history                                               |    1 
public_html/docs/theme.html                                            |   14 ++++++++++
public_html/layout/professional/admin/block/defaultblockeditor.thtml   |    2 -
public_html/layout/professional/admin/story/storyeditor.thtml          |    2 -
public_html/layout/professional/admin/story/storyeditor_advanced.thtml |    2 -
public_html/layout/professional/admin/topic/topiceditor.thtml          |    2 -

diffs (truncated from 345 to 300 lines):

diff -r 00df2e53c8cf -r 86ac6368a553 plugins/calendar/templates/admin/eventeditor.thtml
--- a/plugins/calendar/templates/admin/eventeditor.thtml	Sun Feb 22 12:27:17 2009 +0100
+++ b/plugins/calendar/templates/admin/eventeditor.thtml	Sun Feb 22 18:50:02 2009 +0100
@@ -144,7 +144,7 @@
                                         <td colspan="2"></td>
                                     </tr>
                                     <tr>
-                                        <td colspan="2">{lang_permissionskey}</td>
+                                        <td colspan="2">{lang_perm_key}</td>
                                     </tr>
                                     <tr>
                                         <td colspan="2">
diff -r 00df2e53c8cf -r 86ac6368a553 plugins/links/templates/admin/categoryeditor.thtml
--- a/plugins/links/templates/admin/categoryeditor.thtml	Sun Feb 22 12:27:17 2009 +0100
+++ b/plugins/links/templates/admin/categoryeditor.thtml	Sun Feb 22 18:50:02 2009 +0100
@@ -45,7 +45,7 @@
                 <td colspan="2"></td>
             </tr>
             <tr>
-                <td colspan="2">{lang_permissionskey}</td>
+                <td colspan="2">{lang_perm_key}</td>
             </tr>
             <tr>
                 <td colspan="2">
@@ -53,7 +53,7 @@
                 </td>
             </tr>
             <tr>
-                <td colspan="2">{lang_lockmsg}<td>
+                <td colspan="2">{lang_permissions_msg}<td>
             </tr>
             <tr><td> </td></tr>
             <tr>
diff -r 00df2e53c8cf -r 86ac6368a553 plugins/links/templates/admin/linkeditor.thtml
--- a/plugins/links/templates/admin/linkeditor.thtml	Sun Feb 22 12:27:17 2009 +0100
+++ b/plugins/links/templates/admin/linkeditor.thtml	Sun Feb 22 18:50:02 2009 +0100
@@ -66,7 +66,7 @@
                                             <td colspan="2"></td>
                                         </tr>
                                         <tr>
-                                            <td colspan="2">{lang_permissionskey}</td>
+                                            <td colspan="2">{lang_perm_key}</td>
                                         </tr>
                                         <tr>
                                             <td colspan="2">
@@ -74,7 +74,7 @@
                                             </td>
                                         </tr>
                                         <tr>
-                                            <td colspan="2">{lang_lockmsg}</td>
+                                            <td colspan="2">{lang_permissions_msg}</td>
                                         </tr>
                                         <tr><td> </td></tr>
                                         <tr>
diff -r 00df2e53c8cf -r 86ac6368a553 plugins/polls/templates/admin/polleditor.thtml
--- a/plugins/polls/templates/admin/polleditor.thtml	Sun Feb 22 12:27:17 2009 +0100
+++ b/plugins/polls/templates/admin/polleditor.thtml	Sun Feb 22 18:50:02 2009 +0100
@@ -39,7 +39,7 @@
                                     <p>{lang_owner}: {owner_name}<input type="hidden" name="owner_id" value="{owner_id}"{xhtml}><br{xhtml}></p>
                                     <p>{lang_group}: {group_dropdown}<br{xhtml}></p>
                                     <h2>{lang_permissions}</h2>
-                                    <p>{lang_permissionskey}</p>
+                                    <p>{lang_perm_key}</p>
                                     <div>{permissions_editor}</div>
                                     <p>{lang_permissions_msg}</p>
                                     <p>
diff -r 00df2e53c8cf -r 86ac6368a553 plugins/staticpages/templates/admin/editor.thtml
--- a/plugins/staticpages/templates/admin/editor.thtml	Sun Feb 22 12:27:17 2009 +0100
+++ b/plugins/staticpages/templates/admin/editor.thtml	Sun Feb 22 18:50:02 2009 +0100
@@ -116,7 +116,7 @@
               </td>
           </tr>
           <tr>
-              <td colspan="2">{permissions_msg}</td>
+              <td colspan="2">{lang_permissions_msg}</td>
           </tr>
           <tr>
               <td colspan="2"><hr{xhtml}></td>
diff -r 00df2e53c8cf -r 86ac6368a553 plugins/staticpages/templates/admin/editor_advanced.thtml
--- a/plugins/staticpages/templates/admin/editor_advanced.thtml	Sun Feb 22 12:27:17 2009 +0100
+++ b/plugins/staticpages/templates/admin/editor_advanced.thtml	Sun Feb 22 18:50:02 2009 +0100
@@ -147,7 +147,7 @@
               </td>
           </tr>
           <tr>
-              <td colspan="2">{permissions_msg}</td>
+              <td colspan="2">{lang_permissions_msg}</td>
           </tr>
           <tr>
               <td colspan="2"><hr{xhtml}></td>
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/admin/block.php
--- a/public_html/admin/block.php	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/admin/block.php	Sun Feb 22 18:50:02 2009 +0100
@@ -2,13 +2,13 @@
 
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Geeklog 1.5                                                               |
+// | Geeklog 1.6                                                               |
 // +---------------------------------------------------------------------------+
 // | block.php                                                                 |
 // |                                                                           |
 // | Geeklog block administration.                                             |
 // +---------------------------------------------------------------------------+
-// | 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    |
@@ -32,8 +32,6 @@
 // | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
 // |                                                                           |
 // +---------------------------------------------------------------------------+
-//
-// $Id: block.php,v 1.124 2008/06/07 12:41:44 dhaun Exp $
 
 require_once '../lib-common.php';
 require_once 'auth.inc.php';
@@ -163,6 +161,7 @@
     $block_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
     $block_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']));
     $block_templates->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
+    $block_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
     $block_templates->set_var('max_url_length', 255);
     $block_templates->set_var('gltoken_name', CSRF_TOKEN);
     $block_templates->set_var('gltoken', SEC_createToken());
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/admin/plugins/calendar/index.php
--- a/public_html/admin/plugins/calendar/index.php	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/admin/plugins/calendar/index.php	Sun Feb 22 18:50:02 2009 +0100
@@ -322,7 +322,9 @@
                               SEC_getGroupDropdown ($A['group_id'], $access));
     $event_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
     $event_templates->set_var('lang_permissionskey', $LANG_ACCESS['permissionskey']);
+    $event_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
     $event_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']));
+    $event_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
     $event_templates->set_var('gltoken_name', CSRF_TOKEN);
     $event_templates->set_var('gltoken', SEC_createToken());
     $event_templates->parse('output', 'editor');
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/admin/plugins/links/category.php
--- a/public_html/admin/plugins/links/category.php	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/admin/plugins/links/category.php	Sun Feb 22 18:50:02 2009 +0100
@@ -262,8 +262,10 @@
     $T->set_var('group_dropdown', SEC_getGroupDropdown($A['group_id'], $access));
     $T->set_var('lang_permissions', $LANG_ACCESS['permissions']);
     $T->set_var('lang_permissionskey', $LANG_ACCESS['permissionskey']);
+    $T->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
     $T->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'],
             $A['perm_group'], $A['perm_members'], $A['perm_anon']));
+    $T->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
     $T->set_var('lang_lockmsg', $LANG_ACCESS['permmsg']);
     $T->set_var('gltoken_name', CSRF_TOKEN);
     $T->set_var('gltoken', SEC_createToken());
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/admin/plugins/links/index.php
--- a/public_html/admin/plugins/links/index.php	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/admin/plugins/links/index.php	Sun Feb 22 18:50:02 2009 +0100
@@ -199,7 +199,9 @@
                              SEC_getGroupDropdown ($A['group_id'], $access));
     $link_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
     $link_templates->set_var('lang_permissionskey', $LANG_ACCESS['permissionskey']);
+    $link_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
     $link_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']));
+    $link_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
     $link_templates->set_var('lang_lockmsg', $LANG_ACCESS['permmsg']);
     $link_templates->set_var('gltoken_name', CSRF_TOKEN);
     $link_templates->set_var('gltoken', SEC_createToken());
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/admin/plugins/polls/index.php
--- a/public_html/admin/plugins/polls/index.php	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/admin/plugins/polls/index.php	Sun Feb 22 18:50:02 2009 +0100
@@ -441,6 +441,7 @@
                              SEC_getGroupDropdown ($T['group_id'], $access));
     $poll_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
     $poll_templates->set_var('lang_permissionskey', $LANG_ACCESS['permissionskey']);
+    $poll_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
     $poll_templates->set_var('permissions_editor', SEC_getPermissionsHTML($T['perm_owner'],$T['perm_group'],$T['perm_members'],$T['perm_anon']));
     $poll_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
     $poll_templates->set_var('lang_answersvotes', $LANG25[10]);
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/admin/plugins/staticpages/index.php
--- a/public_html/admin/plugins/staticpages/index.php	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/admin/plugins/staticpages/index.php	Sun Feb 22 18:50:02 2009 +0100
@@ -2,13 +2,13 @@
 
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Static Pages Geeklog Plugin 1.5                                           |
+// | Static Pages Geeklog Plugin 1.6                                           |
 // +---------------------------------------------------------------------------+
 // | index.php                                                                 |
 // |                                                                           |
 // | 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                     |
 // |          Phill Gillespie  - phill AT mediaaustralia DOT com DOT au        |
@@ -31,8 +31,6 @@
 // | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
 // |                                                                           |
 // +---------------------------------------------------------------------------+
-//
-// $Id: index.php,v 1.94 2008/06/22 14:49:06 dhaun Exp $
 
 require_once '../../../lib-common.php';
 require_once '../../auth.inc.php';
@@ -154,6 +152,7 @@
         $sp_template->set_var('lang_permissions', $LANG_ACCESS['permissions']);
         $sp_template->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
         $sp_template->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
+        $sp_template->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
         $sp_template->set_var('site_url', $_CONF['site_url']);
         $sp_template->set_var('site_admin_url', $_CONF['site_admin_url']);
         $sp_template->set_var('start_block_editor',
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/admin/story.php
--- a/public_html/admin/story.php	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/admin/story.php	Sun Feb 22 18:50:02 2009 +0100
@@ -423,6 +423,7 @@
         $story->EditElements('perm_owner'),$story->EditElements('perm_group'),
         $story->EditElements('perm_members'),$story->EditElements('perm_anon')));
     $story_templates->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
+    $story_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
     $curtime = COM_getUserDateTimeFormat($story->EditElements('date'));
     $story_templates->set_var('lang_date', $LANG24[15]);
 
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/admin/topic.php
--- a/public_html/admin/topic.php	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/admin/topic.php	Sun Feb 22 18:50:02 2009 +0100
@@ -2,13 +2,13 @@
 
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Geeklog 1.5                                                               |
+// | Geeklog 1.6                                                               |
 // +---------------------------------------------------------------------------+
 // | topic.php                                                                 |
 // |                                                                           |
 // | Geeklog topic 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: topic.php,v 1.80 2008/05/18 16:58:51 dhaun Exp $
 
 require_once '../lib-common.php';
 require_once 'auth.inc.php';
@@ -140,6 +138,9 @@
                               SEC_getGroupDropdown ($A['group_id'], $access));
     $topic_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
     $topic_templates->set_var('lang_permissions_key', $LANG_ACCESS['permissionskey']);
+    $topic_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
+    $topic_templates->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
+    $topic_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
     $topic_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']));
 
     // show sort order only if they specified sortnum as the sort method
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/docs/history
--- a/public_html/docs/history	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/docs/history	Sun Feb 22 18:50:02 2009 +0100
@@ -11,6 +11,7 @@
 + (TBD) Comment moderation and editable comments, by Jared Wenerd
 
 Other changes:
+- Ensure consistent template variable names for the Permission Editor [Dirk]
 - Added new permission 'group.assign', now required to be able to assign a user
   to a group. Part of the Group Admin (not User Admin) permissions by default
   (feature request #0000190) [Dirk]
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/docs/theme.html
--- a/public_html/docs/theme.html	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/docs/theme.html	Sun Feb 22 18:50:02 2009 +0100
@@ -223,6 +223,20 @@
     now.</li>
 </ul>
 
+<h3>Permissions Editor</h3>
+
+<p>The various instances of the Permissions Editor (where you can set the Read
+/ Edit permissions for Owner, Group, Members, Anonymous) were using slightly
+different template variable names. From now on, the following names are defined
+everywhere:</p>
+<ul>
+<li><tt>{lang_permissions}</tt> (headline)</li>
+<li><tt>{lang_perm_key}</tt> (legend: R = read, ...)</li>
+<li><tt>{permissions_editor}</tt> (the actual checkboxes)</li>
+<li><tt>{lang_permissions_msg}</tt> ("Note: members is all logged in member ...)</li>
+</ul>
+<p>Template files using the alternative names will continue to work, but new
+files should use the above names from now on.</p>
 
 <h2><a name="changes152">Theme changes in Geeklog 1.5.2</a></h2>
 
diff -r 00df2e53c8cf -r 86ac6368a553 public_html/layout/professional/admin/block/defaultblockeditor.thtml
--- a/public_html/layout/professional/admin/block/defaultblockeditor.thtml	Sun Feb 22 12:27:17 2009 +0100
+++ b/public_html/layout/professional/admin/block/defaultblockeditor.thtml	Sun Feb 22 18:50:02 2009 +0100



More information about the geeklog-cvs mailing list