Parse error in optimize extension fixed
authorRoland Häder <roland@mxchange.org>
Sun, 31 Aug 2008 16:14:05 +0000 (16:14 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 31 Aug 2008 16:14:05 +0000 (16:14 +0000)
inc/language/optimize_de.php
inc/modules/admin/what-optimize.php
inc/modules/admin/what-send_newsletter.php

index 86946fa..4f2f778 100644 (file)
@@ -45,6 +45,7 @@ define('OPTIMIZE_OPTIMIZED', "Optimiert");
 define('OPTIMIZE_TOTAL_SIZE', "Gesamtgr&ouml;sse");
 define('OPTIMIZE_GAIN_SIZE', "Eingespart");
 define('OPTIMIZE_STATUS_OK', "Nein");
+define('OPTIMIZE_STATUS_UNSUPPORTED', "Nicht m&ouml;glich");
 define('OPTIMIZE_STATUS_OPTIMIZED', "Optimiert!");
 define('OPTIMIZE_DB_TOTAL_TABLES', "Gesamtzahl angelegter Tabellen");
 define('OPTIMIZE_DB_TOTAL_SIZE', "Gesamtgr&ouml;&szlig;e der Datenbank");
index be5a6e3..2c88f2a 100644 (file)
@@ -51,15 +51,17 @@ foreach ($DATA['tables'] as $row_array)
        if (empty($row_array[1])) $row_array[1] = "NONE";
        $eval = "\$REP = OPTIMIZE_STATUS_".strtoupper($row_array[1]).";";
        eval($eval); $B1 = ""; $B2 = "";
+       $OPT = OPTIMIZE_STATUS_UNSUPPORTED;
        if ($row_array[4] > 0)
        {
                $OPT = OPTIMIZE_STATUS_OPTIMIZED;
                $B1 = "<STRONG>"; $B2 = "<STRONG>";
                $gain_tabs++;
        }
-        else
+        elseif (count(explode(" ", $row_array[2])) == 0)
        {
                $eval = "\$OPT = OPTIMIZE_STATUS_".strtoupper($row_array[2]).";";
+               die($eval);
                eval($eval);
        }
 
index 9a43778..6354125 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
+
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));