next up previous contents
Next: filters.php Up: 目錄 plugins Previous: auth.php   Contents

options.php

  1. 變更設定檔位置。
    [root@mail squirrelmail-1.4.8]# diff -wuN ./plugins/administrator/options.php /var/www/squirrelmail/plugins/administrator/options.php
    --- ./plugins/administrator/options.php	2006-02-04 06:27:51.000000000 +0800
    +++ /var/www/squirrelmail/plugins/administrator/options.php	2006-12-31 08:18:14.000000000 +0800
    @@ -185,7 +185,7 @@
             // Since we're relative to the config dir, 
             // more than 1 ../ puts us OUTSIDE the SM tree.
             // get full path to config.php, then pop the filename
    -        $abs_path = explode('/', realpath (SM_PATH . 'config/config.php'));
    +        $abs_path = explode('/', realpath ('/etc/squirrelmail/config.php'));
             array_pop ($abs_path); 
             foreach ( $rel_path as $subdir ) {
                 if ( $subdir === '' ) {
    @@ -236,8 +236,8 @@
         $newcfg[$key] = '';
     }
     
    -$cfgfile = SM_PATH . 'config/config.php';
    -parseConfig( SM_PATH . 'config/config_default.php' );
    +$cfgfile = '/etc/squirrelmail/config.php';
    +parseConfig( '/etc/squirrelmail/config_default.php' );
     parseConfig( $cfgfile );
     
     $colapse = array( 'Titles' => 'off',
    @@ -621,7 +621,7 @@
             }
         }
         // add local config support
    -    fwrite( $fp, "@include SM_PATH . 'config/config_local.php';\n" );
    +    fwrite( $fp, "@include '/etc/squirrelmail/config_local.php';\n" );
         // close php
         fwrite( $fp, '?>' );
         fclose( $fp );
    



2016-03-11