diff options
author | Eudyptula <eitan@mosenkis.net> | 2009-07-15 19:42:53 -0400 |
---|---|---|
committer | Eudyptula <eitan@mosenkis.net> | 2009-07-15 19:42:53 -0400 |
commit | 5634227db6e7264c908a582685770b88f6ba69e5 (patch) | |
tree | 7336adddf8f447a1ae927cfb8d2f691b4eefb121 /shared | |
parent | Added viewing of chosen options to status viewer (diff) | |
download | ingenue-5634227db6e7264c908a582685770b88f6ba69e5.tar.gz ingenue-5634227db6e7264c908a582685770b88f6ba69e5.tar.bz2 ingenue-5634227db6e7264c908a582685770b88f6ba69e5.zip |
Divided gentoo_portage backend into several parts; Added another config step to choose which options to offer next; Added timezone selection; Fixed pkglist script; Little fixes
Diffstat (limited to 'shared')
-rw-r--r-- | shared/classes/configuration.php | 2 | ||||
-rw-r--r-- | shared/config.php | 3 | ||||
-rw-r--r-- | shared/functions/get_timezones.php | 25 | ||||
-rw-r--r-- | shared/functions/load_config.php | 2 | ||||
-rw-r--r-- | shared/include/defaults.php | 3 |
5 files changed, 32 insertions, 3 deletions
diff --git a/shared/classes/configuration.php b/shared/classes/configuration.php index 32200d4..157610b 100644 --- a/shared/classes/configuration.php +++ b/shared/classes/configuration.php @@ -37,6 +37,8 @@ class sql_configuration extends conf_build_common { for ($i=1; $i<=$module->numsteps; $i++) { $step=new wizard_step($this, $i); if (!$step->verify()) { + $this->status=$i; + $this->write(); return $i; } } diff --git a/shared/config.php b/shared/config.php index 2f73991..3920ad1 100644 --- a/shared/config.php +++ b/shared/config.php @@ -11,6 +11,7 @@ $debug=true; // Whether to print debugging information // $cookiename='ingenueid'; // Name of the cookie to send for keeping sessions // $sessionlength=1814400; // Time in seconds before sessions are purged // $mod_rewrite=true; // Use mod_rewrite for pretty URLs +// $timezone_root='/usr/share/zoneinfo'; // Directory to search for timezone data (sys-libs/timezone-data) $emailfrom='noreply@gentoo.org'; // Used as the From: field in emails $check_email_dns=true; // Use DNS to check the domain of submitted emails for validity // $split_setup=false; // Whether the frontend and backend are running on different hosts @@ -21,7 +22,7 @@ $check_email_dns=true; // Use DNS to check the domain of submitted emails for va // $progressbar_width=350; // The width, in pixels, of the config wizard progress bar // Backend options: $pkgdir_root='/home/eitan/soc/tinderbox'; // The directory to recursively search for pkgdirs (Backend only) -// $emerge_default_opts='-t -v -K --color=y --root-deps=rdeps'; // DON'T CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING +// $emerge_default_opts='-t -v -K -n --color=y --root-deps=rdeps'; // DON'T CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING // $portdir='/usr/portage'; // The directory conatining the portage tree to use (/usr/portage unless you have a reason to think otherwise) $frontend_location='http://soc'; // The base address of the frontend installation $backend_id='red'; // A name or other way of identifying this backend as opposed to other backends working for the same frontend TODO use gethostname() by default in 5.3.0 diff --git a/shared/functions/get_timezones.php b/shared/functions/get_timezones.php new file mode 100644 index 0000000..4c495cd --- /dev/null +++ b/shared/functions/get_timezones.php @@ -0,0 +1,25 @@ +<?php +function &get_timezones($dir=null) { + global $conf; + static $results; + if ($dir == null) { + if (isset($results)) + return $results; + $results=array(); + $dir=realpath($conf['timezone_root']); + } + foreach (glob($dir.'/*') as $file) { + if (is_dir($file) && !is_link($file)) + get_timezones($file); + else { + $file=substr($file, strlen($conf['timezone_root'])+1); + if ($file != 'zone.tab') + $results[$file]=str_replace('_', ' ', $file); + } + } + if ($dir == $conf['timezone_root']) { + natsort($results); + } + return $results; +} +?> diff --git a/shared/functions/load_config.php b/shared/functions/load_config.php index 7bf94b4..ac660f7 100644 --- a/shared/functions/load_config.php +++ b/shared/functions/load_config.php @@ -3,7 +3,7 @@ function load_config() { require(SHARED.'/include/defaults.php'); require(SHARED.'/config.php'); $modules=explode(' ', $modules); - foreach (explode(' ', 'title sqlhost sqluser sqlpass sqldb debug modules bundlers cookiename sessionlength mod_rewrite emailfrom check_email_dns split_setup registration invite logview_max progressbar_width pkgdir_root emerge_default_opts portdir frontend_location backend_id') as $var) { + foreach (explode(' ', 'title sqlhost sqluser sqlpass sqldb debug modules bundlers cookiename sessionlength mod_rewrite timezone_root emailfrom check_email_dns split_setup registration invite logview_max progressbar_width pkgdir_root emerge_default_opts portdir frontend_location backend_id') as $var) { if (isset($$var)) { $GLOBALS['conf'][$var]=$$var; } diff --git a/shared/include/defaults.php b/shared/include/defaults.php index 66862a8..4462abb 100644 --- a/shared/include/defaults.php +++ b/shared/include/defaults.php @@ -21,6 +21,7 @@ $bundlers=implode(' ', $bundlers); $cookiename='ingenueid'; $sessionlength=1814400; $mod_rewrite=true; +$timezone_root='/usr/share/zoneinfo'; $emailfrom='noreply@noreply.net'; $check_email_dns=false; $split_setup=false; @@ -28,7 +29,7 @@ $registration=false; $invite='admin'; $logview_max=1000; $progressbar_width=350; -$emerge_default_opts='-t -v -K --color=y --root-deps=rdeps'; +$emerge_default_opts='-t -v -K -n --color=y --root-deps=rdeps'; $portdir='/usr/portage'; //$backend_id=gethostname(); // TODO Uncomment in 5.3.0 ?> |