]> git.mxchange.org Git - mailer.git/commitdiff
Further fixes for installation phase and endless loop
authorRoland Häder <roland@mxchange.org>
Tue, 27 Oct 2009 19:35:52 +0000 (19:35 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 27 Oct 2009 19:35:52 +0000 (19:35 +0000)
12 files changed:
inc/classes/cachesystem.class.php
inc/functions.php
inc/install-inc.php
inc/language/cache_de.php
inc/language/de.php
templates/de/html/install/install_page1.tpl
templates/de/html/install/install_page2.tpl
templates/de/html/install/install_page3.tpl
templates/de/html/install/install_page5.tpl
theme/business/css/install.css
theme/default/css/install.css
theme/desert/css/install.css

index 61a6fe31458002ceeb7b05dd936df47e39297add..6a1992dd9d371e5145304a1a3ad7473df0a69a54 100644 (file)
@@ -115,8 +115,7 @@ class CacheSystem {
                // This will destory an existing cache file!
                if ($this->ret == $this->statusDone) {
                        // Mark it as no longer readable
-                       unset($this->readable[$this->name]);
-                       unset($GLOBALS['file_readable'][$this->fqfn]);
+                       $this->markCacheAsUnreadable();
 
                        // Create file
                        if ($this->isCacheReadable()) changeMode($this->fqfn, 0666);
@@ -130,6 +129,12 @@ class CacheSystem {
                }
        }
 
+       // Mark the cache as unreadable
+       function markCacheAsUnreadable () {
+               unset($this->readable[$this->name]);
+               unset($GLOBALS['file_readable'][$this->fqfn]);
+       }
+
        function addRow ($data) {
                // Is the pointe rvalid?
                if (is_resource($this->pointer)) {
@@ -217,11 +222,17 @@ class CacheSystem {
                } else {
                        // Cache file not found or not readable
                        addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_LOAD'), $this->fqfn));
+
+                       // Try to remove it
+                       $this->removeCacheFile();
                }
        }
 
        // Destroy an existing cache file
        function removeCacheFile ($removeArray = false, $force = false) {
+               // Remove cached value of readable cache
+               $this->markCacheAsUnreadable();
+
                // Debug message
                /* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf("%s should be removed.", $this->name));
 
@@ -251,9 +262,6 @@ class CacheSystem {
                        // Remove cache file from system
                        removeFile($this->fqfn);
 
-                       // No longer readable!
-                       unset($this->readable[$this->name]);
-
                        // Shall we remove the array from memory?
                        if ($removeArray === true) {
                                // Debug message if allowed
index 27dc9ab3493f7e9969f3162673e4b43f8f8124e7..fd2eab7f3dd216f1fccbe8b94ec91c072ea06f23 100644 (file)
@@ -3509,6 +3509,9 @@ function handleFatalErrors () {
                return false;
        } // END - if
 
+       // Set content type
+       setContentType('text/html');
+
        // Load config here
        loadIncludeOnce('inc/load_config.php');
 
@@ -3567,6 +3570,9 @@ function handleFatalErrors () {
                'corr' => $CORR
        );
 
+       // Load footer
+       loadIncludeOnce('inc/header.php');
+
        // Load main template
        loadTemplate('fatal_errors', false, $content);
 
index d4afebe5dfad810ef936fbf17166a88de827967b..e8304bb0c4fe90a78d24af2d9b2aa3712a77296d 100644 (file)
@@ -47,7 +47,10 @@ if (!defined('__SECURITY')) {
 
 // Init variables
 $mysql = array();
-if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) $mysql = postRequestElement('mysql');
+if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) {
+       // Transfer 'mysql' array
+       $mysql = postRequestElement('mysql');
+} // END - if
 
 // Check if both passwords from SMTP are matching
 if ((isGetRequestElementSet('page') && (getRequestElement('page') == 5))) {
@@ -115,7 +118,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                        $content['email']        = postRequestElement('email');
 
                        // Load template
-                       addTemplateToInstallContent('install_page2', false, $content);
+                       addTemplateToInstallContent('install_page2', $content);
                        break;
 
                case '3':
@@ -156,7 +159,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                        $content['smtp_pass2'] = $smtpPass2;
 
                        // Load template
-                       addTemplateToInstallContent('install_page3', false, $content);
+                       addTemplateToInstallContent('install_page3', $content);
                        break;
 
                case '5': // Misc settings
@@ -167,13 +170,6 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                        $content['slogan'] = postRequestElement('slogan');
                        $content['email']  = postRequestElement('email');
 
-                       // MySQL settings
-                       $content['mysql_host']   = $mysql['host'];
-                       $content['mysql_dbase']  = $mysql['dbase'];
-                       $content['mysql_prefix'] = $mysql['prefix'];
-                       $content['mysql_login']  = $mysql['login'];
-                       $content['table_type']   = $mysql['type'];
-
                        // SMTP settings
                        $content['smtp_host'] = postRequestElement('smtp_host');
                        $content['smtp_user'] = postRequestElement('smtp_user');
@@ -183,11 +179,11 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                        $OUT = '';
                        foreach ($mysql as $key => $value) {
                                $OUT .= "    <input type=\"hidden\" name=\"mysql[" . $key . "]\" value=\"" . $value . "\" />\n";
-                       }
+                       } // END - foreach
                        $content['mysql_hidden'] = $OUT;
 
                        // Load template
-                       addTemplateToInstallContent('install_page5', false, $content);
+                       addTemplateToInstallContent('install_page5', $content);
                        break;
 
                case 'finalize': // Write captured data to files
@@ -268,7 +264,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                                        $content['smtp_pass']  = postRequestElement('smtp_pass1');
 
                                        // Load template
-                                       addTemplateToInstallContent('install_fatal_errors', false, $content);
+                                       addTemplateToInstallContent('install_fatal_errors', $content);
                                } else {
                                        // Installation is done!
                                        redirectToUrl('install.php?page=finished');
index 63894b500811e34326dae3d8c14982856c122d88..728dc6550e865d1d021b725aee37757f982d9d35 100644 (file)
@@ -43,11 +43,6 @@ if (!defined('__SECURITY')) {
 
 // Language definitions
 addMessages(array(
-       'CACHE_PROBLEMS_DETECTED' => "Probleme mit dem Cache-Subsystem erkannt!",
-       'CACHE_CANNOT_LOAD' => "Kann nicht Cache-Datei <strong><u>%s</u></strong> laden!",
-       'CACHE_CANNOT_INITIALIZE' => "Konnte das Caching-System nicht initialisieren. Bitte die Dokumentation <strong>DOCS/de/cache/README.txt</strong> lesen!",
-       'CACHE_CANNOT_UNLINK' => "Kann nicht die Cache-Datei <strong><u>%s</u></strong> vom Server entfernen!",
-
 // Administrative settings
        'ADMIN_CACHE_STATS_TITLE' => "Statistiken des Caching-Systems",
        'ADMIN_CACHE_DB_HITS' => "Zugriffe auf die Datenbank",
index 59dc26ca2b7db919a46c08534961974e378f0701..9f3a63206138302b2719700546ef676c804d5a0b 100644 (file)
@@ -1186,6 +1186,12 @@ addMessages(array(
 
 // Missing menu whats
        'MENU_WHAT_404' => "Men&uuml; deaktiviert, da keine Scriptdatei auf dem Server gefunden wurde.",
+
+// Cache messages
+       'CACHE_PROBLEMS_DETECTED' => "Probleme mit dem Cache-Subsystem erkannt!",
+       'CACHE_CANNOT_LOAD' => "Kann nicht Cache-Datei <strong><u>%s</u></strong> laden!",
+       'CACHE_CANNOT_INITIALIZE' => "Konnte das Caching-System nicht initialisieren. Bitte die Dokumentation <strong>DOCS/de/cache/README.txt</strong> lesen!",
+       'CACHE_CANNOT_UNLINK' => "Kann nicht die Cache-Datei <strong><u>%s</u></strong> vom Server entfernen!",
 ));
 
 // Description of all months
index 92fdb6525f4002a09e1c89c4b5d1127992fd8e81..6686d9e87156a8cdcebce59af36efe34f6d60cd0 100644 (file)
                <td colspan="2" height="21" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td align="right" class="install">{--SERVER_PATH--}&nbsp;:&nbsp;</td>
-               <td><input type="text" name="spath" size="20" value="{?PATH?}" class="install_normal" /></td>
+               <td align="right" class="install_right">{--SERVER_PATH--}:</td>
+               <td align="left"><input type="text" name="spath" size="20" value="{?PATH?}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td align="right" class="install">{--BASE_URL--}&nbsp;:&nbsp;
-               ({--BASE_URL_NOTE--})</td>
-               <td><input type="text" name="burl" size="20" value="{?URL?}" class="install_normal" /></td>
+               <td align="right" class="install_right">{--BASE_URL--}&nbsp;({--BASE_URL_NOTE--}):</td>
+               <td align="left"><input type="text" name="burl" size="20" value="{?URL?}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td align="right" class="install">{--HP_TITLE--}&nbsp;:&nbsp;</td>
-               <td><input type="text" name="title" size="20" maxlength="255" value="{?MAIN_TITLE?}" class="install_normal" /></td>
+               <td align="right" class="install_right">{--HP_TITLE--}:</td>
+               <td align="left"><input type="text" name="title" size="20" maxlength="255" value="{?MAIN_TITLE?}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td align="right" class="install">{--HP_SLOGAN--}&nbsp;:&nbsp;</td>
-               <td><input type="text" name="slogan" size="30" maxlength="255" value="{?SLOGAN?}" class="install_normal" /></td>
+               <td align="right" class="install_right">{--HP_SLOGAN--}:</td>
+               <td align="left"><input type="text" name="slogan" size="30" maxlength="255" value="{?SLOGAN?}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td align="right" class="install">{--HP_EMAIL--}&nbsp;:&nbsp;</td>
-               <td><input type="text" name="email" size="20" maxlength="255" value="{?WEBMASTER?}" class="install_normal" /></td>
+               <td align="right" class="install_right">{--HP_EMAIL--}:</td>
+               <td align="left"><input type="text" name="email" size="20" maxlength="255" value="{?WEBMASTER?}" class="install_normal" /></td>
        </tr>
        <tr>
                <td colspan="3" height="21" class="seperator">&nbsp;</td>
index da49d791f55bfc2e61328bc9022668873f13e217..4a2bdbb7026185071de8cb9ada1d8fc984cac75c 100644 (file)
@@ -16,8 +16,8 @@
                <td colspan="2" height="21" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--MYSQL_HOST--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--MYSQL_HOST--}:</td>
+               <td width="50%" align="left">
                        <input type="text" name="mysql[host]" size="25" value="$content[mysql_host]" class="install_normal" />
                </td>
        </tr>
@@ -25,8 +25,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--MYSQL_DBASE--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--MYSQL_DBASE--}:</td>
+               <td width="50%" align="left">
                        <input type="text" name="mysql[dbase]" size="25" value="$content[mysql_dbase]" class="install_normal" />
                </td>
        </tr>
@@ -34,8 +34,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--MYSQL_PREFIX--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--MYSQL_PREFIX--}:</td>
+               <td width="50%" align="left">
                        <input type="text" name="mysql[prefix]" size="25" value="$content[mysql_prefix]" class="install_normal" />
                </td>
        </tr>
@@ -43,8 +43,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--MYSQL_TABLE_TYPE--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--MYSQL_TABLE_TYPE--}:</td>
+               <td width="50%" align="left">
                        <select name="mysql[type]" size="1">
                                <option value="MyISAM">{--TABLE_TYPE_MYISAM--}</option>
                                <option value="InnoDB">{--TABLE_TYPE_INNODB--}</option>
@@ -55,8 +55,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--MYSQL_LOGIN--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--MYSQL_LOGIN--}:</td>
+               <td width="50%" align="left">
                        <input type="text" name="mysql[login]" size="25" value="$content[mysql_login]" class="install_normal" />
                </td>
        </tr>
@@ -64,8 +64,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--MYSQL_PASS1--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--MYSQL_PASS1--}:</td>
+               <td width="50%" align="left">
                        <input type="password" name="mysql[pass1]" size="25" class="install_normal" />
                </td>
        </tr>
@@ -73,8 +73,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--MYSQL_PASS2--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--MYSQL_PASS2--}:</td>
+               <td width="50%" align="left">
                        <input type="password" name="mysql[pass2]" size="25" class="install_normal" />
                </td>
        </tr>
index 8bdd4a52bd737a84d89d4beae9e140cf1a50a817..1f3026b9145d2d54371b5a9a4b154e3513bf0f03 100644 (file)
@@ -16,8 +16,8 @@
                <td colspan="2" height="21" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--TEXT_SMTP_HOST--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--TEXT_SMTP_HOST--}:</td>
+               <td width="50%" align="left">
                  <input type="text" name="smtp_host" size="25" value="$content[smtp_host]" class="install_normal" />
                </td>
        </tr>
@@ -25,8 +25,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--TEXT_SMTP_USER--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--TEXT_SMTP_USER--}:</td>
+               <td width="50%" align="left">
                  <input type="text" name="smtp_user" size="25" value="$content[smtp_user]" class="install_normal" />
                </td>
        </tr>
@@ -34,8 +34,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--TEXT_SMTP_PASS1--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--TEXT_SMTP_PASS1--}:</td>
+               <td width="50%" align="left">
                  <input type="password" name="smtp_pass1" size="25" value="$content[smtp_pass1]" class="install_normal" />
                </td>
        </tr>
@@ -43,8 +43,8 @@
                <td colspan="2" height="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
-               <td width="50%" align="right" class="install">{--TEXT_SMTP_PASS2--}&nbsp;:&nbsp;</td>
-               <td width="50%">
+               <td width="50%" align="right" class="install_right">{--TEXT_SMTP_PASS2--}:</td>
+               <td width="50%" align="left">
                  <input type="password" name="smtp_pass2" size="25" value="$content[smtp_pass2]" class="install_normal" />
                </td>
        </tr>
index 9f80c920e722502c1045e743d56fa04edc01fe69..98844c5f4c64d9140d59fb3bbfcc5676946645b0 100644 (file)
@@ -13,8 +13,8 @@
 </tr>
 <tr><td colspan="2" height="21" class="seperator">&nbsp;</td></tr>
 <tr>
-  <td class="install" align="right">{--LANG_OUTPUT_MODE--}:&nbsp;&nbsp;</td>
-  <td>
+  <td align="right" class="install_right">{--LANG_OUTPUT_MODE--}:</td>
+  <td align="left">
     <select name="omode" size="1" class="install_select">
       <option value="render">{--MODE_RENDER--}</option>
       <option value="direct">{--MODE_DIRECT--}</option>
@@ -23,8 +23,8 @@
 </tr>
 <tr><td colspan="2" height="10" class="seperator">&nbsp;</td></tr>
 <tr>
-  <td class="install" align="right">{--WARN_NO_PASSWORD--}:&nbsp;&nbsp;</td>
-  <td>
+  <td align="right" class="install_right">{--WARN_NO_PASSWORD--}:</td>
+  <td align="left">
     <select name="warn_no_pass" size="1" class="install_select">
       <option value="Y">{--YES--}</option>
       <option value="N">{--NO--}</option>
@@ -33,8 +33,8 @@
 </tr>
 <tr><td colspan="2" height="10" class="seperator">&nbsp;</td></tr>
 <tr>
-  <td class="install" align="right">{--LANG_WRITE_FOOTER--}:&nbsp;&nbsp;</td>
-  <td>
+  <td align="right" class="install_right">{--LANG_WRITE_FOOTER--}:</td>
+  <td align="left">
     <select name="wfooter" size="1" class="install_select">
       <option value="Y">{--YES--}</option>
       <option value="N">{--NO--}</option>
@@ -43,8 +43,8 @@
 </tr>
 <tr><td colspan="2" height="10" class="seperator">&nbsp;</td></tr>
 <tr>
-  <td class="install" align="right">{--INSTALL_ENABLE_BACKLINK--}:&nbsp;&nbsp;</td>
-  <td>
+  <td align="right" class="install_right">{--INSTALL_ENABLE_BACKLINK--}:</td>
+  <td align="left">
     <select name="blink" size="1" class="install_select">
       <option value="Y">{--YES--}</option>
       <option value="N">{--NO--}</option>
index 866e5d46b9395f70b0c72ab07774b68b9b798838..f3c23b087eeaf823d4ea872ae3e794a1a9400591 100644 (file)
@@ -74,3 +74,8 @@
        padding-top: 5px;
        padding-bottom: 10px;
 }
+
+.install_right {
+       text-align: right;
+       padding-right: 5px;
+}
index a8d5167b0f870488960932492958446fe444c12f..efe55dee63dd4542f0c42473ee400023b17f68fa 100644 (file)
@@ -82,3 +82,8 @@
 .install_footer {
        padding-bottom: 10px;
 }
+
+.install_right {
+       text-align: right;
+       padding-right: 5px;
+}
index caf27417bd6b7bf49f6a5d7de4b41a2683f1731d..9b0a3b8c785892497e8f3c3223ea9c11f0a5405f 100644 (file)
@@ -77,4 +77,9 @@
 .install_welcome {
        padding-top: 5px;
        padding-bottom: 10px;
-}
\ No newline at end of file
+}
+
+.install_right {
+       text-align: right;
+       padding-right: 5px;
+}