[CS-Project-svn_notify] SF.net SVN: cs-project: [843] trunk/1.2
Brought to you by:
crazedsanity
From: <cra...@us...> - 2008-02-17 22:11:13
|
Revision: 843 http://cs-project.svn.sourceforge.net/cs-project/?rev=843&view=rev Author: crazedsanity Date: 2008-02-17 14:11:12 -0800 (Sun, 17 Feb 2008) Log Message: ----------- Revert last changes (go back to manually building list of options & setting their value/list of values). Modified Paths: -------------- trunk/1.2/includes/setup/4.inc trunk/1.2/templates/setup/4.content.tmpl Modified: trunk/1.2/includes/setup/4.inc =================================================================== --- trunk/1.2/includes/setup/4.inc 2008-02-17 21:57:13 UTC (rev 842) +++ trunk/1.2/includes/setup/4.inc 2008-02-17 22:11:12 UTC (rev 843) @@ -9,15 +9,15 @@ $defaultValues = array( 'isdevsite' => array(1, 'numeric', 0), 'proj_name' => array(10, 'sql', "CS-Project"), - 'project_url' => array(5, 'sql', $_SERVER['HTTP_HOST']), + 'project_url' => array(5, 'sql', $_SERVER['HTTP_HOST']), 'helpdesk_issue_announce_email' => array(7, 'email', "new...@yo..."), - 'max_time' => array(5, 'sql', "18 hours"), - 'max_idle' => array(5, 'sql', "2 hours"), - 'config_session_name' => array(9, 'alpha', "CS_PROJECT_SESSID"), - 'stop_logins_on_global_alert' => array(1, 'numeric', 1), + 'max_time' => array(5, 'sql', "18 hours"), + 'max_idle' => array(5, 'sql', "2 hours"), + 'config_session_name' => array(9, 'alpha', "CS_PROJECT_SESSID"), + 'stop_logins_on_global_alert' => array(1, 'numeric', 1), 'debugprintopt' => array(1, 'numeric', 0), 'debugremovehr' => array(1, 'numeric', 0), - 'workingonit' => array(1, 'numeric', 0) + 'workingonit' => array(1, 'numeric', 0) ); @@ -60,18 +60,15 @@ } } - $configObj = new config(); - $configObj->build_update_interface($page); + foreach($priorSetupData as $index=>$value) { + //check if it's a yes/no type thing. + if(is_numeric($defaultValues[$index])) { + $index .= "__". $value ."__checked"; + $value = "selected"; + } + $page->add_template_var($index, $value); + } - #foreach($priorSetupData as $index=>$value) { - # //check if it's a yes/no type thing. - # if(is_numeric($defaultValues[$index])) { - # $index .= "__". $value ."__checked"; - # $value = "selected"; - # } - # $page->add_template_var($index, $value); - #} - $page->add_template_var("currentUrl", $_SERVER['HTTP_HOST']); } @@ -96,9 +93,6 @@ $retval = __FUNCTION__ .": ". $index ." failed minimum length check after cleaning"; } } - elseif($index == 'workingonit') { - $goodValues++; - } else { $retval = __FUNCTION__ .": ". $index ." contains invalid data"; } Modified: trunk/1.2/templates/setup/4.content.tmpl =================================================================== --- trunk/1.2/templates/setup/4.content.tmpl 2008-02-17 21:57:13 UTC (rev 842) +++ trunk/1.2/templates/setup/4.content.tmpl 2008-02-17 22:11:12 UTC (rev 843) @@ -6,65 +6,110 @@ </p> - - <form method="POST" onSubmit="new Effect.DropOut('submitButton');"> -<a name="config" /> -<table border="1" cellpadding="3" cellspacing="0" width="80%"> -<tr> - <th colspan="2">Config Settings</th> -</tr> -<tr> - <td colspan="2" align="center"> - <div class="note" style="width:60em"><b>NOTE:</b> You should be <font color="red"><b>absolutely certain</b></font> of the - effects of the changes you make here. Changing an item to an incorrect value make render the - installation useless. To rectify a broken configuration, you would need to modify the - <b>/lib/config.xml</b> file manually.</div> - </td> -</tr> -<tr> - <th width="80%">Name/Description</th> - <th width="20%">Value/Select Option</th> -</tr> -<!-- BEGIN setting_text --> +<table border=1 cellpadding=3 cellspacing=0> <tr> + <th>Is Development Site?</th> <td> - <b>%%title%%</b> (%%index%%)<BR> - %%description%% + <SELECT name="fields[isdevsite]"> + <option value="0" {isdevsite__0__checked}>0 (False)</option> + <option value="1" {isdevsite__1__checked}>1 (True)</option> + </SELECT> </td> - - <td><input name="fields[%%index%%]" type="text" value="%%value%%" %%disabled%%></td> + <td>Whether it's a development site for cs-project or not... (TODO: add more info here)</td> </tr> -<!-- END setting_text --> -<!-- BEGIN setting_select --> + <tr> + <th>Project Name</th> + <td><input type="text" name="fields[proj_name]" value="{proj_name}" size="40"></td> + <td>Displayed name of the project (like "CS-Project")</td> + </tr> + + <tr> + <th>Project URL</th> + <td><input type="text" name="fields[project_url]" value="{project_url}" size="40"></td> + <td>Generally it's this website: ( <i>http://{currentUrl}</i> ).</td> + </tr> + + <tr> + <th nowrap>Helpdesk Issue Announce Email</th> + <td><input type="text" name="fields[helpdesk_issue_announce_email]" value="{helpdesk_issue_announce_email}" size="40"></td> + <td>This would be something like "<i>new...@yo...</i>"</td> + </tr> + + <tr> + <th nowrap>Mail Server IP</th> <td> - <b>%%title%%</b> (%%index%%)<BR> - %%description%% + <input type="text" name="fields[phpmailer_host]" value="{phpmailer_host}" size="40"> + <input type="HIDDEN" name="fields[phpmailer_method]" value="IsSMTP"> </td> - - <td> - <select name="fields[%%index%%]" %%disabled%%> - %%setting_select__normal%% - </select> + <td>This should be the IP of your mailserver, like <i>127.0.0.1</i>...</td> + </tr> + + + <tr> + <th>Maximum Session Length</th> + <td><input type="text" name="fields[max_time]" value="{max_time}" size="10"></td> + <td>This is how long any single session can be open before it's automatically removed from the server.</td> + </tr> + + <tr> + <th>Maximum Idleness</th> + <td><input type="text" name="fields[max_idle]" value="{max_idle}" size="10"></td> + <td>How long a session can be idle (no page views/activities) before it is removed.</td> + </tr> + + <tr> + <th>Session Name</th> + <td><input type="text" name="fields[config_session_name]" value="{config_session_name}" size="40"></td> + <td>Name of the session: really, this only matters if you have other websites running under the same + domain using PHP sessions, in which case this should be unique to avoid random annoying issues.</td> + </tr> + + + <tr> + <th>Stop Logins on Global Alert</th> + <td><SELECT name="fields[stop_logins_on_global_alert]"> + <option value="0" {stop_logins_on_global_alert__0__checked}>0 (off)</option> + <option value="1" {stop_logins_on_global_alert__1__checked}>1 (on)</option> + </SELECT></td> + <td>(<font color="red"><b>Currently unimplemented</b></font>) Stop users from logging in if a global alert has been created.</td> + </tr> + + + <tr> + <th>Debug Printing?</th> + <td><SELECT name="fields[debugprintopt]"> + <option value="0" {debugprintopt__0__checked}>0 (off)</option> + <option value="1" {debugprintopt__1__checked}>1 (on)</option> + </SELECT> </td> + <td>Generally, this should only be turned on if you're running a development site for cs-project...</td> </tr> -<!-- END setting_select --> -<!-- BEGIN setting_locked --> + + <tr> - <td> - <b>%%title%%</b> (%%index%%)<BR> - %%description%% + <th>Debug Print: Add "HR" Tag?</th> + <td><SELECT name="fields[debugremovehr]"> + <option value="0" {debugremovehr__0__checked}>0 (no separator)</option> + <option value="1" {debugremovehr__1__checked}>1 (add separator)</option> + </SELECT> </td> - - <td> - <!-- NOTE: should we even have hidden elements in the form? --> - <input type="text" name="fields[%%index%%]" value="%%value%%" disabled> - </td> + <td>This setting affects whether or not there are separators between debug_print()'s (useful to discover if there's a print occurring that is otherwise not visible)</td> </tr> -<!-- END setting_locked --> + + + <tr> + <th>Working On It?</th> + <td>0 (no)<input type="HIDDEN" name="fields[workingonit]" value="0"></td> + <td><font color="red"><b><blink>WARNING!</blink></b></font> Setting this to a non-zero value + will DISABLE all connections to the database, and make your site unuseable. It is provided as + a simple, fast way to stop connections to your database, usually for maintenance purposes. It + is displayed here for reference only.</td> + </tr> + <tr> <td colspan="3" align="center"><input id="submitButton" type="submit" value="Go to next step"><td> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |