public function __construct(array &$data, array $rules, array $messages) { $this->data = $data; $this->rules = $rules; $this->messages = $messages; $this->scale = ConfigData::getConfig()['scale']; }
private static function initLangData() { $config = ConfigData::getConfig(); if (empty($config['lang'])) { self::$lang = self::$def_lang; return; } $lang_file = ConfigData::baseDir() . '/' . $config['lang']; if (!file_exists($lang_file)) { $lang_file = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $lang_file); throw new \Exception("The file '{$lang_file}' was not found"); } $lang_data = (require_once $lang_file); if (!is_array($lang_data) || empty($lang_data)) { throw new \Exception("The file '{$lang_file}' must return a non-empty array"); } self::$lang = $lang_data; }
<?php define('ROOT', dirname(__DIR__)); include ROOT . '/include/common.php'; Logger::set_name("cron_start_country"); echo date("Y-m-d H:i:s") . "|cron_start_country start \n"; $server_id = ConfigData::get('app|server_id', 1, TRUE); $static_country_list = StaticData::read('country_list'); if (!isset($static_country_list[$server_id])) { echo "This server_id is no longer war in the country \n"; exit; } $scountry = array(); foreach ($static_country_list as $ckey => $cval) { if ($cval != $static_country_list[$server_id]) { continue; } $scountry[] = $ckey; } sort($scountry); reset($scountry); /*if(current($scountry) != $server_id){ echo "This crontab Return to normal\n"; exit; }*/ $uid = 'de721bcef5cba1fc182d186d98afe072'; list($player, $ret) = Player::instance($uid); $player_country_handle = $player->get_player_class_handle('country'); $player_country_handle->removeprev(); $player_country_handle->initinfo(); echo date("Y-m-d H:i:s") . "|cron_start_country end \n";
<li> <b>Don't forget security updates!</b> Keep an eye on the <a href="http://lists.wikimedia.org/mailman/listinfo/mediawiki-announce">low-traffic release announcements mailing list</a>. </li> </ul> <h2>Checking environment...</h2> <p><em>Please include all of the lines below when reporting installation problems.</em></p> <ul class="env-check"> <?php $mainListOpened = true; $endl = "\n"; define('MW_NO_OUTPUT_BUFFER', 1); $conf = new ConfigData(); install_version_checks(); $self = 'Installer'; # Maintenance script name, to please Setup.php print "<li>PHP " . htmlspecialchars(phpversion()) . " installed</li>\n"; error_reporting(0); $phpdatabases = array(); foreach (array_keys($ourdb) as $db) { $compname = $ourdb[$db]['compile']; if (extension_loaded($compname) || mw_have_dl() && dl("{$compname}." . PHP_SHLIB_SUFFIX)) { array_push($phpdatabases, $db); $ourdb[$db]['havedriver'] = 1; } } error_reporting(E_ALL | E_STRICT); if (!$phpdatabases) {
public static function getPhpMailer() { // Setup mailer for sending message $mail = new \PHPMailer(); $mail->isSMTP(); $mail->isHTML(true); $mailerSettings = array("SMTP_SMTP_DEBUG" => 'SMTPDebug', "SMTP_DEBUGOUTPUT" => "Debugoutput", "SMTP_SECURE" => "SMTPSecure", "SMTP_AUTH" => "SMTPAuth", "SMTP_SERVER_HOST" => "Host", "SMTP_SERVER_PORT" => "Port", "SMTP_SERVER_USERNAME" => "Username", "SMTP_SERVER_PASSWORD" => "Password"); foreach ($mailerSettings as $name => $value) { $var = ConfigData::getVariableByName($name); if ($var && $var->disabled != 1) { $mail->{$value} = $var->value; } else { self::logMailError(LOG_WARNING, "ERROR RETRIEVING SMTP SETTING <{$name}>"); } } return $mail; }