]> git.mxchange.org Git - mailer.git/commitdiff
Installation phase fixed (even more):
authorRoland Häder <roland@mxchange.org>
Mon, 1 Oct 2012 22:18:16 +0000 (22:18 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 1 Oct 2012 22:18:16 +0000 (22:18 +0000)
- Fixed handling of flushing filters while in installation phase. This didn't
  let all registered filters by extensions flush to database
- Added stubs for upcoming rewrite of install-inc.php
- Commented out very noisy debug line
- TODOs.txt updated

.gitattributes
DOCS/TODOs.txt
inc/extensions-functions.php
inc/filters.php
inc/install/.htaccess [new file with mode: 0644]
inc/install/install-inc_ [new file with mode: 0644]

index 69ce45db49013fb1518c9da7167a13b51d13de47..6ca8e40900f34d77e8305d4af2e6fa5e7a6a23e8 100644 (file)
@@ -263,6 +263,8 @@ inc/img/.htaccess svneol=native#text/plain
 inc/inc-functions.php svneol=native#text/plain
 inc/install-functions.php svneol=native#text/plain
 inc/install-inc.php svneol=native#text/plain
+inc/install/.htaccess svneol=native#text/plain
+inc/install/install-inc_ svneol=native#text/plain
 inc/js/.htaccess svneol=native#text/plain
 inc/js/js- svneol=native#text/plain
 inc/js/js-admin_ajax.php svneol=native#text/plain
index 423b8bc3dc0d6dff593ce91c747d4e12848b5386..b4f89f440e2ba419663476df4d9c897e810a606a 100644 (file)
 ./inc/template-functions.php:285:      // @TODO Remove these sanity checks if all is fine
 ./inc/template-functions.php:598:// @TODO $simple/$constants are deprecated
 ./inc/template-functions.php:696:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
-./inc/wrapper-functions.php:2956:      // @TODO Find a way to not use direct module comparison
+./inc/wrapper-functions.php:2968:      // @TODO Find a way to not use direct module comparison
 ./inc/wrapper-functions.php:494:// @TODO Do some more sanity check here
 ./inc/xml-functions.php:208:   // @TODO Handle characters
 ./mailid.php:102:              // @TODO Rewrite this to a filter
index 184df7cd0241086ba31ec8380413012b2a4f8f61..022440a79d11d45a60b5bffcea6e415d7c733759 100644 (file)
@@ -1571,7 +1571,7 @@ function addExtensionSql ($sql) {
        } // END - if
 
        // Add it
-       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName() . ',ext_version=' . getCurrentExtensionVersion() . ',sql=' . $sql);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName() . ',ext_version=' . getCurrentExtensionVersion() . ',sql=' . $sql);
        array_push($GLOBALS['ext_sqls'][getCurrentExtensionName()][getCurrentExtensionVersion()], $sql);
 }
 
index 2bfb3495874b9c252c5bda4366eac5134bb994ef..3437775a70f523623ba8ef4c234d692b208c5a7d 100644 (file)
@@ -45,21 +45,17 @@ function FILTER_FLUSH_FILTERS () {
        // Clear all previous SQL queries
        initSqls();
 
-       // Are we installing?
-       if ((isInstallationPhase())) {
-               // Then silently skip this filter
-               return true;
-       } // END - if
-
        // Is a database link here and not in installation mode?
-       if ((!SQL_IS_LINK_UP()) && (!isInstalling())) {
+       if ((!SQL_IS_LINK_UP()) && (!isInstallationPhase())) {
                // Abort here
                reportBug(__FUNCTION__, __LINE__, 'No database link is up. Cannot flush filters.');
-               return false;
-       } // END - if
+       } elseif ((isInstallationPhase()) && (!SQL_IS_LINK_UP())) {
+               // If the link is not up in installation phase, skip flushing filters
+               return;
+       }
 
-       // Is the extension ext-sql_patches updated?
-       if ((!isExtensionInstalled('sql_patches')) || (isExtensionInstalledAndOlder('sql_patches', '0.5.9'))) {
+       // Is the extension ext-sql_patches updated and not in installation phase?
+       if ((!isInstallationPhase()) && ((!isExtensionInstalled('sql_patches')) || (isExtensionInstalledAndOlder('sql_patches', '0.5.9')))) {
                // Log only in debug mode
                if (isDebugModeEnabled()) {
                        logDebugMessage(__FUNCTION__, __LINE__, 'Cannot flush filters, sql_patches might be missing. isExtensionInstalled()=' . intval(isExtensionInstalled('sql_patches')) . ',isExtensionInstalledAndOlder()=' . intval(isExtensionInstalledAndOlder('sql_patches', '0.5.9')));
diff --git a/inc/install/.htaccess b/inc/install/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/install/install-inc_ b/inc/install/install-inc_
new file mode 100644 (file)
index 0000000..9449a58
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/02/2012 *
+ * ===================                          Last change: 10/02/2012 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : install-inc_                                     *
+ * -------------------------------------------------------------------- *
+ * Short description : Installation page include file                   *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Include-Datei fuer Installationsseite            *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!isInstallationPhase())) {
+       die();
+} // END - if
+
+// [EOF]
+?>