Changeset 591
- Timestamp:
- 2009-04-16T10:43:35+02:00 (4 years ago)
- Location:
- trunk/admin
- Files:
-
- 3 edited
-
config.php.example (modified) (1 diff)
-
edit.php (modified) (1 diff)
-
edit.tpl.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/config.php.example
r526 r591 16 16 // do not define both with 17 17 // $free_graph_width = 120; 18 19 // only enable if you have password protection for admin page 20 // enabling this option will cause user to eval() whatever code they want 21 $enable_eval = false; 18 22 19 23 // this function is detected by xcache.tpl.php, and enabled if function_exists -
trunk/admin/edit.php
r419 r591 12 12 13 13 if ($_SERVER['REQUEST_METHOD'] == 'POST') { 14 eval('$value = ' . $_POST['value']); 14 if ($enable_eval) { 15 eval('$value = ' . $_POST['value']); 16 } 17 else { 18 $value = $_POST['value']; 19 } 15 20 xcache_set($name, $value); 16 21 header("Location: xcache.php?type=" . XC_TYPE_VAR); 17 22 exit; 18 23 } 19 $value = var_export(xcache_get($name), true); 24 $value = xcache_get($name); 25 if ($enable_eval) { 26 $value = var_export($value, true); 27 $editable = true; 28 } 29 else { 30 $editable = is_string($value); 31 } 20 32 21 33 $xcache_version = XCACHE_VERSION; -
trunk/admin/edit.tpl.php
r371 r591 7 7 <fieldset> 8 8 <legend><?php echo sprintf(_T("Editing Variable %s"), $h_name); ?></legend> 9 <textarea name="value" style="width: 100%; height: 200px; overflow-y: auto" ><?php echo $h_value; ?></textarea><br>9 <textarea name="value" style="width: 100%; height: 200px; overflow-y: auto" <?php echo $editable ? "" : "disabled=disabled"; ?>><?php echo $h_value; ?></textarea><br> 10 10 <input type="submit"> 11 11 </fieldset>
Note: See TracChangeset
for help on using the changeset viewer.

