]> git.mxchange.org Git - mailer.git/commitdiff
Introduced ext-cron
authorquix0r <quix0r@mxchange.org>
Sun, 6 Jan 2013 21:30:36 +0000 (21:30 +0000)
committerquix0r <quix0r@mxchange.org>
Sun, 6 Jan 2013 21:30:36 +0000 (21:30 +0000)
.gitattributes
DOCS/TODOs.txt
img.php
inc/extensions/ext-cron.php [new file with mode: 0644]
inc/filter-functions.php
inc/filters.php
inc/img/img-
inc/img/img_ [new file with mode: 0644]
templates/de/html/ext/ext_cron.tpl [new file with mode: 0644]

index 4497996466332d079d6a693f0aa3de2d87307840..50cd70f0e6030160bb210fba7c402f7be5317205 100644 (file)
@@ -180,6 +180,7 @@ inc/extensions/ext-clickbanner.php svneol=native#text/plain
 inc/extensions/ext-country.php svneol=native#text/plain
 inc/extensions/ext-coupon.php svneol=native#text/plain
 inc/extensions/ext-cprping.php svneol=native#text/plain
+inc/extensions/ext-cron.php svneol=native#text/plain
 inc/extensions/ext-currency.php svneol=native#text/plain
 inc/extensions/ext-debug.php svneol=native#text/plain
 inc/extensions/ext-demo.php svneol=native#text/plain
@@ -288,6 +289,7 @@ inc/hourly/hourly_ svneol=native#text/plain
 inc/http-functions.php svneol=native#text/plain
 inc/img/.htaccess svneol=native#text/plain
 inc/img/img- svneol=native#text/plain
+inc/img/img_ 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
@@ -1739,6 +1741,7 @@ templates/de/html/ext/ext_clickbanner.tpl svneol=native#text/plain
 templates/de/html/ext/ext_country.tpl svneol=native#text/plain
 templates/de/html/ext/ext_coupon.tpl svneol=native#text/plain
 templates/de/html/ext/ext_cprping.tpl svneol=native#text/plain
+templates/de/html/ext/ext_cron.tpl svneol=native#text/plain
 templates/de/html/ext/ext_currency.tpl svneol=native#text/plain
 templates/de/html/ext/ext_debug.tpl svneol=native#text/plain
 templates/de/html/ext/ext_demo.tpl svneol=native#text/plain
index 91ca493d0688c691075fe2fae759b094e586e189..222f22f2f16feb9ef0420e41ca70f9fb780e0d8d 100644 (file)
@@ -52,7 +52,8 @@
 ./inc/filter/bonus_filter.php:56:              // @TODO This query isn't right, it will only update if the user was for a longer time away!
 ./inc/filter/cache_filter.php:94:              // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
 ./inc/filter/forced_filter.php:73:             // @TODO This part is unfinished
-./inc/filters.php:1319:                // @TODO No banner found, output some default banner
+./inc/filter-functions.php:117:        // @TODO Remove this forced removal after a year or so
+./inc/filters.php:1320:                // @TODO No banner found, output some default banner
 ./inc/functions.php:1126:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
 ./inc/functions.php:1212:                      // @TODO Are these convertions still required?
 ./inc/functions.php:1233:// @TODO Rewrite this function to use readFromFile() and writeToFile()
diff --git a/img.php b/img.php
index 0325c3f12a15c1917cbebe66a3c472a129740935..f3075ddb3203d63b4d6162502f2647950dc49978 100644 (file)
--- a/img.php
+++ b/img.php
@@ -57,7 +57,7 @@ if (isGetRequestElementSet('code')) {
        generateImageOrCode(bigintval(getRequestElement('code')));
 } elseif (isGetRequestElementSet('img')) {
        // 'img' set so create the IFN (Include-FileName)
-       $inc = sprintf("inc/img/tag-%s.php",
+       $inc = sprintf("inc/img/img_%s.php",
                getRequestElement('img')
        );
 
diff --git a/inc/extensions/ext-cron.php b/inc/extensions/ext-cron.php
new file mode 100644 (file)
index 0000000..9d66b56
--- /dev/null
@@ -0,0 +1,100 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 01/06/2013 *
+ * ===================                          Last change: 01/06/2013 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-cron.php                                     *
+ * -------------------------------------------------------------------- *
+ * Short description : Cron job script for e.g. self-maintenance        *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Cronjob-Scripte fuer z.B. die Selbstverwaltung   *
+ * -------------------------------------------------------------------- *
+ * $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')) {
+       die();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(FALSE);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installation is running
+               // SQL commands to run
+
+               // Register module
+               //addModuleSql('foo', '{OPEN_TEMPLATE}MODULE_FOO_TITLE{CLOSE_TEMPLATE}','Y','Y','N','N');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='foo' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch (getCurrentExtensionVersion()) {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               addExtensionSql('');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes('');
+                               break;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
index 0f50b2e02724a88a0384d63b7fe830836233b6fc..19d95e504bb874553eab155b279d322afcea64d7 100644 (file)
@@ -114,6 +114,7 @@ ORDER BY
        registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_HOURLY_RESET');
        registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_DAILY_RESET');
        registerFilter(__FUNCTION__, __LINE__, 'init', 'TRIGGER_SENDING_POOL');
+       // @TODO Remove this forced removal after a year or so
        unregisterFilter(__FUNCTION__, __LINE__, 'init', 'DETERMINE_USERNAME', TRUE);
        registerFilter(__FUNCTION__, __LINE__, 'init', 'DETERMINE_WHAT_ACTION');
        registerFilter(__FUNCTION__, __LINE__, 'init', 'COUNT_MODULE');
index 9a4870c3c5c8cef55537d50ea45001247e43ebf1..987d89326a400dc245781cbb4c87b923cc81953e 100644 (file)
@@ -772,6 +772,7 @@ function FILTER_TRIGGER_SENDING_POOL () {
        // Are we in normal output mode?
        if (!isHtmlOutputMode()) {
                // Only in normal output mode to prevent race-conditons!
+               return;
        } // END - if
 
        // Init counter
index 0334fe9ebb5fe3344f34706f4c5a37577d9a612a..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,46 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 01/06/2013 *
- * ===================                          Last change: 01/06/2013 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : img-                                             *
- * -------------------------------------------------------------------- *
- * Short description : Image tag for ext-                               *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Bild-Tag fuer ext-                               *
- * -------------------------------------------------------------------- *
- * $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')) {
-       die();
-} elseif (!isExtensionActive('')) {
-       return;
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
diff --git a/inc/img/img_ b/inc/img/img_
new file mode 100644 (file)
index 0000000..0334fe9
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 01/06/2013 *
+ * ===================                          Last change: 01/06/2013 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : img-                                             *
+ * -------------------------------------------------------------------- *
+ * Short description : Image tag for ext-                               *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Bild-Tag fuer ext-                               *
+ * -------------------------------------------------------------------- *
+ * $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')) {
+       die();
+} elseif (!isExtensionActive('')) {
+       return;
+}
+
+// [EOF]
+?>
diff --git a/templates/de/html/ext/ext_cron.tpl b/templates/de/html/ext/ext_cron.tpl
new file mode 100644 (file)
index 0000000..5ea3537
--- /dev/null
@@ -0,0 +1,16 @@
+<div class="para">
+       F&uuml;hrt chronologisch Jobs aus (z.B. &quot;Selbstverwaltung&quot; und
+       vieles mehr. Dies entlastet den normalen Scriptdurchlauf (z.B. &uuml;ber
+       <strong>modules.php</strong> enorm und beschleunigt so den Seiteaufbau.
+</div>
+
+<div class="para">
+       Alternativ kann dieses Script auch externe Scripte chronologisch aufrufen,
+       so dass Sie z.B. ein t&auml;gliches Wartungsscript einer externen
+       Banner-Rotation &uuml;ber dieses Script ansprechen k&ouml;nnen.
+</div>
+
+<div class="para">
+       In der ersten Ausbaustufe der Erweiterung sind erstmal nur st&uuml;ndliche,
+       t&auml;gliche, w&ouml;chendliche und monatliche Aufrufe m&ouml;glich.
+</div>