From: Simon H. <sim...@us...> - 2010-09-30 16:56:57
|
Update of /cvsroot/stack/stack-dev/install In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv28438/install Modified Files: healthcheck.php p4.php adodbinit.php installFunctions.php Log Message: Merging 2.2 branch (with some additional fixes to ensure seamless updating for version lines) Index: p4.php =================================================================== RCS file: /cvsroot/stack/stack-dev/install/p4.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** p4.php 3 Feb 2010 11:22:29 -0000 1.11 --- p4.php 30 Sep 2010 16:56:19 -0000 1.12 *************** *** 140,145 **** <br /> <div class="row"> ! <span class="label"><?php echo get_string('stackInstall_email','stack'); ?></span><span class="formw"><input type="text" name="adminemail" size="40" value=" ! <?php echo isset($_SESSION['Sadminemail'])?$_SESSION['Sadminemail']:''; ?>" /></span> </div> <div class="row"> --- 140,144 ---- <br /> <div class="row"> ! <span class="label"><?php echo get_string('stackInstall_email','stack'); ?></span><span class="formw"><input type="text" name="adminemail" size="40" value="<?php echo isset($_SESSION['Sadminemail'])?$_SESSION['Sadminemail']:''; ?>" /></span> </div> <div class="row"> Index: adodbinit.php =================================================================== RCS file: /cvsroot/stack/stack-dev/install/adodbinit.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** adodbinit.php 21 Jan 2010 16:00:40 -0000 1.9 --- adodbinit.php 30 Sep 2010 16:56:19 -0000 1.10 *************** *** 31,36 **** require_once("../other/adodb5/adodb.inc.php"); ! define("NUM_TABLES", 10); ! define("EXPECTED_TABLE_NAMES", "'attempt_meta_PRT', 'attempt_meta_answer', 'display_cache', 'display_cache_sequence', 'keywords', 'opaque_sessions', 'question_keyword', 'question_attempts', 'response_trees', 'stackquestion'");; /** --- 31,36 ---- require_once("../other/adodb5/adodb.inc.php"); ! define("NUM_TABLES", 11); ! define("EXPECTED_TABLE_NAMES", "'attempt_meta_PRT', 'attempt_meta_answer', 'display_cache', 'display_cache_sequence', 'keywords', 'opaque_sessions', 'question_keyword', 'question_attempts', 'response_trees', 'stackquestion', 'question_lines'"); /** *************** *** 182,185 **** --- 182,186 ---- questionKeywords X, questionUserLastEdited I(11) UNSIGNED DEFAULT NULL, + line I(11) UNSIGNED, questionPublisher X, questionFormat X, *************** *** 206,209 **** --- 207,222 ---- } + // Table structure for table `question_lines` + $fields= + 'id I(11) UNSIGNED NOTNULL AUTO PRIMARY, + latestVersion I(11) UNSIGNED, + modified T NOTNULL DEFTIMESTAMP ON UPDATE '.$db->sysTimeStamp; + + $sqlarray = $dict->CreateTableSQL("question_lines", $fields, ""); + if(!$dict->ExecuteSQLArray($sqlarray)) + { + $toReturn = $dict->ErrorMsg().'<br /><br />'; + } + // Structure for `display_cache` table $fields= Index: installFunctions.php =================================================================== RCS file: /cvsroot/stack/stack-dev/install/installFunctions.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** installFunctions.php 24 May 2010 10:22:15 -0000 1.40 --- installFunctions.php 30 Sep 2010 16:56:19 -0000 1.41 *************** *** 146,150 **** $config .= ' ! $this->configArray["version"] = "STACK 2.0 beta"; $this->configArray["platform"] = '."'".$_SESSION['Splatform']."'".'; //server os / server mode $this->configArray["host"] = '."'".$_SESSION['Shost']."'".'; //server hostname --- 146,150 ---- $config .= ' ! $this->configArray["version"] = "STACK 2.2"; $this->configArray["platform"] = '."'".$_SESSION['Splatform']."'".'; //server os / server mode $this->configArray["host"] = '."'".$_SESSION['Shost']."'".'; //server hostname Index: healthcheck.php =================================================================== RCS file: /cvsroot/stack/stack-dev/install/healthcheck.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** healthcheck.php 12 Jan 2010 17:56:30 -0000 1.14 --- healthcheck.php 30 Sep 2010 16:56:19 -0000 1.15 *************** *** 98,102 **** $display = 'LaTeX'; ! $displayTestString = '\[ \sum_{n=1}^\infty \left( \frac{1}{n^2}\right) = \frac{\pi^2}{6}. \]'; require_once $root.'/lib/ui/frontend.php'; --- 98,102 ---- $display = 'LaTeX'; ! $displayTestString = '\[ \sum_{n=1}^\infty \left( \frac{1}{n^2}\right) = \frac{\pi^2}{6}. \]'; require_once $root.'/lib/ui/frontend.php'; *************** *** 150,159 **** <?php // Check the configuration of JSMath if it has been set - $jsmathroot = trim($config->get('jsmath')); - if ('' != $jsmathroot) { echo '<div class="box"><h3>'.get_string('stackInstall_jsmathcheck','stack','').'</h3>'; ! $f = 1; $c = 1;//1 for header, 2 for body, 3 for both $r = NULL; --- 150,166 ---- <?php // Check the configuration of JSMath if it has been set + // incremental checks to avoid confusing contradictory failures + + $jsmathroot = trim($config->get('jsmath')); + + if ('' != $jsmathroot) { echo '<div class="box"><h3>'.get_string('stackInstall_jsmathcheck','stack','').'</h3>'; + // firstly, is it on the same server? + if(false !== strpos($jsmathroot, $_SERVER['HTTP_HOST'])) { + echo '<p><span class="valid">'.get_string('stackInstall_success', 'stack','').'</span> '.get_string('stackInstall_jsmathsamehost', 'stack','').' <img src="'.$wroot.'/pix/'.get_string('stackIcon_success','stack').'" width="16" height="16" alt="'.get_string('stackIcon_success_alt','stack').'" /></p>'; ! // secondly, can load file be found? ! $f = 1; $c = 1;//1 for header, 2 for body, 3 for both $r = NULL; *************** *** 169,182 **** } else { echo '<p><span class="valid">'.get_string('stackInstall_success', 'stack','').'</span> '.get_string('stackInstall_jsmathok', 'stack','').' <img src="'.$wroot.'/pix/'.get_string('stackIcon_success','stack').'" width="16" height="16" alt="'.get_string('stackIcon_success_alt','stack').'" /></p>'; - } ! // is it on the same server? ! if(false !== strpos($jsmathroot, $_SERVER['HTTP_HOST'])) { ! echo '<p><span class="valid">'.get_string('stackInstall_success', 'stack','').'</span> '.get_string('stackInstall_jsmathsamehost', 'stack','').' <img src="'.$wroot.'/pix/'.get_string('stackIcon_success','stack').'" width="16" height="16" alt="'.get_string('stackIcon_success_alt','stack').'" /></p>'; ! } else { ! echo '<p><span class="failed">'.get_string('stackInstall_failed', 'stack','').'</span> '.get_string('stackInstall_jsmathdifferenthost', 'stack','').$_SERVER['HTTP_HOST'].' <img src="'.$wroot.'/pix/'.get_string('stackIcon_fail','stack').'" width="16" height="16" alt="'.get_string('stackIcon_fail_alt','stack').'" /></p>'; ! }; ! ! // is jsMath loaded? echo '<script type="text/javascript">' . 'if (!window.jsMath) document.write(\'<p><span class="failed">'.get_string('stackInstall_failed', 'stack','').'</span> '.get_string('stackInstall_jsmathnotfound', 'stack','').' <tt>'.$jsmathroot.'</tt> <img src="'.$wroot.'/pix/'.get_string('stackIcon_fail','stack').'" width="16" height="16" alt="'.get_string('stackIcon_fail_alt','stack').'" /></p>\');' . --- 176,181 ---- } else { echo '<p><span class="valid">'.get_string('stackInstall_success', 'stack','').'</span> '.get_string('stackInstall_jsmathok', 'stack','').' <img src="'.$wroot.'/pix/'.get_string('stackIcon_success','stack').'" width="16" height="16" alt="'.get_string('stackIcon_success_alt','stack').'" /></p>'; ! // finally, try to load and render with jsMath? echo '<script type="text/javascript">' . 'if (!window.jsMath) document.write(\'<p><span class="failed">'.get_string('stackInstall_failed', 'stack','').'</span> '.get_string('stackInstall_jsmathnotfound', 'stack','').' <tt>'.$jsmathroot.'</tt> <img src="'.$wroot.'/pix/'.get_string('stackIcon_fail','stack').'" width="16" height="16" alt="'.get_string('stackIcon_fail_alt','stack').'" /></p>\');' . *************** *** 187,190 **** --- 186,196 ---- '</script>'; + + } + + } else { // not same server + echo '<p><span class="failed">'.get_string('stackInstall_failed', 'stack','').'</span> '.get_string('stackInstall_jsmathdifferenthost', 'stack','').$jsmathroot.' <img src="'.$wroot.'/pix/'.get_string('stackIcon_fail','stack').'" width="16" height="16" alt="'.get_string('stackIcon_fail_alt','stack').'" /></p>'; + }; + echo '</div>'; } |