Putting back SM_PATH the way it should be and eliminating chdir in the
[squirrelmail.git] / plugins / mail_fetch / setup.php
index ceb7390..1c27171 100644 (file)
@@ -3,7 +3,7 @@
    /**
     **  mail_fetch/setup.php
     **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
+    **  Copyright (c) 1999-2002 The SquirrelMail Project Team
     **  Licensed under the GNU GPL. For full terms see the file COPYING.
     **
     **  Setup of the mailfetch plugin.
@@ -11,7 +11,8 @@
     **  $Id$
     **/
 
-    require_once( '../plugins/mail_fetch/functions.php' );
+    define('SM_PATH','../../');
+    require_once(SM_PATH . 'plugins/mail_fetch/functions.php' );
 
     function squirrelmail_plugin_init_mail_fetch() {
         global $squirrelmail_plugin_hooks;
 
     function mail_fetch_login() {
 
-        require_once ('../src/validate.php');
+        require_once ('../include/validate.php');
         require_once ('../functions/imap.php');
         require_once ('../plugins/mail_fetch/class.POP3.php');
         require_once ('../plugins/mail_fetch/functions.php');
-        require_once('../functions/i18n.php');
+        require_once ('../functions/i18n.php');
 
         global $username, $data_dir, $key,$imapServerAddress,$imapPort;
 
     function mail_fetch_setnew()    {
 
         global $data_dir,$username;
-        // require_once ('../src/load_prefs.php');
-        // require_once ('../src/validate.php');
-        require_once('../functions/prefs.php');
+        require_once(SM_PATH . 'functions/prefs.php');
 
         if( $username <> '' ) {
             // Creates the pref file if it does not exist.
-        checkForPrefs( $data_dir, $username );
             setPref( $data_dir, $username, 'mailfetch_newlog', 'on' );
         }
 
       );
    }
 
-?>
\ No newline at end of file
+?>