function stripslashes_recursively(&$array)
{
    foreach ($array as $k => $v) {
        if (is_array($v)) {
            stripslashes_recursively($array[$k]);
        } else {
            $array[$k] = stripslashes($v);
        }
    }
}
Example #2
0
function stripslashes_recursively(&$array)
{
    trigger_error('stripslashes_recursively is deprecated in 3.2', E_USER_DEPRECATED);
    foreach ($array as $k => $v) {
        if (is_array($v)) {
            stripslashes_recursively($array[$k]);
        } else {
            $array[$k] = stripslashes($v);
        }
    }
}
Example #3
0
    $_SERVER['SCRIPT_NAME'] = $nameMatch[1];
    $envType = 'dev';
} elseif (preg_match('/\\/sites\\/[^\\/]+\\/www(.*)/', $_SERVER['SCRIPT_FILENAME'], $nameMatch)) {
    $_SERVER['SCRIPT_NAME'] = $nameMatch[1];
    $envType = 'live';
} elseif (preg_match('/\\/sites\\/[^\\/]+(.*)/', $_SERVER['SCRIPT_FILENAME'], $nameMatch)) {
    $_SERVER['SCRIPT_NAME'] = $nameMatch[1];
} elseif (isset($_SERVER['SCRIPT_NAME'])) {
    $envType = 'live';
} else {
    echo "Error: could not determine server configuration {$_SERVER['SCRIPT_FILENAME']}\n";
    exit;
}
$baseURL = dirname(dirname($_SERVER['SCRIPT_NAME']));
if ($_REQUEST && get_magic_quotes_gpc()) {
    stripslashes_recursively($_REQUEST);
}
if (isset($_REQUEST['trace'])) {
    apd_set_pprof_trace();
}
require_once "core/ManifestBuilder.php";
require_once "core/ClassInfo.php";
require_once 'core/Object.php';
require_once 'core/control/Director.php';
require_once 'filesystem/Filesystem.php';
require_once "core/Session.php";
Session::start();
$envFiles = array('../_ss_environment.php', '../../_ss_environment.php', '../../../_ss_environment.php');
foreach ($envFiles as $envFile) {
    if (file_exists($envFile)) {
        include $envFile;
Example #4
0
 */
require_once "core/Core.php";
header("Content-type: text/html; charset=\"utf-8\"");
if (function_exists('mb_http_output')) {
    mb_http_output('UTF-8');
    mb_internal_encoding('UTF-8');
}
if (get_magic_quotes_gpc()) {
    if ($_REQUEST) {
        stripslashes_recursively($_REQUEST);
    }
    if ($_GET) {
        stripslashes_recursively($_GET);
    }
    if ($_POST) {
        stripslashes_recursively($_POST);
    }
}
if (isset($_REQUEST['trace'])) {
    apd_set_pprof_trace();
}
// Ensure we have enough memory
$memString = ini_get("memory_limit");
switch (strtolower(substr($memString, -1))) {
    case "k":
        $memory = round(substr($memString, 0, -1) * 1024);
        break;
    case "m":
        $memory = round(substr($memString, 0, -1) * 1024 * 1024);
        break;
    case "g":