From 8d9d904c67d23c007ec33b3758b5931fe0b12bdf Mon Sep 17 00:00:00 2001 From: patdenice Date: Tue, 21 Oct 2008 23:48:48 +0000 Subject: Merge from trunk 2787: - 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/branches/2.0@2788 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/LocalFilesEditor/functions.inc.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'plugins/LocalFilesEditor/functions.inc.php') 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(''), '', $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 ''; } -- cgit v1.2.3