/** * Check whether or not the uploaded file type is allowed * @return bool */ public function checkMimeType() { global $icmsModule; $mimetypeHandler = icms_getModulehandler('mimetype', 'system'); $modulename = isset($icmsModule) && is_object($icmsModule) ? $icmsModule->getVar('dirname') : 'system'; if (empty($this->mediaRealType) && empty($this->allowUnknownTypes)) { self::setErrors(_ER_UP_UNKNOWNFILETYPEREJECTED); return false; } $AllowedMimeTypes = $mimetypeHandler->AllowedModules($this->mediaRealType, $modulename); if (!empty($this->allowedMimeTypes) && !in_array($this->mediaRealType, $this->allowedMimeTypes) || !empty($this->deniedMimeTypes) && in_array($this->mediaRealType, $this->deniedMimeTypes) || empty($this->allowedMimeTypes) && !$AllowedMimeTypes) { self::setErrors(sprintf(_ER_UP_MIMETYPENOTALLOWED, $this->mediaType)); return false; } return true; }
} unset($table); $table = new icms_db_legacy_updater_Table('system_rating'); if (!$table->exists()) { $table->setStructure("ratingid int(11) NOT NULL auto_increment,\n\t\t\t\t\tdirname VARCHAR(255) NOT NULL,\n\t\t\t\t\titem VARCHAR(255) NOT NULL,\n\t\t\t\t\titemid int(11) NOT NULL,\n\t\t\t\t\tuid int(11) NOT NULL,\n\t\t\t\t\trate int(1) NOT NULL,\n\t\t\t\t\tdate int(11) NOT NULL,\n\t\t\t\t\tPRIMARY KEY (`ratingid`)\n\t\t\t\t\t"); $table->createTable(); } unset($table); $icmsDatabaseUpdater->updateModuleDBVersion($newDbVersion, 'system'); echo sprintf(_DATABASEUPDATER_UPDATE_OK, icms_conv_nr2local($newDbVersion)) . '<br />'; } if (!$abortUpdate) { $newDbVersion = 27; } if ($dbVersion < $newDbVersion) { $handler = icms_getModulehandler('userrank', 'system'); $handler->MoveAllRanksImagesToProperPath(); $icmsDatabaseUpdater->updateModuleDBVersion($newDbVersion, 'system'); echo sprintf(_DATABASEUPDATER_UPDATE_OK, icms_conv_nr2local($newDbVersion)) . '<br />'; } if (!$abortUpdate) { $newDbVersion = 28; } if ($dbVersion < $newDbVersion) { $table = new icms_db_legacy_updater_Table('system_autotasks'); if (!$table->exists()) { $table->setStructure("sat_id int(10) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t\tsat_name varchar(255) NOT NULL,\n\t\t\t\t\tsat_code text NOT NULL,\n\t\t\t\t\tsat_repeat int(11) NOT NULL,\n\t\t\t\t\tsat_interval int(11) NOT NULL,\n\t\t\t\t\tsat_onfinish smallint(2) NOT NULL,\n\t\t\t\t\tsat_enabled INT(1) NOT NULL,\n\t\t\t\t\tsat_lastruntime int(15) unsigned NOT NULL,\n\t\t\t\t\tsat_type varchar(100) NOT NULL DEFAULT 'custom',\n\t\t\t\t\tsat_addon_id int(2) unsigned zerofill DEFAULT NULL,\n\t\t\t\t\tPRIMARY KEY (sat_id),\n\t\t\t\t\tKEY sat_interval (sat_interval),\n\t\t\t\t\tKEY sat_lastruntime (sat_lastruntime),\n\t\t\t\t\tKEY sat_type (sat_type)\n\t\t\t\t\t"); $table->createTable(); } unset($table); if (getDbValue(icms::$xoopsDB, 'configcategory', 'confcat_name', 'confcat_name="_MD_AM_AUTOTASKS"') == FALSE) {