function product_version() { if (INSTALL_MODULE_DONE) { $CI =& get_instance(); if ($CI->pg_module->is_module_installed('start')) { $current_version_code = $CI->pg_module->get_module_config('start', 'product_version_code'); $current_version_name = $CI->pg_module->get_module_config('start', 'product_version_name'); $formated_current_version = str_replace('_', '.', $current_version_name); $cache_new_version_code = $CI->pg_module->get_module_config('start', 'product_version_code_update'); $cache_new_version_name = $CI->pg_module->get_module_config('start', 'product_version_name_update'); $last_update = $CI->pg_module->get_module_config('start', 'product_version_last_update'); if ((!$cache_new_version_code || $cache_new_version_code == $current_version_code) && (!$last_update || time() - strtotime($last_update) > 24 * 60 * 60)) { try { $new_version = get_new_version($current_version); $cache_new_version_code = intval($new_version['code']); $cache_new_version_name = $new_version['name']; $CI->pg_module->set_module_config('start', 'product_version_last_update', date('Y-m-d H:i:s')); } catch (Exception $e) { } } if ($cache_new_version_code && $current_version_code < $cache_new_version_code) { $formated_new_version = str_replace('_', '.', $cache_new_version_name); } else { $formated_new_version = ''; } $html = l('system_version', 'start') . ": " . $formated_current_version . " "; if ($formated_new_version) { $html .= str_replace('[version]', $formated_new_version, l('system_version_available', 'start')); } echo $html; } } }
} $smarty->assign('config_info', get_config_info()); $smarty->assign('dir_checking', $dir_checking['detail']); $smarty->assign('has_unwritable_tpl', $has_unwritable_tpl); $smarty->assign('template_checking', $template_checking); $smarty->assign('rename_priv', $rename_priv); $smarty->assign('disabled', $disabled); $smarty->display('checking.php'); break; /* 获得版本列表 */ /* 获得版本列表 */ case 'get_ver_list': include_once ROOT_PATH . 'includes/cls_json.php'; $json = new JSON(); $cur_ver = get_current_version(); $new_ver = get_new_version(); $needup_ver_list = get_needup_version_list($cur_ver, $new_ver); $result = array('msg' => 'OK', 'cur_ver' => $cur_ver, 'needup_ver_list' => $needup_ver_list); echo $json->encode($result); break; /* 获得某个SQL文件的SQL语句数 */ /* 获得某个SQL文件的SQL语句数 */ case 'get_record_number': include_once ROOT_PATH . 'includes/cls_json.php'; $json = new JSON(); $next_ver = isset($_REQUEST['next_ver']) ? $_REQUEST['next_ver'] : ''; $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : ''; if ($next_ver === '' || $type === '') { die('EMPTY'); } $result = array('msg' => 'OK', 'rec_num' => get_record_number($next_ver, $type));
} //on pousuit par la maj des modules if (!$error) { $new_version_branch = ''; $patternVarVersion = '/^1.10/'; // Initialise Upgrade //require_once 'upgrade_init_global.inc.php'; /* * Initialize version variables */ // Current Version $current_version = get_current_version(); $currentClarolineVersion = $current_version['claroline']; $currentDbVersion = $current_version['db']; // New Version $this_new_version = get_new_version(); $new_version = $this_new_version['complete']; $new_version_branch = $this_new_version['branch']; if ($cmd == 'run') { echo '<h2>Etape 4/4:Desactivation des modules incompatibles </h2>'; // DB tables definition $tbl_mdb_names = claro_sql_get_main_tbl(); $tbl_module = $tbl_mdb_names['module']; $tbl_module_info = $tbl_mdb_names['module_info']; $tbl_module_contexts = $tbl_mdb_names['module_contexts']; $modules = claro_sql_query_fetch_all("SELECT label, id, name FROM `{$tbl_module}`"); $deactivatedModules = array(); $readOnlyModules = array('CLDOC', 'CLGRP', 'CLUSR'); foreach ($modules as $module) { $manifest = readModuleManifest(get_module_path($module['label'])); if ($manifest) {
// Manufacturer board name e.g. herring $hardware_board = sanitise($_REQUEST['b'], FULLSCAN); // Manufacturer device name e.g. crespo (Nexus S) $device_name = sanitise($_REQUEST['d'], FULLSCAN); // IMEI code (Last 9 digits stored only) $imei_code = sanitise($_REQUEST['i'], FULLSCAN); // Session Token used for MIUI.com forums $token = sanitise($_REQUEST['t'], FULLSCAN); // Perform version check to see if there is a new version if(current_rom($current_version, $hardware_board, $device_name) == true) { $new_version = get_new_version($current_version, $hardware_board, $device_name); } else { $new_version = $current_version; } // End check new version echo '{ "UserLevel": 9, "LatestVersion": { "type": "rom", "board": "'.$hardware_board.'", "name": "'.get_device_name($hardware_board, $device_name, $new_version).' '.$new_version.'", "acknowledgementUrl": "http://miuiandroid.com/ota/'.$new_ver.'_ack.html", "descriptionUrl": "http://miuiandroid.com/ota/'.$new_ver.'_desc.html",