function do_version() { global $fr_version, $fr_platform; if (file_exists(MCWD . '/sitekey.php')) { require_once MCWD . '/sitekey.php'; } else { if (file_exists(MCWD . '/vb_sitekey.php')) { require_once MCWD . '/vb_sitekey.php'; } } $push = Api_InterfaceAbstract::instance()->callApi('cron', 'fetchByVarName', array('forumrunnerpush')); $push_enabled = $push['active'] && $push['product'] == 'forumrunner'; return array('version' => $fr_version, 'platform' => $fr_platform, 'push_enabled' => $push_enabled, 'charset' => get_local_charset(), 'sitekey_setup' => !$mykey || $mykey == '' ? false : true); }
function do_version() { global $fr_version, $fr_platform, $vbulletin; if (file_exists(MCWD . '/sitekey.php')) { require_once MCWD . '/sitekey.php'; } else { if (file_exists(MCWD . '/vb_sitekey.php')) { require_once MCWD . '/vb_sitekey.php'; } } // See if they have the appropriate push entries $push = $vbulletin->db->query_first_slave("\n\tSELECT cronid\n\tFROM " . TABLE_PREFIX . "cron\n\tWHERE product = 'forumrunner' AND varname = 'forumrunnerpush' AND active=1\n "); return array('version' => $fr_version, 'platform' => $fr_platform, 'push_enabled' => $push ? true : false, 'charset' => get_local_charset(), 'sitekey_setup' => !$mykey || $mykey == '' ? false : true); }
function prepare_remote_utf8_string($str) { $charset = get_local_charset(); if (strtolower($charset) == 'utf-8') { return $str; } if (is_ipb()) { return IPSText::convertCharsets($str, 'utf-8', $charset); } $str = html_entity_decode_utf8($str, true); $converted = false; if (function_exists('mb_convert_encoding') && !$converted) { $out = @mb_convert_encoding($str, 'HTML-ENTITIES', 'UTF-8'); $out = @mb_convert_encoding($out, $charset, 'UTF-8'); if (mb_strlen(trim($out)) > 0) { $converted = true; } } if (function_exists('iconv') && !$converted) { $out = @iconv('UTF-8', $charset . '//TRANSLIT', $str); if ($out !== false) { $converted = true; } } if (!$converted) { $out = $str; } $out = escape_non_numerical_entities($out, $charset); return $out; }