From: <bo...@us...> - 2007-08-20 14:35:08
|
Revision: 12590 http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12590&view=rev Author: bouchon Date: 2007-08-20 07:35:00 -0700 (Mon, 20 Aug 2007) Log Message: ----------- Hacked SquirrelMail to use the new configuration engine, prepared the code for Google release (20 Aug, 19:00 UTC) Modified Paths: -------------- branches/GSoC-config/squirrelmail/admin/index.php branches/GSoC-config/squirrelmail/class/config/configurator.class.php branches/GSoC-config/squirrelmail/class/config/file.class.php branches/GSoC-config/squirrelmail/configure branches/GSoC-config/squirrelmail/include/init.php Added Paths: ----------- branches/GSoC-config/squirrelmail/README.GSoC Added: branches/GSoC-config/squirrelmail/README.GSoC =================================================================== --- branches/GSoC-config/squirrelmail/README.GSoC (rev 0) +++ branches/GSoC-config/squirrelmail/README.GSoC 2007-08-20 14:35:00 UTC (rev 12590) @@ -0,0 +1,49 @@ + +This is a special release of SquirrelMail to demonstrate the +new configuration engine made during the Google Summer of Code +program in 2007. + +Installation +=================================== + + First, you must run the top-level configuration script. + + $ cd config/ + $ ./configure.php + + If the PHP parser is not in your path, or for Windows users, run + + $ cd config/ + $ /path/to/php configure.php + + > cd config + > C:\php\php.exe configure.php + + You *must* provide an administrator password, since the command line interface + is not completed yet. + + Browse to the web configuration page : + http://server/path/squirrelmail/admin/ + + Using your administrator password, you are ready to configure SquirrelMail. + Once you are done, save your configuration file in the config/ folder. + +Updates +=================================== + + The sole purpose of this release is to provide Google with a working + sample of what has been achieved during the Summer of Code timeframe. + + All features are not implemented yet. It is recommanded that use check out + SquirrelMail's latest SVN to have an up-to-date version. + +Thanks +=================================== + + All my thanks go to my mentor, Thijs Kinkhorst, who was kind + enough to support my application and help me through the summer, + however busy he was. I also want to thank Paul Lesniewski for + his guidance, comments and feedbacks. Finally, I thank all the + people who showed interest in our improvements, through their + comments and suggestions on the mailing list. + Modified: branches/GSoC-config/squirrelmail/admin/index.php =================================================================== --- branches/GSoC-config/squirrelmail/admin/index.php 2007-08-20 14:02:19 UTC (rev 12589) +++ branches/GSoC-config/squirrelmail/admin/index.php 2007-08-20 14:35:00 UTC (rev 12590) @@ -53,6 +53,7 @@ if(isset($_GET['saveconfig'])) { + $_SESSION['made_changes'] = false; $result = $config->sources[0]->Save($conf); } Modified: branches/GSoC-config/squirrelmail/class/config/configurator.class.php =================================================================== --- branches/GSoC-config/squirrelmail/class/config/configurator.class.php 2007-08-20 14:02:19 UTC (rev 12589) +++ branches/GSoC-config/squirrelmail/class/config/configurator.class.php 2007-08-20 14:35:00 UTC (rev 12590) @@ -25,6 +25,13 @@ { $toplevel = parse_ini_file(SM_PATH.'config/toplevel_config.php', false); + if(!$toplevel) + { + die('<html><body><p><strong>ERROR:</strong> Config file ' . + '"<tt>config/toplevel_config.php</tt>" not found. You need to ' . + 'configure SquirrelMail before you can use it.</p></body></html>'); + } + $this->admin_password = $toplevel['admin_password']; $this->squirrelmail_default_language = $toplevel['squirrelmail_default_language']; $this->default_charset = $toplevel['default_charset']; Modified: branches/GSoC-config/squirrelmail/class/config/file.class.php =================================================================== --- branches/GSoC-config/squirrelmail/class/config/file.class.php 2007-08-20 14:02:19 UTC (rev 12589) +++ branches/GSoC-config/squirrelmail/class/config/file.class.php 2007-08-20 14:35:00 UTC (rev 12590) @@ -206,3 +206,9 @@ return $objects; } + +// Must add support for more config files +function configure_backend_file() +{ + return 'config_file[] = "meta_config.php,default_config.php,config.php"'."\n"; +} Modified: branches/GSoC-config/squirrelmail/configure =================================================================== --- branches/GSoC-config/squirrelmail/configure 2007-08-20 14:02:19 UTC (rev 12589) +++ branches/GSoC-config/squirrelmail/configure 2007-08-20 14:35:00 UTC (rev 12590) @@ -1,5 +1,5 @@ #!/bin/sh # -# Redirects to the config directory and runs conf.pl +# Redirects to the config directory and runs configure.php -cd `dirname $0`/config && ./conf.pl +cd `dirname $0`/config && ./configure.php Modified: branches/GSoC-config/squirrelmail/include/init.php =================================================================== --- branches/GSoC-config/squirrelmail/include/init.php 2007-08-20 14:02:19 UTC (rev 12589) +++ branches/GSoC-config/squirrelmail/include/init.php 2007-08-20 14:35:00 UTC (rev 12590) @@ -158,6 +158,12 @@ global $config; $config = new SMConfigurator(false); +///////// TEMPORARY HACK TO USE THE NEW CONFIGURATION ENGINE ///////// +foreach($config->sources[0]->sm_config_vars as $var => $value) +{ + $$var = $value; +} + /* /* load site configuration require(SM_PATH . 'config/config.php'); @@ -166,6 +172,7 @@ require(SM_PATH . 'config/config_local.php'); } */ +/////////////////////////////////////////////////////////////////////// require(SM_PATH . 'functions/plugin.php'); require(SM_PATH . 'include/constants.php'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |