]> git.mxchange.org Git - mailer.git/commitdiff
Added more config wrappers
authorRoland Häder <roland@mxchange.org>
Tue, 27 Nov 2012 21:05:08 +0000 (21:05 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 27 Nov 2012 21:05:08 +0000 (21:05 +0000)
.gitattributes
inc/libs/doubler_functions.php
inc/libs/menu_functions.php [new file with mode: 0644]
inc/libs/order_functions.php
inc/libs/refback_functions.php
inc/load_config.php
inc/modules/admin/what-config_order.php
inc/modules/admin/what-config_user.php
templates/de/html/admin/admin_config_order.tpl
templates/de/html/admin/admin_metadata.tpl

index 51d3c4e59dc451a0253a925b4f1a45e8e38018e2..30175d63d7d773a82261d666d8ac0185a4fdedfd 100644 (file)
@@ -376,6 +376,7 @@ inc/libs/jackpot_functions.php svneol=native#text/plain
 inc/libs/mailid_functions.php svneol=native#text/plain
 inc/libs/maintenance_functions.php svneol=native#text/plain
 inc/libs/mediadata_functions.php svneol=native#text/plain
+inc/libs/menu_functions.php svneol=native#text/plain
 inc/libs/network_functions.php svneol=native#text/plain
 inc/libs/newsletter_functions.php svneol=native#text/plain
 inc/libs/nickname_functions.php svneol=native#text/plain
index fc13a2f44c16d3c023b673253c39cae3ab6f7246..6ca451b69a3fe7d4e567e502d5edf9ba693bb061 100644 (file)
@@ -265,5 +265,17 @@ function getDoublerCharge () {
        return $GLOBALS[__FUNCTION__];
 }
 
+// "Getter" for doubler_max_sent
+function getDoublerMaxSent () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('doubler_max_sent');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
 // [EOF]
 ?>
diff --git a/inc/libs/menu_functions.php b/inc/libs/menu_functions.php
new file mode 100644 (file)
index 0000000..39ea716
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 11/27/2012 *
+ * ===================                          Last change: 11/27/2012 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : menu_functions.php                               *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for ext-menu                           *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Funktionen fuer ext-menu                         *
+ * -------------------------------------------------------------------- *
+ * $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
+
+// ----------------------------------------------------------------------------
+//                 Wrapper functions for configuration entries
+// ----------------------------------------------------------------------------
+
+// Getter for guest_menu_advert_enabled
+function getGuestMenuAdvertEnabled () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('guest_menu_advert_enabled');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for member_menu_advert_enabled
+function getMemberMenuAdvertEnabled () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('member_menu_advert_enabled');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// [EOF]
+?>
index 696b9e01d507510e089ebfeb9b57337fb8763002..27f3bbf7e61dac917a0a7cca691bea869297ab25 100644 (file)
@@ -94,5 +94,29 @@ function isOrderMultiPageEnabled () {
        return $GLOBALS[__FUNCTION__];
 }
 
+// Getter for 'order_mode' config entry
+function getOrderMode () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('order_mode');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'order_select' config entry
+function getOrderSelect () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('order_select');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
 // [EOF]
 ?>
index 82746fe51dc5e5d6d03c8e0de926f16604682f87..8cb68e69269590f6d4b5e6f0888fc43f62004a5f 100644 (file)
@@ -361,12 +361,52 @@ function updateMemberRefbackPercents ($id, $percents, $note) {
        return $status;
 }
 
+// ----------------------------------------------------------------------------
+//                 Wrapper functions for configuration entries
+// ----------------------------------------------------------------------------
+
+// Getter for refback_enabled
+function getRefbackEnabled () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('refback_enabled');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
 // Checks whether refback is enabled
 function isRefbackEnabled () {
        // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
-               $GLOBALS[__FUNCTION__] = (getConfig('refback_enabled') == 'Y');
+               $GLOBALS[__FUNCTION__] = (getRefbackEnabled() == 'Y');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for refback_max_perc
+function getRefbackMaxPerc () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('refback_max_perc');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for refback_min_perc
+function getRefbackMinPerc () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('refback_min_perc');
        } // END - if
 
        // Return cache
index 483a4d270b76a17ef49f250a65ee75345d710fd1..2d15e8e2d673d9fd2d1ae3bd6750067a577dcaba 100644 (file)
@@ -79,6 +79,9 @@ if ((isIncludeReadable(getCachePath() . 'config-local.php')) && (isIncludeReadab
 
        // Set output mode here
        setConfigEntry('OUTPUT_MODE', 'render');
+} else {
+       // This should not happen
+       reportBug(__FILE__, __LINE__, 'Was not able to load/detect configuration file and/or installation phase!');
 }
 
 // Check if the user setups his database login stuff...
index 0f6fd825f0385cd1f33d37d2da4873544cb20a82..f7571f5bf7dec86077d6479ae2681d67698526d6 100644 (file)
@@ -62,9 +62,6 @@ if (isFormSent('save_config')) {
                $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"';
        } // END - foreach
 
-       // Selection list
-       $content['order_selection'] = addOrderSelectionOptions(getConfig('order_select'));
-
        // Load template
        loadTemplate('admin_config_order', FALSE, $content);
 }
index 4cf8ef12abfc87c85bca9800684f16db1a2af101..29b349fb81f248b00b582c41b6909b3cabe8d7b1 100644 (file)
@@ -48,7 +48,7 @@ if (isFormSent('save_config')) {
        adminSaveSettingsFromPostData();
 } else {
        // Prepare gender selection box
-       $content['tester_user_gender_selection'] = generateGenderSelectionBox(getConfig('tester_user_gender'), 'tester_user_gender');
+       $content['tester_user_gender_selection'] = generateGenderSelectionBox(getTesterUserGender(), 'tester_user_gender');
 
        // Load form template
        loadTemplate('admin_config_user', FALSE, $content);
index 92d3968e9fc515822262b1795a548e31ab6b1417..8aac624d262ffcf4954f7eefb4f36a1c4273fbe0 100644 (file)
@@ -80,7 +80,7 @@
                        <label class="admin_label" for="order_select">{--ADMIN_CONFIG_ORDER_SELECTION_COLUMN--}</label>
                        <div align="center">
                                <select name="order_select" class="form_select" size="1">
-                                       $content[order_selection]
+                                       {%config,addOrderSelectionOptions=order_select%}
                                </select>
                        </div>
                </div>
index fddd9683c328af84a673d7c0b76d537f0a700fc6..4633e1d71e918940d0dd22fecdcefad1c4e69e5c 100644 (file)
@@ -1 +1 @@
-<meta name="robots" content="noindex, nofollow, noarchive, nosnippet" />
\ No newline at end of file
+<meta name="robots" content="noindex, nofollow, noarchive, nosnippet" />