Changeset 607 for branches/1.3


Ignore:
Timestamp:
2009-07-05T08:03:56+02:00 (5 years ago)
Author:
moo
Message:

merged 418,r419,r424,r425,r429,r431 from trunk

Location:
branches/1.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/admin/common.php

    r604 r607  
    7575} 
    7676 
     77function stripaddslashes_array($value, $mqs = false) 
     78{ 
     79    if (is_array($value)) { 
     80        foreach($value as $k => $v) { 
     81            $value[$k] = stripaddslashes_array($v, $mqs); 
     82        } 
     83    } 
     84    else if(is_string($value)) { 
     85        $value = $mqs ? str_replace('\'\'', '\'', $value) : stripslashes($value); 
     86    } 
     87    return $value; 
     88} 
     89 
    7790error_reporting(E_ALL); 
    7891ini_set('display_errors', 'On'); 
    7992define('REQUEST_TIME', time()); 
     93 
     94if (get_magic_quotes_gpc()) { 
     95    $mqs = (bool) ini_get('magic_quotes_sybase'); 
     96    $_GET = stripaddslashes_array($_GET, $mqs); 
     97    $_POST = stripaddslashes_array($_POST, $mqs); 
     98    $_REQUEST = stripaddslashes_array($_REQUEST, $mqs); 
     99} 
     100ini_set('magic_quotes_runtime', '0'); 
    80101 
    81102$charset = "UTF-8"; 
  • branches/1.3/admin/edit.php

    r604 r607  
    1212 
    1313if ($_SERVER['REQUEST_METHOD'] == 'POST') { 
    14     xcache_set($name, $_POST['value']); 
     14    eval('$value = ' . $_POST['value']); 
     15    xcache_set($name, $value); 
    1516    header("Location: xcache.php?type=" . XC_TYPE_VAR); 
    1617    exit; 
    1718} 
    18 $value = xcache_get($name); 
     19$value = var_export(xcache_get($name), true); 
    1920 
    2021$xcache_version = XCACHE_VERSION; 
  • branches/1.3/coverager/common.php

    r394 r607  
    7575} 
    7676 
     77function stripaddslashes_array($value, $mqs = false) 
     78{ 
     79    if (is_array($value)) { 
     80        foreach($value as $k => $v) { 
     81            $value[$k] = stripaddslashes_array($v, $mqs); 
     82        } 
     83    } 
     84    else if(is_string($value)) { 
     85        $value = $mqs ? str_replace('\'\'', '\'', $value) : stripslashes($value); 
     86    } 
     87    return $value; 
     88} 
     89 
    7790error_reporting(E_ALL); 
    7891ini_set('display_errors', 'On'); 
    7992define('REQUEST_TIME', time()); 
     93 
     94if (get_magic_quotes_gpc()) { 
     95    $mqs = (bool) ini_get('magic_quotes_sybase'); 
     96    $_GET = stripaddslashes_array($_GET, $mqs); 
     97    $_POST = stripaddslashes_array($_POST, $mqs); 
     98    $_REQUEST = stripaddslashes_array($_REQUEST, $mqs); 
     99} 
     100ini_set('magic_quotes_runtime', '0'); 
    80101 
    81102$charset = "UTF-8"; 
Note: See TracChangeset for help on using the changeset viewer.