Need chdir in plugins when data_dir is relative
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 12 Sep 2002 18:47:06 +0000 (18:47 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 12 Sep 2002 18:47:06 +0000 (18:47 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3648 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/message_details/message_details_bottom.php
plugins/message_details/message_details_main.php
plugins/message_details/message_details_top.php
plugins/spamcop/options.php
plugins/squirrelspell/modules/check_me.mod
plugins/squirrelspell/sqspell_interface.php
plugins/squirrelspell/sqspell_options.php
plugins/translate/options.php

index 2c2eab8b7e6fe0e0b471b2371949a92f85c0de8b..11d00eca84af8bd7d02d5d513f46948df7483a4c 100644 (file)
@@ -10,8 +10,8 @@
  * $Id$
  */
 
-#chdir ('..');
-define('SM_PATH','../../');
+chdir ('..');
+define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
@@ -25,15 +25,15 @@ global $color, $uid_support;
 function CalcEntity($entString, $direction) {
     $result = $entString;
     if ($direction == -1) {
-         $pos = strrpos($entString,'.');
-         $result = substr($entString,0,$pos);
+        $pos = strrpos($entString,'.');
+        $result = substr($entString,0,$pos);
     }
 
     switch ($direction) {
        case 0:
           $pos = strrpos($entString,'.');
           if ($pos === false) {
-            $entString++;
+         $entString++;
             $result= $entString;
           } 
          else {
index 5d4ae41007d942eb630af6bc6bf8e2a6627616ae..1300d23e60fd49fffddb6ad543885b03ecf0b4ba 100644 (file)
@@ -10,8 +10,8 @@
  */
 
 /* Path for SquirrelMail required files. */
-#chdir('..');
-define('SM_PATH','../../');
+chdir('..');
+define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
index d82e553910920ca5b1dd0d584549eb115d4eb306..c02560eb296ed3df6f660e359cd80c029c85d2cd 100644 (file)
@@ -10,8 +10,8 @@
  * $Id$
  */
 
-#chdir ('..');
-define('SM_PATH','../../');
+chdir ('..');
+define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
index 097cadd2f980f9b2cdc1d5f4829ad8d8af79e812..bc6dd1e0af6140c91d462b90900489f249fef5d6 100755 (executable)
@@ -1,6 +1,7 @@
 <?php
 
-define('SM_PATH','../../');
+chdir('..');
+define('SM_PATH','../');
 require_once(SM_PATH . 'include/validate.php');
 
 displayPageHeader($color, "None");   
index 313c0b523ee887ddb63e17567e9fdbd93f1084d4..370241f1621628dd66fc9c772496bae6dfb1415e 100644 (file)
@@ -90,7 +90,7 @@ $sqspell_command=$SQSPELL_APP[$sqspell_use_app];
  * QUITE remote.
  */
 do {
-  $floc = SM_PATH . "$attachment_dir/" . md5($sqspell_new_text . microtime());
+  $floc = "$attachment_dir/" . md5($sqspell_new_text . microtime());
 } while (file_exists($floc));
 /**
  * Write the contents to the file.
index 8f42804083bddbff6e06186d15028601e3f580c6..d5b15f9e259ba6c0c0d7f47ffd5d5f33e86255a0 100644 (file)
@@ -29,7 +29,8 @@ $SQSPELL_CRYPTO=FALSE;
  * Load the stuff needed from squirrelmail
  */
 
-define('SM_PATH','../../');
+chdir('..');
+define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
index 54a898f5ae16a1fa27c29e61889852fcff0d5d6d..3470d1527bf0096f21220d2292c5ae5692f4b844 100644 (file)
@@ -23,7 +23,8 @@ $SQSPELL_CRYPTO=FALSE;
 /**
  * Load some necessary stuff from squirrelmail. 
  */
-define('SM_PATH','../../');
+chdir('..');
+define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
index ae55cb997c7d572b605cae7d338b0b622e35bf70..2288a4441d38f0c75e67cfab5ac70ab10b60e46c 100644 (file)
@@ -12,7 +12,8 @@
  */
 
 /* Path for SquirrelMail required files. */
-define('SM_PATH','../../');
+chdir('..');
+define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');