From: Simon H. <sim...@us...> - 2010-12-06 16:37:21
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1381/lib/database Modified Files: StackDBCache.php Log Message: Just a small whitespace tidy. Index: StackDBCache.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBCache.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** StackDBCache.php 17 Nov 2010 11:28:31 -0000 1.24 --- StackDBCache.php 6 Dec 2010 16:37:13 -0000 1.25 *************** *** 139,147 **** if($this->noRows()<=0) return NULL; ! else { ! $this->logger->finest("new state id = ".$this->result(0, 'id')); ! $this->logger->finest("latest mark is $currentTotalMark"); ! return $this->result(0, 'id'); ! } } --- 139,147 ---- if($this->noRows()<=0) return NULL; ! else { ! $this->logger->finest("new state id = ".$this->result(0, 'id')); ! $this->logger->finest("latest mark is $currentTotalMark"); ! return $this->result(0, 'id'); ! } } *************** *** 150,154 **** // get connection to cache $db = new StackDBCache(); ! $db->connect(); $newStates = array(); --- 150,154 ---- // get connection to cache $db = new StackDBCache(); ! $db->connect(); $newStates = array(); *************** *** 168,172 **** // create a cache state $xhtml = $instance->processQuestion(NULL, true, false); ! $sql = "INSERT INTO display_cache(qID, state, xhtml, questionNote, currentTotalMark, totalPossibleMarks, expired, lastActive) VALUES ($qID," . "'STATE GOES HERE'".//$this->dbSafeString($this->base64_serialize($instance)) . later... ", ".$db->dbSafeString(StackDBCache::hackSlashes($xhtml)).", ".$db->dbSafeString(StackDBCache::hackSlashes($instance->getQuestionNote())). --- 168,172 ---- // create a cache state $xhtml = $instance->processQuestion(NULL, true, false); ! $sql = "INSERT INTO display_cache(qID, state, xhtml, questionNote, currentTotalMark, totalPossibleMarks, expired, lastActive) VALUES ($qID," . "'STATE GOES HERE'".//$this->dbSafeString($this->base64_serialize($instance)) . later... ", ".$db->dbSafeString(StackDBCache::hackSlashes($xhtml)).", ".$db->dbSafeString(StackDBCache::hackSlashes($instance->getQuestionNote())). *************** *** 197,202 **** $db->query($sql); } ! $db->disconnect(); ! return $newStates; } --- 197,202 ---- $db->query($sql); } ! $db->disconnect(); ! return $newStates; } *************** *** 223,227 **** if($this->noRows()<=0) return NULL; ! else return $this->result(0, 'id'); } --- 223,227 ---- if($this->noRows()<=0) return NULL; ! else return $this->result(0, 'id'); } |