-
+ 31704CD391D31F9A3C4071EB8C33D5D6D1071D9290B77D3A7AC93582C7A9AC34E5C4275AE1BDD98C2622D4308ED44F541FB8DE2E0BDA0DE703FAE53419F76A43mp-wp/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php(0 . 0)(1 . 97)
124202 <?php
124203 /**
124204 * general.php
124205 *
124206 * @package MCManager.includes
124207 * @author Moxiecode
124208 */
124209
124210 @error_reporting(E_ALL ^ E_NOTICE);
124211 $config = array();
124212
124213 require_once(dirname(__FILE__) . "/../classes/utils/Logger.php");
124214 require_once(dirname(__FILE__) . "/../classes/utils/JSON.php");
124215 require_once(dirname(__FILE__) . "/../config.php");
124216 require_once(dirname(__FILE__) . "/../classes/SpellChecker.php");
124217
124218 if (isset($config['general.engine']))
124219 require_once(dirname(__FILE__) . "/../classes/" . $config["general.engine"] . ".php");
124220
124221 /**
124222 * Returns an request value by name without magic quoting.
124223 *
124224 * @param String $name Name of parameter to get.
124225 * @param String $default_value Default value to return if value not found.
124226 * @return String request value by name without magic quoting or default value.
124227 */
124228 function getRequestParam($name, $default_value = false, $sanitize = false) {
124229 if (!isset($_REQUEST[$name]))
124230 return $default_value;
124231
124232 if (is_array($_REQUEST[$name])) {
124233 $newarray = array();
124234
124235 foreach ($_REQUEST[$name] as $name => $value)
124236 $newarray[formatParam($name, $sanitize)] = formatParam($value, $sanitize);
124237
124238 return $newarray;
124239 }
124240
124241 return formatParam($_REQUEST[$name], $sanitize);
124242 }
124243
124244 function &getLogger() {
124245 global $mcLogger, $man;
124246
124247 if (isset($man))
124248 $mcLogger = $man->getLogger();
124249
124250 if (!$mcLogger) {
124251 $mcLogger = new Moxiecode_Logger();
124252
124253 // Set logger options
124254 $mcLogger->setPath(dirname(__FILE__) . "/../logs");
124255 $mcLogger->setMaxSize("100kb");
124256 $mcLogger->setMaxFiles("10");
124257 $mcLogger->setFormat("{time} - {message}");
124258 }
124259
124260 return $mcLogger;
124261 }
124262
124263 function debug($msg) {
124264 $args = func_get_args();
124265
124266 $log = getLogger();
124267 $log->debug(implode(', ', $args));
124268 }
124269
124270 function info($msg) {
124271 $args = func_get_args();
124272
124273 $log = getLogger();
124274 $log->info(implode(', ', $args));
124275 }
124276
124277 function error($msg) {
124278 $args = func_get_args();
124279
124280 $log = getLogger();
124281 $log->error(implode(', ', $args));
124282 }
124283
124284 function warn($msg) {
124285 $args = func_get_args();
124286
124287 $log = getLogger();
124288 $log->warn(implode(', ', $args));
124289 }
124290
124291 function fatal($msg) {
124292 $args = func_get_args();
124293
124294 $log = getLogger();
124295 $log->fatal(implode(', ', $args));
124296 }
124297
124298 ?>