[geeklog-hg] geeklog: fixed typo in function name (SEC_hasConfigAcess) and de...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Fri Jun 8 04:37:12 EDT 2012


changeset 8717:2cac944e46ef
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/2cac944e46ef
user: Dirk Haun <dirk at haun-online.de>
date: Thu Jun 07 23:37:22 2012 +0200
description:
fixed typo in function name (SEC_hasConfigAcess) and deprecated the old function (bug #0001446)

diffstat:

 public_html/admin/auth.inc.php |   2 +-
 public_html/lib-common.php     |   4 ++--
 system/lib-security.php        |  20 ++++++++++++++++----
 3 files changed, 19 insertions(+), 7 deletions(-)

diffs (73 lines):

diff -r 7c1fe86d0cc4 -r 2cac944e46ef public_html/admin/auth.inc.php
--- a/public_html/admin/auth.inc.php	Thu Jun 07 15:40:10 2012 -0400
+++ b/public_html/admin/auth.inc.php	Thu Jun 07 23:37:22 2012 +0200
@@ -88,7 +88,7 @@
     }
     echo $display;
     exit;
-} else if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit','OR') && (count(PLG_getAdminOptions()) == 0) && !SEC_hasConfigAcess()) {
+} else if (!SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit','OR') && (count(PLG_getAdminOptions()) == 0) && !SEC_hasConfigAccess()) {
     COM_updateSpeedlimit('login');
 
     $display .= COM_startBlock($LANG20[1]);
diff -r 7c1fe86d0cc4 -r 2cac944e46ef public_html/lib-common.php
--- a/public_html/lib-common.php	Thu Jun 07 15:40:10 2012 -0400
+++ b/public_html/lib-common.php	Thu Jun 07 23:37:22 2012 +0200
@@ -3247,7 +3247,7 @@
     $plugin_options = PLG_getAdminOptions();
     $num_plugins = count( $plugin_options );
 
-    if( SEC_isModerator() OR SEC_hasRights( 'story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit', 'OR' ) OR ( $num_plugins > 0 ) OR SEC_hasConfigAcess())        
+    if( SEC_isModerator() OR SEC_hasRights( 'story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit', 'OR' ) OR ( $num_plugins > 0 ) OR SEC_hasConfigAccess())        
     {
         $link_array = array();
 
@@ -3337,7 +3337,7 @@
             }
         }
 
-        if (SEC_hasConfigAcess()) {
+        if (SEC_hasConfigAccess()) {
             $url = $_CONF['site_admin_url'] . '/configuration.php';
             $adminmenu->set_var('option_url', $url);
             $adminmenu->set_var('option_label', $LANG01[129]);
diff -r 7c1fe86d0cc4 -r 2cac944e46ef system/lib-security.php
--- a/system/lib-security.php	Thu Jun 07 15:40:10 2012 -0400
+++ b/system/lib-security.php	Thu Jun 07 23:37:22 2012 +0200
@@ -273,20 +273,32 @@
 
 /**
 * Checks to see if current user has access to a configuration
-* 
+*
 * @return   boolean     returns if user has any config. rights
 */
-function SEC_hasConfigAcess() {
+function SEC_hasConfigAccess()
+{
     global $_CONF_FT;
-    
+
     if (SEC_hasRights($_CONF_FT, 'OR')) {
         return true;
     }
-    
+
     return false;
 }
 
 /**
+* Deprecated - use SEC_hasConfigAccess instead
+*
+* @deprecated since Geeklog 2.0.0
+* @see SEC_hasConfigAccess
+*/
+function SEC_hasConfigAcess()
+{
+    return SEC_hasConfigAccess();
+}
+
+/**
 * Checks to see if current user has access to a topic
 *
 * Checks to see if current user has access to a topic



More information about the geeklog-cvs mailing list