[pLog-svn] r5628 - in plugins/branches/lifetype-1.2/unported/jupload: . class/action
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Fri Jul 6 17:01:21 EDT 2007
Author: jondaley
Date: 2007-07-06 17:01:21 -0400 (Fri, 06 Jul 2007)
New Revision: 5628
Modified:
plugins/branches/lifetype-1.2/unported/jupload/class/action/pluginjuploadconfigaction.class.php
plugins/branches/lifetype-1.2/unported/jupload/pluginjupload.class.php
Log:
starting upgrade to 1.2 - not working yet. I also tried upgrading jupload, but I guess I should get the current version working before I upgrade. debugging is kind of hard on jupload...
Modified: plugins/branches/lifetype-1.2/unported/jupload/class/action/pluginjuploadconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/jupload/class/action/pluginjuploadconfigaction.class.php 2007-07-06 15:19:35 UTC (rev 5627)
+++ plugins/branches/lifetype-1.2/unported/jupload/class/action/pluginjuploadconfigaction.class.php 2007-07-06 21:01:21 UTC (rev 5628)
@@ -1,17 +1,18 @@
<?php
- lt_include( PLOG_CLASS_PATH."class/action/admin/siteadminaction.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
lt_include( PLOG_CLASS_PATH."plugins/jupload/class/view/pluginjuploadconfigview.class.php" );
/**
* shows a form with the current configuration
*/
- class PluginJUploadConfigAction extends SiteAdminAction
+ class PluginJUploadConfigAction extends AdminAction
{
function PluginJUploadConfigAction( $actionInfo, $request )
{
- $this->SiteAdminAction( $actionInfo, $request );
+ $this->AdminAction( $actionInfo, $request );
+ $this->requireAdminPermission( "manage_admin_plugins" );
}
function perform()
Modified: plugins/branches/lifetype-1.2/unported/jupload/pluginjupload.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/jupload/pluginjupload.class.php 2007-07-06 15:19:35 UTC (rev 5627)
+++ plugins/branches/lifetype-1.2/unported/jupload/pluginjupload.class.php 2007-07-06 21:01:21 UTC (rev 5628)
@@ -13,14 +13,15 @@
var $maxFilesPerRequest;
var $maxTotalRequestSize;
- function PluginJUpload()
+ function PluginJUpload($source="")
{
- $this->PluginBase();
+ $this->PluginBase($source);
$this->id = "jupload";
$this->author = "Mark Wu";
$this->desc = "This plugin offers you to integrate JUpload with LifeType.";
-
+ $this->version = "20070706";
+
$config =& Config::getConfig();
$this->resourceCenterEnabled = $config->getValue( "resources_enabled" );
$this->pluginEnabled = $config->getValue( "plugin_jupload_enabled" );
@@ -29,20 +30,23 @@
$this->locales = Array();
- $this->init();
+ if($source == "admin"){
+ $this->initAdmin();
+ }
}
- function init()
+ function initAdmin()
{
$this->registerAdminAction( "juploadConfig", "PluginJUploadConfigAction" );
$this->registerAdminAction( "juploadUpdateConfig", "PluginJUploadUpdateConfigAction" );
$this->registerAdminAction( "juploadNewResource", "PluginJUploadNewResourceAction" );
$this->registerAdminAction( "juploadAddResource", "PluginJUploadAddResourceAction" );
- $this->addMenuEntry( "/menu/adminSettings/GlobalSettings", "juploadConfig", "?op=juploadConfig","" );
- if ( $this->resourceCenterEnabled && $this->pluginEnabled )
- {
- $this->addMenuEntry( "/menu/ResourcesGroup/resourceCenter", "juploadNewResource", "?op=juploadNewResource", "" );
+ $this->addMenuEntry( "/menu/adminSettings/GlobalSettings", "juploadConfig",
+ "?op=juploadConfig","" );
+ if($this->resourceCenterEnabled && $this->pluginEnabled){
+ $this->addMenuEntry( "/menu/ResourcesGroup/resourceCenter",
+ "juploadNewResource", "?op=juploadNewResource", "" );
}
}
@@ -60,5 +64,18 @@
{
return $this->maxTotalRequestSize;
}
+
+ function getPluginConfigurationKeys()
+ {
+ lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+
+ return( Array(
+ Array( "name" => "plugin_jupload_enabled", "type" => "boolean" ),
+ Array( "name" => "plugin_jupload_maxfilesperrequest",
+ "validator" => new IntegerValidator(), "type" => "integer",
+ "allowEmpty" => true ),
+ ));
+ }
+
}
?>
\ No newline at end of file
More information about the pLog-svn
mailing list