]> git.mxchange.org Git - mailer.git/commitdiff
Several double->single convertions, fix for missing constant '_MYSQL_PREFIX' which...
authorRoland Häder <roland@mxchange.org>
Wed, 29 Jul 2009 21:56:28 +0000 (21:56 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 29 Jul 2009 21:56:28 +0000 (21:56 +0000)
inc/functions.php
inc/modules/admin/what-config_cache.php
inc/modules/guest/what-wernis_portal.php
inc/rdf.class.php
templates/de/html/admin/admin_config_cache.tpl

index 10b4d02d329c05dc548ad0e5d24520cf9cafd306..ea7a4297b03927ff325b6421940c3a9febd05982 100644 (file)
@@ -120,6 +120,9 @@ function OUTPUT_HTML ($HTML, $newLine = true) {
 
                // Compile and run finished rendered HTML code
                while (strpos($OUTPUT, '{!') > 0) {
+                       // Replace _MYSQL_PREFIX
+                       $OUTPUT = str_replace("{!_MYSQL_PREFIX!}", getConfig('_MYSQL_PREFIX'), $OUTPUT);
+
                        // Prepare the content and eval() it...
                        $newContent = '';
                        $eval = "\$newContent = \"".COMPILE_CODE(smartAddSlashes($OUTPUT))."\";";
@@ -128,7 +131,7 @@ function OUTPUT_HTML ($HTML, $newLine = true) {
                        // Was that eval okay?
                        if (empty($newContent)) {
                                // Something went wrong!
-                               app_die(__FUNCTION__, __LINE__, "Evaluation error:<pre>".htmlentities($eval)."</pre>");
+                               app_die(__FUNCTION__, __LINE__, 'Evaluation error:<pre>' . htmlentities($eval) . '</pre>');
                        } // END - if
                        $OUTPUT = $newContent;
                } // END - while
index 59a6723c89a176aa1c2da3f511f54ae4f3b7b719..59ac1df1d08fa6cb6f4f0c452c41174c9a433358 100644 (file)
@@ -40,7 +40,7 @@
 if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-}
+} // END - if
 
 // Add description as navigation point
 ADD_DESCR('admin', __FILE__);
@@ -53,40 +53,41 @@ if (isFormSent()) {
        if (REQUEST_POST('cache_path') != getConfig('cache_path')) {
                // Okay, cache path has been altered so we have to test it again!
                REQUEST_SET_POST('cache_tested', 'Y');
-       }
+       } // END - if
 
        if ((REQUEST_POST('cache_admins') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('admins'))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
-       }
+       } // END - if
 
-       if ((REQUEST_POST('cache_acls') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("acls"))) {
+       if ((REQUEST_POST('cache_acls') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('acls'))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
-       }
+       } // END - if
 
-       if ((REQUEST_POST('cache_exts') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("extensions", true))) {
+       if ((REQUEST_POST('cache_exts') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('extensions', true))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
-       }
+       } // END - if
 
-       if ((REQUEST_POST('cache_config') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("config"))) {
+       if ((REQUEST_POST('cache_config') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('config'))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
-       }
+       } // END - if
 
-       if ((REQUEST_POST('cache_modreg') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("modreg"))) {
+       if ((REQUEST_POST('cache_modreg') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('modreg'))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
-       }
+       } // END - if
 
-       if ((REQUEST_POST('cache_refdepth') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("refdepth"))) {
+       if ((REQUEST_POST('cache_refdepth') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('refdepth'))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
-       }
+       } // END - if
 
-       if ((REQUEST_POST('cache_refsys') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("refsys"))) {
+       if ((REQUEST_POST('cache_refsys') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('refsys'))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
-       }
+       } // END - if
 
        // Save configuration
        ADMIN_SAVE_SETTINGS_POST();
 } else {
        // Prepare data
+       // @TODO Rewrite all constants
        switch (getConfig('cache_admins')) {
                case 'Y':
                        define('__ADMINS_Y', ' checked="checked"');
@@ -97,7 +98,7 @@ if (isFormSent()) {
                        define('__ADMINS_Y', '');
                        define('__ADMINS_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        switch (getConfig('cache_acls')) {
                case 'Y':
@@ -109,7 +110,7 @@ if (isFormSent()) {
                        define('__ACLS_Y', '');
                        define('__ACLS_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        switch (getConfig('cache_exts')) {
                case 'Y':
@@ -121,7 +122,7 @@ if (isFormSent()) {
                        define('__EXTS_Y', '');
                        define('__EXTS_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        switch (getConfig('cache_config')) {
                case 'Y':
@@ -133,7 +134,7 @@ if (isFormSent()) {
                        define('__CONFIG_Y', '');
                        define('__CONFIG_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        switch (getConfig('cache_modreg')) {
                case 'Y':
@@ -145,7 +146,7 @@ if (isFormSent()) {
                        define('__MODREG_Y', '');
                        define('__MODREG_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        switch (getConfig('cache_refdepth')) {
                case 'Y':
@@ -157,7 +158,7 @@ if (isFormSent()) {
                        define('__REFDEPTH_Y', '');
                        define('__REFDEPTH_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        switch (getConfig('cache_refsys')) {
                case 'Y':
@@ -169,7 +170,7 @@ if (isFormSent()) {
                        define('__REFSYS_Y', '');
                        define('__REFSYS_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        switch (getConfig('cache_themes')) {
                case 'Y':
@@ -181,7 +182,7 @@ if (isFormSent()) {
                        define('__THEMES_Y', '');
                        define('__THEMES_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        switch (getConfig('cache_admin_menu')) {
                case 'Y':
@@ -193,12 +194,12 @@ if (isFormSent()) {
                        define('__ADMIN_MENU_Y', '');
                        define('__ADMIN_MENU_N', ' checked="checked"');
                        break;
-       }
+       } // END - switch
 
        define('__PATH', getConfig('cache_path'));
 
        // Load template
-       LOAD_TEMPLATE("admin_config_cache");
+       LOAD_TEMPLATE('admin_config_cache');
 }
 
 //
index 9b131e71ab384a20eff42bd078872e0baec4a5d2..567fe1a2b6b29bc292308a68868f7b5451531d52 100644 (file)
@@ -51,19 +51,19 @@ loadIncludeOnce('inc/rdf.class.php');
 // Add description as navigation point
 ADD_DESCR('guest', __FILE__);
 
-OUTPUT_HTML("<div style=\"padding-left: 10px; padding-right: 10px\">");
+OUTPUT_HTML('<div style="padding-left: 10px; padding-right: 10px">');
 $rdf = new fase4_rdf();
 $rdf->use_dynamic_display(false);
-$rdf->set_CacheDir(constant('PATH')."inc/cache/");
+$rdf->set_CacheDir(constant('PATH') . 'inc/cache/');
 $rdf->set_salt(md5(getConfig('SITE_KEY')));
 $rdf->set_max_item(10);
 $rdf->set_Options(
-array(
-               'textinput' => "hidden",
-               'sitelink'  => "http://www.wds66.com",
+       array(
+               'textinput' => 'hidden',
+               'sitelink'  => 'http://www.wds66.com',
                'refid'     => getConfig('wernis_refid'),
-               'reflink'   => "/ref.php?refid=",
-)
+               'reflink'   => '/ref.php?refid=',
+       )
 );
 
 // Use proxy?
@@ -78,12 +78,11 @@ if ((getConfig('proxy_host') != '') && (getConfig('proxy_port') > 0)) {
        } // END  - if
 } // END - if
 
-$rdf->parse_RDF("http://www.wds66.com/rss.xml");
+$rdf->parse_RDF('http://www.wds66.com/rss.xml');
 
-// Fix to avoid "headers already sent" bug. Thanks to Profi-Concept
+// Fix to avoid 'headers already sent' bug. Thanks to Profi-Concept
 OUTPUT_HTML($rdf->finish(true));
-//  @TODO Can this be removed? $rdf->clear_cache();
-OUTPUT_HTML("</div>");
+OUTPUT_HTML('</div>');
 
 //
 ?>
index 17b8050bbea001d2153eb3a7afba4215943fef18..33d82dbc679e6ca10ce4a32ae2898477cbe4665c 100644 (file)
@@ -1000,10 +1000,10 @@ class fase4_rdf {
                        $this->_create_cache_dir();
                }
                if($this->_use_dynamic_display == true) {
-                       $this->_cached_file = md5("dynamic".$this->salt.$this->_remote_file);
+                       $this->_cached_file = md5("dynamic".$this->salt.$this->_remote_file) . '.cache';
                        $this->_cache_type = "normal";
                } else {
-                       $this->_cached_file = md5($this->salt.$this->_remote_file);
+                       $this->_cached_file = md5($this->salt.$this->_remote_file) . '.cache';
                        $this->_cache_type = "fast";
                }
 
index 923b72a276eb93ca15bd5ade4fc5262e949ab571..478af6bd503420e3565020f1406a6a56000aa431 100644 (file)
@@ -8,9 +8,9 @@
                <td colspan="2" class="seperator" height="10">&nbsp;</td>
        </tr>
        <tr>
-               <td class="switch_sw1" align="right" width="350" height="20">
+               <td align="right" width="350" height="20">
                {--ADMIN_CACHE_ADMINS--}</td>
-               <td class="switch_sw1" width="150" style="padding-left: 10px"><input
+               <td width="150" style="padding-left: 10px"><input
                        type="radio" name="cache_admins" value="Y" class="admin_normal"{!__ADMINS_Y!} />&nbsp;{--YES--}
                <input type="radio" name="cache_admins" value="N" class="admin_normal"{!__ADMINS_N!} />&nbsp;{--NO--}&nbsp;
                </td>
@@ -19,9 +19,9 @@
                <td colspan="2" class="seperator" height="10">&nbsp;</td>
        </tr>
        <tr>
-               <td class="switch_sw2" align="right" width="350" height="20">
+               <td align="right" width="350" height="20">
                {--ADMIN_CACHE_ACLS--}</td>
-               <td class="switch_sw2" width="150" style="padding-left: 10px"><input
+               <td width="150" style="padding-left: 10px"><input
                        type="radio" name="cache_acls" value="Y" class="admin_normal"{!__ACLS_Y!} />&nbsp;{--YES--}
                <input type="radio" name="cache_acls" value="N" class="admin_normal"{!__ACLS_N!} />&nbsp;{--NO--}&nbsp;
                </td>