aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LocalFilesEditor/functions.inc.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-10-21 23:46:13 +0000
committerpatdenice <patdenice@piwigo.org>2008-10-21 23:46:13 +0000
commit33322d4bd0f5e957a866926ff891c662ca825475 (patch)
tree538ab30a415a6897bd157ec2652348987b387c70 /plugins/LocalFilesEditor/functions.inc.php
parent463c101a284671eed62108fb90b08398fdd6a93d (diff)
- Move upgrade.tpl to admin template.
- Deactivate all active plugins during upgrade.php. - Update Editarea for LocalFiles Editor to version 0.7.2.3 (bonEcho compatibility) git-svn-id: http://piwigo.org/svn/trunk@2787 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/LocalFilesEditor/functions.inc.php')
-rw-r--r--plugins/LocalFilesEditor/functions.inc.php17
1 files changed, 2 insertions, 15 deletions
diff --git a/plugins/LocalFilesEditor/functions.inc.php b/plugins/LocalFilesEditor/functions.inc.php
index 97813dce0..63162d5d4 100644
--- a/plugins/LocalFilesEditor/functions.inc.php
+++ b/plugins/LocalFilesEditor/functions.inc.php
@@ -30,22 +30,9 @@
function eval_syntax($code)
{
$code = str_replace(array('<?php', '?>'), '', $code);
- if (function_exists('token_get_all'))
+ if (!@eval('return true;' . $code))
{
- $b = 0;
- foreach (token_get_all($code) as $token)
- {
- if ('{' == $token) ++$b;
- else if ('}' == $token) --$b;
- }
- if ($b) return false;
- else
- {
- ob_start();
- $eval = eval('if(0){' . $code . '}');
- ob_end_clean();
- if ($eval === false) return false;
- }
+ return false;
}
return '<?php' . $code . '?>';
}