From c8cc472302888150a0b5390a7cf116c786754264 Mon Sep 17 00:00:00 2001
From: seek3r <seek3r@alumni.egroupware.org>
Date: Wed, 10 Jan 2001 18:24:31 +0000
Subject: [PATCH] moved cookies to preferences section of setup/config and also
 added some details about a fix needed in some environrments

---
 admin/setup/config.inc.php       | 5 -----
 phpgwapi/inc/phpgw.inc.php       | 7 +++++++
 preferences/setup/config.inc.php | 5 +++++
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/admin/setup/config.inc.php b/admin/setup/config.inc.php
index da247c245f..0063214524 100644
--- a/admin/setup/config.inc.php
+++ b/admin/setup/config.inc.php
@@ -81,11 +81,6 @@
    </tr>
    <?php $selected = array(); ?>
 
-   <tr bgcolor="e6e6e6">
-    <td>Use cookies to pass sessionid:</td>
-    <td><input type="checkbox" name="newsettings[usecookies]" value="True"<?php echo ($current_config["usecookies"]?" checked":""); ?>></td>
-   </tr>
-   
    <tr bgcolor="e6e6e6">
     <td>Enter some random text for app_session <br>encryption (requires mcrypt)</td>
     <td><input name="newsettings[encryptkey]" value="<?php echo $current_config["encryptkey"]; ?>" size="40"></td>
diff --git a/phpgwapi/inc/phpgw.inc.php b/phpgwapi/inc/phpgw.inc.php
index 2a9023304b..a30910bf72 100644
--- a/phpgwapi/inc/phpgw.inc.php
+++ b/phpgwapi/inc/phpgw.inc.php
@@ -221,6 +221,13 @@
       if (! $url) {
         $url_root = split ("/", $phpgw_info["server"]["webserver_url"]);
         $url = $url_root[0]."//".$url_root[2].$PHP_SELF;
+        /* Some hosting providers have their paths screwy.
+           If the value from $PHP_SELF is not what you expect, you can use this to patch it
+           It will need to be adjusted to your specific problem tho.
+        */
+        //$patched_php_self = str_replace("/php4/php/phpgroupware", "/phpgroupware", $PHP_SELF);
+        $patched_php_self = $PHP_SELF;
+        $url = $url_root[0]."//".$url_root[2].$patched_php_self;
       }
 
       if (isset($phpgw_info["server"]["usecookies"]) &&
diff --git a/preferences/setup/config.inc.php b/preferences/setup/config.inc.php
index 97edb5457f..3cb5101b37 100644
--- a/preferences/setup/config.inc.php
+++ b/preferences/setup/config.inc.php
@@ -64,6 +64,11 @@
    </tr>
    <?php $selected = array(); ?>
 
+   <tr bgcolor="e6e6e6">
+    <td>Use cookies to pass sessionid:</td>
+    <td><input type="checkbox" name="newsettings[usecookies]" value="True"<?php echo ($current_config["usecookies"]?" checked":""); ?>></td>
+   </tr>
+
    <tr bgcolor="e6e6e6">
     <td>Would like like phpGroupWare to check for new version<br>when admins login ?:</td>
     <td><input type="checkbox" name="newsettings[checkfornewversion]" value="True"<?php echo ($current_config["checkfornewversion"]?" checked":""); ?>></td>