]> git.mxchange.org Git - mailer.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 19 Nov 2012 01:09:30 +0000 (01:09 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 19 Nov 2012 01:09:30 +0000 (01:09 +0000)
- Renamed setOutputMode() to setScriptOutputMode() to be more conform with
  getScriptOutput()
- Added template for AJAX scripts
- Added check for isAjaxOutput() and isInstallationPhase() to proper scripts

.gitattributes
inc/ajax/ajax_ [new file with mode: 0644]
inc/ajax/ajax_admin.php
inc/ajax/ajax_installer.php
inc/wrapper-functions.php

index f90a825e2d3ed0b744bcba741698116fc8d3e6bf..72ff75a341af170421fc4444541e7b15185879b0 100644 (file)
@@ -83,6 +83,7 @@ img/uberwach/uberwach-kamera-gruen.gif -text svneol=unset#image/gif
 inc/.htaccess svneol=native#text/plain
 inc/ajax-functions.php svneol=native#text/plain
 inc/ajax/.htaccess svneol=native#text/plain
+inc/ajax/ajax_ svneol=native#text/plain
 inc/ajax/ajax_admin.php svneol=native#text/plain
 inc/ajax/ajax_installer.php svneol=native#text/plain
 inc/autopurge.php -text
diff --git a/inc/ajax/ajax_ b/inc/ajax/ajax_
new file mode 100644 (file)
index 0000000..84b5c7f
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 06/24/2012 *
+ * ===================                          Last change: 06/24/2012 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ajax_admin.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : AJAX library for admin menu                      *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : AJAX-Bibliothek fuer Adminmenu                   *
+ * -------------------------------------------------------------------- *
+ * $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')) || (!isAjaxOutputMode())) {
+       die();
+} // END - if
+
+// [EOF]
+?>
index 05d9d690f1248b2bf9eff0d83399db937df98aa4..827af52ec4fd3143510efca908dcc1d1b4a119be 100644 (file)
@@ -36,7 +36,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((!defined('__SECURITY')) || (!isAdmin())) {
+if ((!defined('__SECURITY')) || (!isAjaxOutputMode()) || (!isAdmin())) {
        die();
 } // END - if
 
@@ -108,5 +108,6 @@ function doAjaxAdminRequestContent () {
                }
        } // END - if
 }
+
 // [EOF]
 ?>
index 425c81b0295faad77ea8ca548954e1df6e08ac92..5267a3aee53867c08f79b7748a37d6f5a48a17cb 100644 (file)
@@ -36,7 +36,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if (!defined('__SECURITY')) {
+if ((!defined('__SECURITY')) || (!isAjaxOutputMode()) || (!isInstallationPhase())) {
        die();
 } // END - if
 
index e312c565a0b4e2bb68128b12c89709e88792274d..2e401e4bc565234818cddc67e5d3b3b11d43f8e7 100644 (file)
@@ -707,7 +707,7 @@ function getScriptOutputMode () {
 }
 
 // Setter for 'output_mode' value
-function setOutputMode ($newOutputMode) {
+function setScriptOutputMode ($newOutputMode) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'output_mode=' . $newOutputMode);
        $GLOBALS['__output_mode'] = (int) $newOutputMode;
 }
@@ -1176,7 +1176,7 @@ function sendRawRedirect ($url) {
        $GLOBALS['__output'] = '';
 
        // To make redirects working (no content type), output mode must be raw
-       setOutputMode(-1);
+       setScriptOutputMode(-1);
 
        // Send helping header
        setHttpStatus('302 Found');