Browse Source

SMPATH BORKED everything

stekkel 23 years ago
parent
commit
f55021e133
3 changed files with 25 additions and 15 deletions
  1. 7 5
      plugins/newmail/newmail.php
  2. 10 7
      plugins/newmail/newmail_opt.php
  3. 8 3
      plugins/newmail/testsound.php

+ 7 - 5
plugins/newmail/newmail.php

@@ -11,11 +11,13 @@
     **  $Id$
     **  $Id$
     **    
     **    
     **/
     **/
-    
-   chdir ('../');
-   require_once('../src/validate.php');
-   require_once('../src/load_prefs.php');
-   require_once('../functions/page_header.php');
+   chdir('..');
+   define('SM_PATH','../');
+
+    /* SquirrelMail required files. */
+   require_once(SM_PATH . 'include/validate.php');
+   require_once(SM_PATH . 'src/load_prefs.php');
+   require_once(SM_PATH . 'functions/page_header.php');
 
 
    displayHtmlHeader( _("New Mail"), '', FALSE );
    displayHtmlHeader( _("New Mail"), '', FALSE );
 
 

+ 10 - 7
plugins/newmail/newmail_opt.php

@@ -12,13 +12,16 @@
     **
     **
     **/
     **/
 
 
-    chdir("..");
-    require_once('../src/validate.php');
-    require_once('../functions/page_header.php');
-    require_once('../functions/display_messages.php');
-    require_once('../functions/imap.php');
-    require_once('../functions/array.php');
-    require_once('../src/load_prefs.php');
+    chdir('..');
+    define('SM_PATH','../');
+
+    /* SquirrelMail required files. */
+    require_once(SM_PATH . 'include/validate.php');
+    require_once(SM_PATH . 'functions/page_header.php');
+    require_once(SM_PATH . 'functions/display_messages.php');
+    require_once(SM_PATH . 'functions/imap.php');
+    require_once(SM_PATH . 'functions/array.php');
+    require_once(SM_PATH . 'src/load_prefs.php');
 
 
     displayPageHeader($color, 'None');
     displayPageHeader($color, 'None');
 
 

+ 8 - 3
plugins/newmail/testsound.php

@@ -12,9 +12,14 @@
  */
  */
 
 
    chdir ("../");
    chdir ("../");
-   require_once('../src/validate.php');
-   require_once('../functions/html.php');
-   require_once("../src/load_prefs.php");
+   chdir('..');
+   define('SM_PATH','../');
+
+   /* SquirrelMail required files. */
+   require_once(SM_PATH . 'include/validate.php');
+   require_once(SM_PATH . 'functions/html.php');
+   require_once(SM_PATH . 'src/load_prefs.php');
+
    if (!isset($sound)) {
    if (!isset($sound)) {
     $sound = "Click.wav";
     $sound = "Click.wav";
    }
    }