[pLog-svn] r4495 - plog/trunk/class/plugin
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Jan 4 22:12:34 GMT 2007
Author: oscar
Date: 2007-01-04 22:12:33 +0000 (Thu, 04 Jan 2007)
New Revision: 4495
Modified:
plog/trunk/class/plugin/pluginbase.class.php
Log:
this should help most of 1.1 plugins work out of the box with LT 1.2.
Modified: plog/trunk/class/plugin/pluginbase.class.php
===================================================================
--- plog/trunk/class/plugin/pluginbase.class.php 2007-01-04 19:49:52 UTC (rev 4494)
+++ plog/trunk/class/plugin/pluginbase.class.php 2007-01-04 22:12:33 UTC (rev 4495)
@@ -241,6 +241,23 @@
{
lt_include( PLOG_CLASS_PATH."class/template/menu/menu.class.php" );
+ // for 1.1 compatibility
+ if( is_bool( $orPerms ) && is_bool( $andPerms )) {
+ if( $orPerms == true )
+ $orPerms = Array();
+ else
+ $orPerms = Array( "manage_plugins" );
+
+ if( $andPerms == true ) {
+ $siteAdmin = true;
+ $andPerms = Array();
+ }
+ else {
+ $siteAdmin = false;
+ $andPerms = Array( "manage_plugins" );
+ }
+ }
+
$orPermsString = implode( ",", $orPerms );
$andPermsString = implode( ",", $andPerms );
More information about the pLog-svn
mailing list