Update of /cvsroot/basedb/basedb/include/classes In directory sc8-pr-cvs1:/tmp/cvs-serv29789/include/classes Modified Files: basecontrol.inc.php basefile.inc.php bioassayset.inc.php ftpd.inc.php jobhandler.inc.php upload.inc.php Log Message: Work done on laptop in Gothenburg - no time for more detailed message Index: basecontrol.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/include/classes/basecontrol.inc.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** basecontrol.inc.php 30 Jan 2003 16:44:38 -0000 1.8 --- basecontrol.inc.php 10 Feb 2003 08:40:42 -0000 1.9 *************** *** 85,102 **** } function awaitUp($secs = 3600) { ! $secs = (int)$secs; ! while($secs >= 0) { - if($this->mayRun() && db_verify_connection()) - { - $query = "SELECT 1 FROM BaseControl WHERE `shutDown` = 0"; [...89 lines suppressed...] { $query = "UPDATE BaseControl SET `shutDown` = 0 ". "WHERE `shutDown` = 1"; + if(!$ignorePending) + $query .= " AND `pendingTransactions` = 0"; if(!query($query) || db_affected_rows() != 1) return false; *************** *** 217,221 **** if(!db_verify_connection()) return false; ! if(!$this->abortShutdown()) return false; $query = "UPDATE BaseControl SET `startTime` = NOW()"; --- 236,240 ---- if(!db_verify_connection()) return false; ! if(!$this->abortShutdown(false)) return false; $query = "UPDATE BaseControl SET `startTime` = NOW()"; Index: basefile.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/include/classes/basefile.inc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** basefile.inc.php 1 Feb 2003 17:18:50 -0000 1.5 --- basefile.inc.php 10 Feb 2003 08:40:42 -0000 1.6 *************** *** 162,166 **** // value is the empty string. If the file is not a BASEfile, the special // string "NOBASE" is returned. ! function countSections($filename, &$sections, &$assays) { // Use the external program, which also tracks assays --- 162,168 ---- // value is the empty string. If the file is not a BASEfile, the special // string "NOBASE" is returned. ! // $extraFloats is an array which will contain the names of extra data ! // columns (of type float) for the bioassayset (as keys). [...80 lines suppressed...] ! if($t[1] == "") ! $par = array(); else ! $par = explode("/", $t[1]); ! $assays[$t[0]] = array($par, $t[2]); } + else + $assays[$t[0]] = array(array($t[0]), ""); } } ! else if($mode == 2) { ! $extraFloats = array_flip(explode("\t", $res[$i])); ! unset($extraFloats[""]); } } + if($mode != 2) + return "Invalid output from sectionCounter (case 2)"; return ""; } Index: bioassayset.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/include/classes/bioassayset.inc.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** bioassayset.inc.php 3 Feb 2003 20:13:17 -0000 1.20 --- bioassayset.inc.php 10 Feb 2003 08:40:42 -0000 1.21 *************** *** 636,639 **** --- 636,642 ---- { global $config; + + BioAssaySet::makeGeneSearchWhere($search); + $query = "INSERT ". "INTO $config[dbDynamic]BioAssayData$this->experiment ". Index: ftpd.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/include/classes/ftpd.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ftpd.inc.php 4 Feb 2003 18:29:48 -0000 1.2 --- ftpd.inc.php 10 Feb 2003 08:40:44 -0000 1.3 *************** *** 25,28 **** --- 25,29 ---- require_once("user.inc.php"); require_once("upload.inc.php"); + require_once("search.inc.php"); class ftpd *************** *** 40,44 **** var $dirType; // What sort of directory we're in - uploads, printmaps etc. var $dirUser; // UserAccount object for owner of current dir, or NULL [...1029 lines suppressed...] + } + + if(!$this->mayAlterHere()) + { + echo "550 Access denied\r\n"; + $this->loadDirState($dirstate); + return; + } + + $fname = explode("/", $arg); + $fname = $fname[count($fname) - 1]; + + $func = $this->dirType."DeleteFile"; + $this->$func($fname); + + $this->loadDirState($dirstate); + } + function comSYST() Index: jobhandler.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/include/classes/jobhandler.inc.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** jobhandler.inc.php 2 Feb 2003 15:31:51 -0000 1.8 --- jobhandler.inc.php 10 Feb 2003 08:40:45 -0000 1.9 *************** *** 277,281 **** $sects = false; $assays = false; ! $err = BaseFileInfo::countSections($jf->getName(), $sects, $assays); if($err != "") { --- 277,283 ---- $sects = false; $assays = false; ! $extraFloats = false; ! $err = BaseFileInfo::countSections($jf->getName(), $sects, $assays, ! $extraFloats); if($err != "") { *************** *** 312,316 **** if($assays) { ! $err = $this->createChildSet($jf->getName(), $assays); if($err != "") $job->appendResultText($err); --- 314,318 ---- if($assays) { ! $err = $this->createChildSet($jf->getName(), $assays, $extraFloats); if($err != "") $job->appendResultText($err); *************** *** 325,329 **** // $assayids is an array from identifier to array(array(parents),name). ! function createChildSet($fname, &$assayids) { // These used to be function arguments --- 327,331 ---- // $assayids is an array from identifier to array(array(parents),name). ! function createChildSet($fname, &$assayids, &$extraFloats) { // These used to be function arguments Index: upload.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/include/classes/upload.inc.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** upload.inc.php 4 Feb 2003 18:28:59 -0000 1.14 --- upload.inc.php 10 Feb 2003 08:40:46 -0000 1.15 *************** *** 37,41 **** $this->fileSize = 0; $this->mimeType = ""; ! $this->addedDate = "" ? now() : strtodatetime($addedDate); } --- 37,42 ---- $this->fileSize = 0; $this->mimeType = ""; ! $this->addedDate = ! $addedDate == "" ? now() : strtodatetime($addedDate); [...102 lines suppressed...] + function updateFileSize($val) + { + $this->fileSize = (int)$val; + return Item::updateColumn("Upload", $this->id, "fileSize", + $this->fileSize); + } + // Returns all users as an array of (id,name,lastChanged,cnt) function getUserSummaryList(&$user) { $query = "SELECT ug.id, ug.name, ". ! "MAX(u.`addedDate`) AS `lastChanged`, COUNT(u.id) AS cnt ". "FROM UserGroup ug LEFT JOIN Upload u ". "ON ug.id = u.owner ". Item::whereRemovedAnd("u", 0)." ". "AND ".Item::whereShared("u", $user)." ". + "WHERE ".Item::whereRemoved("ug", 0)." ". + "AND ug.isAccount = 1 ". "GROUP BY ug.name, ug.id ORDER BY ug.name"; $res = query($query); |