Session save path now fully supported
authorRoland Häder <roland@mxchange.org>
Tue, 30 Sep 2008 16:49:16 +0000 (16:49 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 30 Sep 2008 16:49:16 +0000 (16:49 +0000)
.gitattributes
inc/databases.php
inc/extensions/ext-sql_patches.php
inc/language/de.php
inc/modules/admin/what-config_proxy.php
inc/modules/admin/what-config_session.php [new file with mode: 0644]
inc/rdf.class.php
inc/session.php
templates/de/html/admin/admin_config_session.tpl [new file with mode: 0644]

index 8c37b468b2c5303631d2f2f552c746255ae64129..b825b3517692da28e5e087af854ce93531ad65ad 100644 (file)
@@ -314,6 +314,7 @@ inc/modules/admin/what-config_register.php -text
 inc/modules/admin/what-config_register2.php -text
 inc/modules/admin/what-config_rewrite.php -text
 inc/modules/admin/what-config_secure.php -text
 inc/modules/admin/what-config_register2.php -text
 inc/modules/admin/what-config_rewrite.php -text
 inc/modules/admin/what-config_secure.php -text
+inc/modules/admin/what-config_session.php -text
 inc/modules/admin/what-config_sponsor.php -text
 inc/modules/admin/what-config_stats.php -text
 inc/modules/admin/what-config_surfbar.php -text
 inc/modules/admin/what-config_sponsor.php -text
 inc/modules/admin/what-config_stats.php -text
 inc/modules/admin/what-config_surfbar.php -text
@@ -840,6 +841,7 @@ templates/de/html/admin/admin_config_register2.tpl -text
 templates/de/html/admin/admin_config_rewrite.tpl -text
 templates/de/html/admin/admin_config_rewrite_rows.tpl -text
 templates/de/html/admin/admin_config_secure.tpl -text
 templates/de/html/admin/admin_config_rewrite.tpl -text
 templates/de/html/admin/admin_config_rewrite_rows.tpl -text
 templates/de/html/admin/admin_config_secure.tpl -text
+templates/de/html/admin/admin_config_session.tpl -text
 templates/de/html/admin/admin_config_sponsor.tpl -text
 templates/de/html/admin/admin_config_stats.tpl -text
 templates/de/html/admin/admin_config_sub_points.tpl -text
 templates/de/html/admin/admin_config_sponsor.tpl -text
 templates/de/html/admin/admin_config_stats.tpl -text
 templates/de/html/admin/admin_config_sub_points.tpl -text
index 73ccfeb30e3ea84ae269e4373151d038dbbeebfc..2cc912206dc6cc1ff37ff401fba8937cb644076a 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "419");
+define('CURR_SVN_REVISION', "420");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 11c808fc3bac44cedae5759ad16f660631b47527..426eb0018b0de8089a232d654d3be1f642260372 100644 (file)
@@ -38,13 +38,13 @@ if (!defined('__SECURITY')) {
 }
 
 // Version number
 }
 
 // Version number
-$EXT_VERSION = "0.5.2";
+$EXT_VERSION = "0.5.3";
 
 // Auto-set extension version
 if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION;
 
 // Version history array (add more with , "0.1" and so on)
 
 // Auto-set extension version
 if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION;
 
 // Version history array (add more with , "0.1" and so on)
-$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2");
+$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3");
 
 switch ($EXT_LOAD_MODE)
 {
 
 switch ($EXT_LOAD_MODE)
 {
@@ -56,7 +56,8 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE
-(action='theme' AND (what='theme_import' OR what='theme_edit')) OR
+what='theme_import' OR
+what='theme_edit' OR
 what='config_extensions' OR
 what='config_home' OR
 what='list_unconfirmed' OR
 what='config_extensions' OR
 what='config_home' OR
 what='list_unconfirmed' OR
@@ -65,8 +66,9 @@ what='config_title' OR
 what='sub_points' OR
 what='config_admin' OR
 what='config_proxy' OR
 what='sub_points' OR
 what='config_admin' OR
 what='config_proxy' OR
+what='config_session' OR
 what='list_norefs'
 what='list_norefs'
-LIMIT 13";
+LIMIT 14";
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='themes' LIMIT 1";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='themes' LIMIT 1";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE
@@ -76,8 +78,7 @@ what='stats2' OR
 (action='stats' AND (what='' OR what IS NULL)) OR
 (action='extras' AND (what='' OR what IS NULL)) OR
 (action='rals' AND (what='' OR what IS NULL)) OR
 (action='stats' AND (what='' OR what IS NULL)) OR
 (action='extras' AND (what='' OR what IS NULL)) OR
 (action='rals' AND (what='' OR what IS NULL)) OR
-(action='account' AND (what='' OR what IS NULL))
-LIMIT 8";
+(action='account' AND (what='' OR what IS NULL))";
        $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='main' WHERE
 action='stats' OR
 action='extras' OR
        $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='main' WHERE
 action='stats' OR
 action='extras' OR
@@ -653,6 +654,14 @@ PRIMARY KEY (id)
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Prozents&aum;tze k&ouml;nnen nun f&uuml;nf Stelle hinter dem Komma sein.";
                break;
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Prozents&aum;tze k&ouml;nnen nun f&uuml;nf Stelle hinter dem Komma sein.";
                break;
+
+       case "0.5.3": // SQL queries for v0.5.3
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD session_save_path varchar(255) NOT NULL DEFAULT ''";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','&Auml;ndern Sie hier den Speicherpfad f&uuml;r Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem f&uuml;hren sollte.', 16)";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com n&ouml;tig.";
+               break;
        }
        break;
 
        }
        break;
 
index 46b9208d042d148177fea525d51f7f4626ead9e7..0b084cc026fb5a3f4e967cb9189b6b3ecbe57c41 100644 (file)
@@ -277,7 +277,7 @@ define('GUEST_CONFIRM_LINK', "Ihr Best&auml;tigungslink");
 define('THANX', "Vielen Dank.\n\nMit freundlichem Gruss,");
 define('YOUR', "Ihr");
 define('TEAM', "Team");
 define('THANX', "Vielen Dank.\n\nMit freundlichem Gruss,");
 define('YOUR', "Ihr");
 define('TEAM', "Team");
-define('HELLO_ADMIN', "Hallo lieber Administrator");
+define('HELLO_ADMIN', "Hallo Administrator");
 define('ADMIN_GUEST_REGISTERED_WITH_US', "Ein Gast hat sich soeben bei uns angemeldet.");
 define('ADMIN_GUEST_PERSONA_DATA', "Hier sind zur &Uuml;berpr&uuml;fung nochmals seine pers&ouml;nlichen Daten");
 define('ADMIN_THANX', "Mit freundlichem Gruss,");
 define('ADMIN_GUEST_REGISTERED_WITH_US', "Ein Gast hat sich soeben bei uns angemeldet.");
 define('ADMIN_GUEST_PERSONA_DATA', "Hier sind zur &Uuml;berpr&uuml;fung nochmals seine pers&ouml;nlichen Daten");
 define('ADMIN_THANX', "Mit freundlichem Gruss,");
@@ -1170,6 +1170,11 @@ define('MEMBER_ORDER_PLEASE_WAIT_1', "Ihre Seite wird auf Framekiller getestet.
 define('MEMBER_ORDER_PLEASE_WAIT_2', " Sekunden warten.");
 define('ADMIN_LIST_NOREFS_ACCOUNTS', "Auflistung aller Accounts ohne Werber");
 define('ADMIN_NO_REF_LEVELS', "In Ihrem {!MT_WORD!} sind keine Referal-Ebenen eingerichtet! Ihre Mitglieder erhalten <u>keine</u> {!POINTS!} gutgeschrieben. Richten Sie mindestens Referal-Ebene 0 mit 100% Verg&uuml;tung ein.");
 define('MEMBER_ORDER_PLEASE_WAIT_2', " Sekunden warten.");
 define('ADMIN_LIST_NOREFS_ACCOUNTS', "Auflistung aller Accounts ohne Werber");
 define('ADMIN_NO_REF_LEVELS', "In Ihrem {!MT_WORD!} sind keine Referal-Ebenen eingerichtet! Ihre Mitglieder erhalten <u>keine</u> {!POINTS!} gutgeschrieben. Richten Sie mindestens Referal-Ebene 0 mit 100% Verg&uuml;tung ein.");
+define('ADMIN_SESSION_SAVE_PATH_INVALID', "Pfad f&uuml;r Sitzungsdateien ung&uuml;tig!");
+define('ADMIN_SESSION_SETTINGS_TITLE', "Einstellungen zum Sitzungsmanagement");
+define('ADMIN_CONFIG_SESSION_SAVE_PATH', "Speicherpfad f. Sitzungsdateien");
+define('ADMIN_BASE_PATH', "Absoluter Server-Pfad");
+define('ADMIN_SESSION_SAVE_PATH_NOTE', "Sie sollten f&uuml;r Sitzungsdateien einen Pfad w&auml;hlen der ausserhalb des Server-Pfades liegt, da sonst eventuell die Sitzungsdateien vom Web erreichbar sind, was ein hohes Sicherheitsrisiko darstellt.");
 
 //
 ?>
 
 //
 ?>
index 756b42d7517f025e7358a339e46f724469fb2b8a..df6e62b19005011dd0210b58b7ed9fc88536e3f5 100644 (file)
@@ -8,7 +8,7 @@
  * -------------------------------------------------------------------- *
  * Short description : Proxy settings                                   *
  * -------------------------------------------------------------------- *
  * -------------------------------------------------------------------- *
  * Short description : Proxy settings                                   *
  * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Proxy-Einstellungenent                           *
+ * Kurzbeschreibung  : Proxy-Einstellungen                              *
  * -------------------------------------------------------------------- *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * -------------------------------------------------------------------- *
  *                                                                      *
  * -------------------------------------------------------------------- *
diff --git a/inc/modules/admin/what-config_session.php b/inc/modules/admin/what-config_session.php
new file mode 100644 (file)
index 0000000..316b9de
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/30/2008 *
+ * ================                             Last change: 09/30/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-config_session.php                          *
+ * -------------------------------------------------------------------- *
+ * Short description : Session settings                                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Session-Einstellungen                            *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.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')) || (!IS_ADMIN())) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+if (isset($_POST['ok'])) {
+       // Test Path
+       if ((empty($_POST['session_save_path'])) || ((is_dir($_POST['session_save_path'])) && (is_writeable($_POST['session_save_path'])))) {
+               // Save configuration
+               ADMIN_SAVE_SETTINGS($_POST);
+       } else {
+               // Invalid!
+               LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SESSION_SAVE_PATH_INVALID);
+       }
+} else {
+       // Prepare content
+       $content = array(
+               'session_save_path' => $_CONFIG['session_save_path'],
+       );
+
+       // Load template
+       LOAD_TEMPLATE("admin_config_session", false, $content);
+}
+
+//
+?>
index 36cda4dd0e26f5c797459455123bfc6a8856c232..d42bdbff8d0dce5e4ff8552a965f7808137a03d4 100644 (file)
@@ -1355,6 +1355,7 @@ class fase4_rdf {
                        fputs($fp, $request);
                        $reply = ""; $isContent = false; $dummy = "";
                        // Read reply
                        fputs($fp, $request);
                        $reply = ""; $isContent = false; $dummy = "";
                        // Read reply
+                       $i=0;
                        while ( !feof($fp) ) {
                                $read = trim(fgets($fp, 4096));
                                if (substr($read, 0, 5) == "<?xml" || $isContent) {
                        while ( !feof($fp) ) {
                                $read = trim(fgets($fp, 4096));
                                if (substr($read, 0, 5) == "<?xml" || $isContent) {
index 7d609e44eeedfd985d77fc5440ee477cf55b11c8..d0e15a3f62661868630328334abab9cb0bd7cb8b 100644 (file)
@@ -45,6 +45,12 @@ if (empty($VIEW))  $VIEW  = 0;
 // Skip updating of cookies when viewing a banner
 if (($VIEW == 1) && ($_SERVER['PHP_SELF'])) return;
 
 // Skip updating of cookies when viewing a banner
 if (($VIEW == 1) && ($_SERVER['PHP_SELF'])) return;
 
+// Set session save path if set
+if (!empty($_CONFIG['session_save_path'])) {
+       // Please make sure this valid!
+       @session_save_path($_CONFIG['session_save_path']);
+} // END - if
+
 // Start the session
 @session_start();
 global $PHPSESSID;
 // Start the session
 @session_start();
 global $PHPSESSID;
diff --git a/templates/de/html/admin/admin_config_session.tpl b/templates/de/html/admin/admin_config_session.tpl
new file mode 100644 (file)
index 0000000..98374e9
--- /dev/null
@@ -0,0 +1,34 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=config_proxy" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="700">
+       <tr>
+               <td colspan="2" align="center" class="admin_title bottom2" height="30">
+                       <strong>{--ADMIN_SESSION_SETTINGS_TITLE--}</strong>
+               </td>
+       </tr>
+       <tr><td colspan="2" class="seperator" height="5">&nbsp;</td></tr>
+       <tr>
+               <td align="right" style="padding-right:10px">
+                       {--ADMIN_CONFIG_SESSION_SAVE_PATH--}:<br />
+               </td>
+               <td>
+                       <input type="text" name="session_save_path" value="$content[session_save_path]" size="30" maxlength="255" />
+               </td>
+       </tr>
+       <tr>
+               <td colspan="2" style="padding:3px" align="center">
+                       <span class="admin_note">
+                               {--ADMIN_BASE_PATH--}:<br />
+                               <em>{!PATH!}</em><br />
+                               {--ADMIN_SESSION_SAVE_PATH_NOTE--}
+                       </span>
+               </td>
+       </tr>
+       <tr><td colspan="2" class="bottom2 seperator" height="5">&nbsp;</td></tr>
+       <tr>
+               <td colspan="2" class="admin_footer">
+                       <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />&nbsp;*
+                       <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" />
+               </td>
+       </tr>
+</table>
+</form>