*/ class UploadAppletModule extends GalleryModule { function UploadAppletModule() { global $gallery; $this->setId('uploadapplet'); $this->setName($gallery->i18n('Upload Applet')); $this->setDescription($gallery->i18n('Easy to use upload applet for media')); $this->setVersion('1.0.4'); $this->setGroup('import', $gallery->i18n('Import')); $this->setCallbacks('getSiteAdminViews'); $this->setRequiredCoreApi(array(7, 0)); $this->setRequiredModuleApi(array(3, 0)); } /** * @see GalleryPlugin::upgrade() */ function upgrade($currentVersion) { global $gallery; list ($ret, $params) = GalleryCoreApi::fetchAllPluginParameters('module', 'uploadapplet'); if ($ret) { return $ret->wrap(__FILE__, __LINE__); } if (!isset($params['uploaddefaultVariables'])) { $ret = $this->setParameter('uploaddefaultVariables', ''); if ($ret) { return $ret->wrap(__FILE__, __LINE__); } } if (!isset($params['uploadoverrideVariables'])) { $ret = $this->setParameter('uploadoverrideVariables', 'toSysOut=true|htmlEscapeCaptions=true'); if ($ret) { return $ret->wrap(__FILE__, __LINE__); } } return null; } /** * @see GalleryModule::performFactoryRegistrations() */ function performFactoryRegistrations() { $ret = GalleryCoreApi::registerFactoryImplementation( 'ItemAddPlugin', 'ItemAddUploadApplet', 'ItemAddUploadApplet', 'modules/uploadapplet/ItemAddUploadApplet.inc', 'uploadapplet', null); if ($ret) { return $ret->wrap(__FILE__, __LINE__); } return null; } /** * @see GalleryModule::getSiteAdminViews() */ function getSiteAdminViews() { return array(null, array(array('name' => $this->translate('Upload Applet'), 'view' => 'uploadapplet.UploadAppletSiteAdmin'))); } } ?>