<?php use application\core\utils\Cache; Cache::rm('notifyNode');
$sqlFlowData = file_get_contents(PATH_ROOT . './install/data/installFlow.sql'); executeSql($sqlFlowData); } // 为用户添加GUID $users = User::model()->fetchAll(); foreach ($users as $user) { $guid = String::createGuid(); Yii::app()->db->createCommand()->update("{{user}}", array('guid' => $guid), "`uid` = '{$user['uid']}'"); } $cacheArr = array('AuthItem', 'CreditRule', 'Department', 'Ipbanned', 'Nav', 'NotifyNode', 'Role', 'Position', 'PositionCategory', 'Setting', 'UserGroup'); foreach ($cacheArr as $cache) { Cache::update($cache); } Cache::load('usergroup'); // 要注意小写 Cache::update('Users'); // 因为用户缓存要依赖usergroup缓存,所以放在最后单独更新 file_put_contents(PATH_ROOT . 'data/install.lock', ''); $configfile = CONFIG_PATH . 'config.php'; $config = (require $configfile); $host = getHostInfo(); //设置aeskey并保存 $aeskey = substr(md5($_SERVER['SERVER_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $host . $dbName . $dbAccount . $dbPassword . $dbPre . time()), 14, 10) . random(33); Setting::model()->updateSettingValueByKey('aeskey', $aeskey); $bindingSrc = Wx::getInstance()->getBindingSrc($aeskey, $host, true); include 'extInfo.php'; exit; } else { if ($option == 'tablepreCheck') { $dbHost = $_POST['dbHost']; $dbAccount = $_POST['dbAccount'];
<?php use application\core\utils\Cache; use application\modules\dashboard\model\CreditRule; use application\modules\recruit\model\ResumeStats; defined('IN_MODULE_ACTION') or die('Access Denied'); Cache::update(array('setting', 'nav')); $creditExists = CreditRule::model()->countByAttributes(array('action' => 'addresume')); if (!$creditExists) { $data = array('rulename' => '添加简历', 'action' => 'addresume', 'cycletype' => '3', 'rewardnum' => '1', 'extcredits1' => '0', 'extcredits2' => '1', 'extcredits3' => '1'); CreditRule::model()->add($data); } // 添加一条过去的空统计数据,用于招聘统计定时任务的参照物 ResumeStats::model()->add(array('new' => 0, 'pending' => 0, 'interview' => 0, 'employ' => 0, 'eliminate' => 0, 'datetime' => strtotime(date('Y-m-d')) - 86400));