芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/ancien-site-2019/site/administrator/components/com_akeeba/install.akeeba.php
setQuery($sql); $ctableAssoc = $db->loadResultArray(1); $ctable = empty($ctableAssoc) ? '' : $ctableAssoc[0]; if(!strstr($ctable, '`total_size`')) { // Smart schema update - Updated for changes in 3.2.a1 if($db->hasUTF()) { $charset = 'CHARSET=utf8'; } else { $charset = ''; } $sql = <<
setQuery($sql); $status = $db->query(); if(!$status && ($db->getErrorNum() != 1060)) { $errors[] = $db->getErrorMsg(true); } $sql = <<
setQuery($sql); $status = $db->query(); if(!$status && ($db->getErrorNum() != 1060)) { $errors[] = $db->getErrorMsg(true); } if(strstr($ctable, '`tag`')) { // Upgrade from 3.1.3 or later (has tag and filesexist columns) $sql = <<
setQuery($sql); $status = $db->query(); if(!$status && ($db->getErrorNum() != 1060)) { $errors[] = $db->getErrorMsg(true); } $sql = <<
setQuery($sql); $status = $db->query(); if(!$status && ($db->getErrorNum() != 1060)) { $errors[] = $db->getErrorMsg(true); } $sql = <<
setQuery($sql); $status = $db->query(); if(!$status && ($db->getErrorNum() != 1060)) { $errors[] = $db->getErrorMsg(true); } $sql = <<
setQuery($sql); $status = $db->query(); if(!$status && ($db->getErrorNum() != 1060)) { $errors[] = $db->getErrorMsg(true); } $sql = <<
setQuery($sql); $status = $db->query(); if(!$status && ($db->getErrorNum() != 1060)) { $errors[] = $db->getErrorMsg(true); } } // Schema modification -- END // Install modules and plugins -- BEGIN // -- General settings jimport('joomla.installer.installer'); $db = & JFactory::getDBO(); $status = new JObject(); $status->modules = array(); $status->plugins = array(); if( version_compare( JVERSION, '1.6.0', 'ge' ) ) { // Thank you for removing installer features in Joomla! 1.6 Beta 13 and // forcing me to write ugly code, Joomla!... $src = dirname(__FILE__); } else { $src = $this->parent->getPath('source'); } // -- Icon module $installer = new JInstaller; $result = $installer->install($src.'/mod_akadmin'); $status->modules[] = array('name'=>'mod_akadmin','client'=>'administrator', 'result'=>$result); $query = "UPDATE #__modules SET position='icon', ordering=97, published=1 WHERE `module`='mod_akadmin'"; $db->setQuery($query); $db->query(); $query = "SELECT `id` FROM `#__modules` WHERE `module` = 'mod_akadmin'"; $db->setQuery($query); $modID = $db->loadResult(); $query = "REPLACE INTO `#__modules_menu` (`moduleid`,`menuid`) VALUES ($modID, 0)"; $db->setQuery($query); $db->query(); // -- System Restore Point support $installer = new JInstaller; $result = $installer->install($src.DS.'plg_srp'); $status->plugins[] = array('name'=>'plg_srp','group'=>'system', 'result'=>$result); /* if($result) { if( version_compare( JVERSION, '1.6.0', 'ge' ) ) { $query = "UPDATE #__extensions SET enabled=1 WHERE element='srp' AND folder='system'"; $db->setQuery($query); $db->query(); } else { $query = "UPDATE #__plugins SET published=1 WHERE element='srp' AND folder='system'"; $db->setQuery($query); $db->query(); } } */ // -- One click action $installer = new JInstaller; $result = $installer->install($src.DS.'plg_oneclickaction'); $status->plugins[] = array('name'=>'plg_oneclickaction','group'=>'system', 'result'=>$result); if($result) { if( version_compare( JVERSION, '1.6.0', 'ge' ) ) { $query = "UPDATE #__extensions SET ordering=-31000 WHERE element='oneclickaction' AND folder='system'"; $db->setQuery($query); $db->query(); /* $query = "UPDATE #__extensions SET enabled=1 WHERE element='oneclickaction' AND folder='system'"; $db->setQuery($query); $db->query(); */ } else { $query = "UPDATE #__plugins SET ordering=-31000 WHERE element='oneclickaction' AND folder='system'"; $db->setQuery($query); $db->query(); /* $query = "UPDATE #__plugins SET published=1 WHERE element='oneclickaction' AND folder='system'"; $db->setQuery($query); $db->query(); */ } } // -- Akeeba Backup update check $installer = new JInstaller; $result = $installer->install($src.DS.'plg_akeebaupdatecheck'); $status->plugins[] = array('name'=>'plg_akeebaupdatecheck','group'=>'system', 'result'=>$result); /* if($result) { if( version_compare( JVERSION, '1.6.0', 'ge' ) ) { $query = "UPDATE #__extensions SET enabled=1 WHERE element='akeebaupdatecheck' AND folder='system'"; $db->setQuery($query); $db->query(); } else { $query = "UPDATE #__plugins SET published=1 WHERE element='akeebaupdatecheck' AND folder='system'"; $db->setQuery($query); $db->query(); } } */ // Install modules and plugins -- END // Load the translation strings (Joomla! 1.5 and 1.6 compatible) if( version_compare( JVERSION, '1.6.0', 'lt' ) ) { global $j15; // Joomla! 1.5 will have to load the translation strings $j15 = true; $jlang =& JFactory::getLanguage(); $path = JPATH_ADMINISTRATOR.DS.'components'.DS.'com_akeeba'; $jlang->load('com_akeeba.sys', $path, 'en-GB', true); $jlang->load('com_akeeba.sys', $path, $jlang->getDefault(), true); $jlang->load('com_akeeba.sys', $path, null, true); } else { $j15 = false; } if(!function_exists('pitext')) { function pitext($key) { global $j15; $string = JText::_($key); if($j15) { $string = str_replace('"_QQ_"', '"', $string); } echo $string; } } if(!function_exists('pisprint')) { function pisprint($key, $param, $param2 = null) { global $j15; $string = is_null($param2) ? JText::sprintf($key, $param) : JText::sprintf($key, $param, $param2); if($j15) { $string = str_replace('"_QQ_"', '"', $string); } echo $string; } } // Finally, show the installation results form ?>
", $errors); ?>
modules)) : ?>
modules as $module) : ?>
plugins)) : ?>
plugins as $plugin) : ?>