You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(14) |
Sep
(76) |
Oct
(65) |
Nov
(177) |
Dec
(147) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(257) |
Feb
(313) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv31072 Modified Files: bio.inc.php extract_edit.phtml extract_list.phtml htmlinit.phtml hyb.inc.php item.inc.php labeled_edit.phtml labeled_list.phtml misc.inc.php raw_common.inc.php sample_edit.phtml sample_list.phtml search.inc.php Added Files: item_common.inc.php Log Message: First steps towards data hiding. --- NEW FILE: item_common.inc.php --- <? // $Id: item_common.inc.php,v 1.1 2002/09/12 22:37:56 troein Exp $ // // BioArray Software Environment (BASE) - homepage http://base.thep.lu.se/ // Copyright (C) 2002 Lao Saal, Carl Troein, Johan Vallon-Christersson (LSCTJVC) // // Write to LSCTJVC, Dept. of Oncology, Lund University Hospital, // Klinikgatan 7, SE-22185, Lund, Sweden. // // This file is part of BASE. // // BASE is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // BASE is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // Input: Item object or scalar. Output: string denoting deleted item. function remMark(&$obj) { if(is_object($obj)) { if(!$obj->getRemoved()) return ""; } else if(!$obj) return ""; return " <span class=del>(D)</span>"; } // Set $showdel from $i_showdel function showDelPrep() { global $showdel, $i_showdel; $showdel = isset($i_showdel) ? max(-1, min(1, (int)$i_showdel)) : 0; } // Get value to use for $removed in function call function showDelValue() { global $showdel; return $showdel < 0 ? NULL : $showdel; } // Get value for $removed when you want to hide removed items unless // the user is including removed items in the search. function showDelSublist() { global $showdel; return $showdel === 0 ? 0 : NULL; } // Outputs a table row with links to change what to view. Must be in // a form called "ff". $columns is the number of cols in the table. function showDelLinks($columns) { global $showdel; ?> <input type=hidden name=i_showdel value="<?= $showdel ?>"> <script> function showDel(sd) { document.ff.i_showdel.value=sd; document.ff.submit(); } </script> <tr><td colspan=<?= $columns ?> align=right> <a <?= !$showdel ? "class=special" : "" ?> href="javascript:showDel(0)">Undeleted</a> / <a <?= $showdel > 0 ? "class=special" : "" ?> href="javascript:showDel(1)">Deleted</a> / <a <?= $showdel < 0 ? "class=special" : "" ?> href="javascript:showDel(-1)">All</a> </td></tr> <? } ?> Index: bio.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bio.inc.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** bio.inc.php 10 Sep 2002 23:04:50 -0000 1.24 --- bio.inc.php 12 Sep 2002 22:37:56 -0000 1.25 *************** *** 34,45 **** class Sample extends Item { ! var $tissue/*, $project*/; function Sample($name = "", $descr = "", $owner = 0, $addedDate = "", ! $tissue = 0, /*$project = 0,*/ $id = 0, $visible = 0) { ! $this->Item("Sample", $name, $descr, $owner, $addedDate, $id, $visible); $this->tissue = (int)$tissue; ! /* $this->project = (int)$project;*/ [...821 lines suppressed...] + return parent::getBasicFromId("LabeledExtract", $id); + } function countForExtract($extract) *************** *** 769,781 **** { parent::changeQuantityLeft("LabeledExtract", $amount, $id); - } - - function lockId($id, $exclusive) - { - return parent::lockItem("LabeledExtract", $id, $exclusive); - } - function unlockId($id, $exclusive) - { - return parent::unlockItem("LabeledExtract", $id, $exclusive); } --- 795,798 ---- Index: extract_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/extract_edit.phtml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** extract_edit.phtml 10 Sep 2002 23:05:02 -0000 1.14 --- extract_edit.phtml 12 Sep 2002 22:37:56 -0000 1.15 *************** *** 27,30 **** --- 27,31 ---- require_once("protocol.inc.php"); require_once("bio.inc.php"); + require_once("item_common.inc.php"); verifyAccess(BUA_BIO_READ); *************** *** 38,43 **** if($i_ext > 0) { [...271 lines suppressed...] - <tr><th>Usecount</th><td><?= $usecount ?></td></tr> - <tr><td colspan=2><a <?= href("labeled_edit.phtml?i_ext=$extid", 1) - ?>>Label extract</a></td></tr> - </table> <? } ?> --- 315,326 ---- <tr><th>Owner</th><td><?= html($uname) ?></td></tr> <tr><th>Public</th><td><?= $ext->isSharedWith(0) ? "Yes" : "No" ?></td></tr> <? + if(!$ext->getRemoved()) + { + echo "<tr><td colspan=2><a ". + href("labeled_edit.phtml?i_ext=$extid", 1).">". + "Label extract</a></td></tr>\n"; + } + echo "</table>"; } ?> Index: extract_list.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/extract_list.phtml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** extract_list.phtml 5 Aug 2002 11:29:34 -0000 1.11 --- extract_list.phtml 12 Sep 2002 22:37:56 -0000 1.12 *************** *** 30,37 **** require_once("search.inc.php"); require_once("searchhtml.inc.php"); verifyAccess(BUA_BIO_READ); ! $searchfields = array("Name", "Description", "Sample", "User", "Date added", "Extraction date", "Protocol", "Quantity left"); $fieldtype = array(0, 0, 0, 0, 1, 1, 0, 2); --- 30,39 ---- require_once("search.inc.php"); [...86 lines suppressed...] "<td>".$qty."</td>". ! "<td>".LabeledExtract::countForExtract($s["id"]). ! "<a href='labeled_edit.phtml?i_ext=$s[id]'> [new]</a></td>". "<td>".$hybs."</td></tr>\n"; } ! if($addlink != "") echo "<tr><td colspan=9>$addlink</td></tr>\n"; ?> </form> --- 102,112 ---- "<td>".($s["public"] ? "Yes" : "No")."</td>". "<td>".$qty."</td>". ! "<td>".$labs."</td>". "<td>".$hybs."</td></tr>\n"; } ! $cols = 9; ! if($addlink != "") ! echo "<tr><td colspan=$cols>$addlink</td></tr>\n"; ! showDelLinks($cols); ?> </form> Index: htmlinit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/htmlinit.phtml,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** htmlinit.phtml 5 Aug 2002 11:29:34 -0000 1.24 --- htmlinit.phtml 12 Sep 2002 22:37:56 -0000 1.25 *************** *** 42,59 **** if(isset($pageTitle) && $pageTitle != "") echo "<title>".html($pageTitle, 0)."</title>\n"; ?> <meta name=creator content="Typoed by Círdan"> <style type="text/css"> ! a:active { text-decoration: underline; color: #ff5050; } a:link { text-decoration: none; color: #1000d0; } a:visited { text-decoration: none; color: #1000d0; } ! a.ext:active { text-decoration: underline; color: #ff5050; } a.ext:link { text-decoration: none; color: #f00000; } a.ext:visited { text-decoration: none; color: #800000; } ! body { font-family: Helvetica, sans-serif; background-color: #f0f4f4; font-size: <?= $curDisplay->getTextSize("normal") ?>pt; font-weight: normal } ! div { font-family: Helvetica, sans-serif; background-color: #f0f4f4; font-size: <?= $curDisplay->getTextSize("normal") ?>pt; font-weight: normal } td { font-family: Helvetica, sans-serif; font-size: <?= --- 42,61 ---- if(isset($pageTitle) && $pageTitle != "") echo "<title>".html($pageTitle, 0)."</title>\n"; + + $bgColor = "#f0f4f4"; ?> <meta name=creator content="Typoed by Círdan"> <style type="text/css"> ! a:active { text-decoration: none; color: #ff5050; } a:link { text-decoration: none; color: #1000d0; } a:visited { text-decoration: none; color: #1000d0; } ! a.ext:active { text-decoration: none; color: #ff5050; } a.ext:link { text-decoration: none; color: #f00000; } a.ext:visited { text-decoration: none; color: #800000; } ! body { font-family: Helvetica, sans-serif; background-color: <?= $bgColor ?>; font-size: <?= $curDisplay->getTextSize("normal") ?>pt; font-weight: normal } ! div { font-family: Helvetica, sans-serif; background-color: <?= $bgColor ?>; font-size: <?= $curDisplay->getTextSize("normal") ?>pt; font-weight: normal } td { font-family: Helvetica, sans-serif; font-size: <?= *************** *** 74,78 **** .help { font-style: italic } .special { font-weight: bold } ! .pagehead { text-align: left; background-color: #f0f4f4; font-size: <?= $curDisplay->getTextSize("pagehead") ?>pt } .subhead { text-align: left; font-size: <?= --- 76,80 ---- .help { font-style: italic } .special { font-weight: bold } ! .pagehead { text-align: left; background-color: <?= $bgColor ?>; font-size: <?= $curDisplay->getTextSize("pagehead") ?>pt } .subhead { text-align: left; font-size: <?= *************** *** 82,85 **** --- 84,88 ---- font-weight: bold; background-color: #ffe0c0; } .red { color: Red; font-size: <?= $curDisplay->getTextSize("large") ?>pt } + .del { color: #e00050; font-weight: bold } .popup { color: #007010 } .tiny { font-size: <?= $curDisplay->getTextSize("tiny") ?>pt } *************** *** 101,105 **** ?> </head> ! <body bgcolor=#f0f4f4 text=black> <? } --- 104,108 ---- ?> </head> ! <body bgcolor="<?= $bgColor ?>" text=black> <? } Index: hyb.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/hyb.inc.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** hyb.inc.php 10 Sep 2002 23:05:10 -0000 1.21 --- hyb.inc.php 12 Sep 2002 22:37:56 -0000 1.22 *************** *** 33,40 **** var $hybridizationDate, $protocol; ! function Hybridization($name = "", $descr = "", $owner = 0, $addedDate = "", ! $hybridizationDate = "", $protocol = 0, $id = 0) { ! $this->Item("Hybridization", $name, $descr, $owner, $addedDate, $id); $this->hybridizationDate = $hybridizationDate; $this->protocol = (int)$protocol; --- 33,42 ---- var $hybridizationDate, $protocol; [...265 lines suppressed...] + return parent::getBasicFromId("Hybridization", $id); + } function isOwner($id, $owner) *************** *** 298,310 **** query($query); return db_affected_rows() > 0; - } - - function lockId($id, $exclusive) - { - return parent::lockItem("Hybridization", $id, $exclusive); - } - function unlockId($id, $exclusive) - { - return parent::unlockItem("Hybridization", $id, $exclusive); } } --- 321,324 ---- Index: item.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/item.inc.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** item.inc.php 12 Sep 2002 11:45:26 -0000 1.29 --- item.inc.php 12 Sep 2002 22:37:56 -0000 1.30 *************** *** 67,76 **** } ! function sqlRemoved($table, $removed) { if(isset($removed)) ! return "AND $table.removed == ".(int)(bool)$removed; return ""; } function read($id, $owner = -1, $removed = NULL) [...179 lines suppressed...] $res = query($query); while($row =& db_fetch_row($res)) *************** *** 222,225 **** --- 244,258 ---- else $n = ""; return $n; + } + + // Returns an array with (name,removed,owner) + function getBasicFromId($type, $id) + { + $query = "SELECT name, removed, owner ". + "FROM $type WHERE id = ".(int)$id; + $res = query($query); + if($row =& db_fetch_assoc($res)) + return $row; + return false; } Index: labeled_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/labeled_edit.phtml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** labeled_edit.phtml 10 Sep 2002 23:05:53 -0000 1.14 --- labeled_edit.phtml 12 Sep 2002 22:37:56 -0000 1.15 *************** *** 27,30 **** --- 27,31 ---- require_once("protocol.inc.php"); require_once("bio.inc.php"); + require_once("item_common.inc.php"); verifyAccess(BUA_BIO_READ); *************** *** 47,62 **** { $newlabeled = true; [...261 lines suppressed...] - <tr><th>Usecount</th><td><?= $usecount ?></td></tr> - <tr><td colspan=2><a <?= href("hyb_edit.phtml?i_lext=$lextid", 1) - ?>>Hybridize labeled extract</a></td></tr> - </table> <? } ?> --- 337,348 ---- <tr><th>Owner</th><td><?= html($uname) ?></td></tr> <tr><th>Public</th><td><?= $lext->isSharedWith(0) ? "Yes" : "No" ?></td></tr> <? + if(!$lext->getRemoved()) + { + echo "<tr><td colspan=2><a ". + href("hyb_edit.phtml?i_lext=$lextid", 1).">". + "Hybridize labeled extract</a></td></tr>\n"; + } + echo "</table>"; } ?> Index: labeled_list.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/labeled_list.phtml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** labeled_list.phtml 29 Aug 2002 16:51:34 -0000 1.12 --- labeled_list.phtml 12 Sep 2002 22:37:56 -0000 1.13 *************** *** 30,35 **** --- 30,37 ---- require_once("search.inc.php"); require_once("searchhtml.inc.php"); + require_once("item_common.inc.php"); verifyAccess(BUA_BIO_READ); + showDelPrep(); $searchfields = array("Name", "Description", "Extract", "Sample", *************** [...83 lines suppressed...] "<td><a href='labeled_edit.phtml?i_lext=$s[id]'>". ! html($s["name"]).remMark($s["removed"])."</a></td>". "<td>".html($s["label"])."</td>". "<td>$elink</td>". *************** *** 103,107 **** "<td>".$hybs."</td></tr>\n"; } ! if($addlink != "") echo "<tr><td colspan=8>$addlink</td></tr>\n"; ?> </form> --- 110,117 ---- "<td>".$hybs."</td></tr>\n"; } ! $cols = 8; ! if($addlink != "") ! echo "<tr><td colspan=$cols>$addlink</td></tr>\n"; ! showDelLinks($cols); ?> </form> Index: misc.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/misc.inc.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** misc.inc.php 12 Sep 2002 11:45:26 -0000 1.37 --- misc.inc.php 12 Sep 2002 22:37:56 -0000 1.38 *************** *** 376,378 **** --- 376,379 ---- "href=\"javascript:window.close()\">Close</a>]</span>"; } + ?> Index: raw_common.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw_common.inc.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** raw_common.inc.php 10 Sep 2002 23:06:28 -0000 1.18 --- raw_common.inc.php 12 Sep 2002 22:37:56 -0000 1.19 *************** *** 67,71 **** if(isset($i_expgo)) { ! $iua = ignore_user_abort(); $expid = 0; if(isset($i_expname) && $i_expname != "") --- 67,71 ---- if(isset($i_expgo)) { ! $iua = ignore_user_abort(1); $expid = 0; if(isset($i_expname) && $i_expname != "") Index: sample_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/sample_edit.phtml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** sample_edit.phtml 10 Sep 2002 23:06:29 -0000 1.18 --- sample_edit.phtml 12 Sep 2002 22:37:56 -0000 1.19 *************** *** 29,32 **** --- 29,33 ---- require_once("sampletissue.inc.php"); require_once("sampleannotation.inc.php"); + require_once("item_common.inc.php"); verifyAccess(BUA_BIO_READ); *************** *** 35,53 **** $edit = true; $err = ""; [...305 lines suppressed...] ! <tr><th>Sample date</th><td><?= htmldate($samp->getSampleDate()) ?></td></tr> ! <tr><th>Date added</th><td><?= htmldate($samp->getAddedDate()) ?></td></tr> <tr><th>Owner</th><td><?= html($uname) ?></td></tr> <tr><th>Public</th><td><?= $samp->isSharedWith(0) ? "Yes" : "No" ?></td></tr> <tr><td colspan=2 class=tiny> </td></tr> <tr><th colspan=2 class=subhead>Annotations</th></tr> *************** *** 277,284 **** --- 298,308 ---- "<td>".html($arr["annotation"])."</td></tr>\n"; } + if(!$samp->getRemoved()) + { ?> <tr><td colspan=2><a <?= href("extract_edit.phtml?i_samp=$sampid", 1) ?>>Extract from sample</a></td></tr> <? + } } ?> Index: sample_list.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/sample_list.phtml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** sample_list.phtml 23 Aug 2002 13:16:11 -0000 1.14 --- sample_list.phtml 12 Sep 2002 22:37:56 -0000 1.15 *************** *** 32,45 **** require_once("search.inc.php"); require_once("searchhtml.inc.php"); verifyAccess(BUA_BIO_READ); $view = isset($i_view) && $i_view ? 1 : 0; ! $searchfields = array("Name", "Description", "User", "Date added"); ! $searchtypes = array(0, 0, 0, 1); if(!$view) [...143 lines suppressed...] ! $anns = SampleAnnotation::getBrieferForSample($s["id"]); ! echo "<tr bgcolor=$tdbg[$odd]>". ! "<td><a href='sample_edit.phtml?i_samp=$s[id]'>". ! html($s["name"])."</a></td>"; ! for(reset($annottypes); list($aid) = each($annottypes); ) ! { ! if(isset($anns[$aid])) ! echo "<td>".html($anns[$aid])."</td>"; ! else echo "<td bgcolor=$tdbg2[$odd]> </td>"; ! } ! echo "</tr>\n"; } } ! if($addlink != "") ! echo "<tr><td colspan=$cols>$addlink</td></tr>\n"; ! showDelLinks($cols); ?> </form> Index: search.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/search.inc.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** search.inc.php 11 Sep 2002 10:35:51 -0000 1.41 --- search.inc.php 12 Sep 2002 22:37:56 -0000 1.42 *************** *** 603,607 **** $this->extraWhere[$where[$t]] = 1; } ! else $this->extraWhere[$where] = 1; } function addLeftJoin($lj) --- 603,608 ---- $this->extraWhere[$where[$t]] = 1; } ! else if($where != "") ! $this->extraWhere[$where] = 1; } function addLeftJoin($lj) |
From: <tr...@us...> - 2002-09-12 13:53:33
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv6203 Modified Files: molecule.inc.php probe_search.phtml Log Message: Added genelist to probe search Index: molecule.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/molecule.inc.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** molecule.inc.php 10 Sep 2002 23:06:03 -0000 1.32 --- molecule.inc.php 12 Sep 2002 13:53:29 -0000 1.33 *************** *** 642,646 **** "m.`geneSymbol`", "m.`geneName`", "m.chromosome", "m.`cytoBand`", "m.markers", "m.`locusLink`", "m.omim", "m.accession", "m.nid", ! "m.antibiotics", "t.name", "v.name", "l.name"); $tables = array(13 => array("Tissue t", "t.id = m.tissue"), 14 => array("Vector v", "v.id = m.vector"), --- 642,646 ---- "m.`geneSymbol`", "m.`geneName`", "m.chromosome", "m.`cytoBand`", "m.markers", "m.`locusLink`", "m.omim", "m.accession", "m.nid", ! "m.antibiotics", "t.name", "v.name", "l.name", "m.id"); $tables = array(13 => array("Tissue t", "t.id = m.tissue"), 14 => array("Vector v", "v.id = m.vector"), Index: probe_search.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/probe_search.phtml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** probe_search.phtml 10 Sep 2002 23:06:24 -0000 1.3 --- probe_search.phtml 12 Sep 2002 13:53:29 -0000 1.4 *************** *** 57,62 **** "Gene symbol", "Reporter name", "Chromosome", "Cytoband", "Markers", "Locuslink", "OMIM", "Accession", "NID", "Antibiotics", ! "Tissue", "Vector", "Library"); ! $fieldtype = array(9, 0, 2, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0); $headerfields = array("Reporter ID", "Cluster", "Gene sym.", "Reporter name"); --- 57,62 ---- "Gene symbol", "Reporter name", "Chromosome", "Cytoband", "Markers", "Locuslink", "OMIM", "Accession", "NID", "Antibiotics", ! "Tissue", "Vector", "Library", "Gene list"); ! $fieldtype = array(9, 0, 2, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 7); $headerfields = array("Reporter ID", "Cluster", "Gene sym.", "Reporter name"); *************** *** 66,70 **** $search = makeSearchTable($userid, "molecule", "User", $userid, ! "molecule", $searchfields, $fieldtype, 2, "", true); ?> <p> --- 66,70 ---- $search = makeSearchTable($userid, "molecule", "User", $userid, ! "molecule", $searchfields, $fieldtype, 2, "", true, 0); ?> <p> |
From: <tr...@us...> - 2002-09-12 13:23:25
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv28140 Modified Files: plate.inc.php Log Message: fixed c'n'p-error in the name of getIdFromBarcode Index: plate.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/plate.inc.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** plate.inc.php 10 Sep 2002 23:06:13 -0000 1.33 --- plate.inc.php 12 Sep 2002 13:23:22 -0000 1.34 *************** *** 818,836 **** function getIdFromName($name, $wells = 0) { ! $query = "SELECT id FROM Plate WHERE name = '".addslashes($name)."'"; ! if($wells) $query .= " AND wells = ".(int)$wells; $res = query($query); ! if($row =& db_fetch_row($res)) return $row[0]; return 0; } // Returns 0 if there's no such barcode ! function getIdFromName($barcode, $wells = 0) { $query = "SELECT id FROM Plate ". "WHERE barcode = '".addslashes($barcode)."'"; ! if($wells) $query .= " AND wells = ".(int)$wells; $res = query($query); ! if($row =& db_fetch_row($res)) return $row[0]; return 0; } --- 818,841 ---- function getIdFromName($name, $wells = 0) { ! $query = "SELECT id FROM Plate ". ! "WHERE name = '".addslashes($name)."'"; ! if($wells) ! $query .= " AND wells = ".(int)$wells; $res = query($query); ! if($row =& db_fetch_row($res)) ! return $row[0]; return 0; } // Returns 0 if there's no such barcode ! function getIdFromBarcode($barcode, $wells = 0) { $query = "SELECT id FROM Plate ". "WHERE barcode = '".addslashes($barcode)."'"; ! if($wells) ! $query .= " AND wells = ".(int)$wells; $res = query($query); ! if($row =& db_fetch_row($res)) ! return $row[0]; return 0; } |
From: <tr...@us...> - 2002-09-12 11:45:29
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv27760 Modified Files: assay_plotter.phtml bioassay.inc.php experiment_plotter.phtml item.inc.php misc.inc.php raw.inc.php searchhtml.inc.php spotinfo.phtml test.phtml trans_create.phtml Log Message: added SNR to plot and filtering, plus some misc stuff Index: assay_plotter.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/assay_plotter.phtml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** assay_plotter.phtml 29 Aug 2002 16:51:33 -0000 1.7 --- assay_plotter.phtml 12 Sep 2002 11:45:25 -0000 1.8 *************** *** 61,65 **** // Limit the width and height if($format == "txt") $minmax = array(24, 97, 40, 12, 46, 25); ! else if($format == "png") $minmax = array(40, 1280, 640, 30, 960, 480); else $minmax = array(0, 1280, 640, 0, 960, 480); --- 61,65 ---- // Limit the width and height if($format == "txt") $minmax = array(24, 97, 40, 12, 46, 25); ! else if($format == "png") $minmax = array(40, 1280, 800, 30, 960, 600); else $minmax = array(0, 1280, 640, 0, 960, 480); *************** *** 88,96 **** $assayColsY = array_merge($assayColsX, array("Histogram")); $annotCols = array("(raw) Block", "(raw) Flags", "log2(ratio)", ! "Plate N", "Plate N-1"); $plotAnnot = isset($i_annot) ? max(-1, min(count($annotCols) - 1, (int)$i_annot)) : -1; ! $colorScale = $plotAnnot == 2; if(!isset($i_ploty)) $i_ploty = 0; --- 88,102 ---- $assayColsY = array_merge($assayColsX, array("Histogram")); $annotCols = array("(raw) Block", "(raw) Flags", "log2(ratio)", ! "Plate N", "Plate N-1", ! "log2 SNR(means)", "log2 SNR(medians)", ! "log2 SNR(Ch1 mean)", "log2 SNR(Ch2 mean)", ! "log2 SNR(Ch1 median)", "log2 SNR(Ch2 median)" ! ); ! $withColorScale = array(0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1); ! $withColorScale[-1] = 0; $plotAnnot = isset($i_annot) ? max(-1, min(count($annotCols) - 1, (int)$i_annot)) : -1; ! $colorScale = $withColorScale[$plotAnnot]; if(!isset($i_ploty)) $i_ploty = 0; Index: bioassay.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassay.inc.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** bioassay.inc.php 11 Sep 2002 10:35:12 -0000 1.38 --- bioassay.inc.php 12 Sep 2002 11:45:25 -0000 1.39 *************** *** 310,314 **** "Growth (LIMS)", "Bands (LIMS)", ! "Seq ver. (LIMS)" ); } --- 310,316 ---- "Growth (LIMS)", "Bands (LIMS)", ! "Seq ver. (LIMS)", ! "Raw SNR(Ch1 mean)", "Raw SNR(Ch2 mean)", [...113 lines suppressed...] } ! if($third == 3 || $third == 4) { $extra .= " p.name AS `C`"; *************** *** 1141,1145 **** $arr = array(); while($row =& db_fetch_row($res)) ! $arr[] = $row; return $arr; } --- 1180,1187 ---- $arr = array(); while($row =& db_fetch_row($res)) ! { ! if(isset($row[0]) && isset($row[1])) ! $arr[] = $row; ! } return $arr; } Index: experiment_plotter.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/experiment_plotter.phtml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** experiment_plotter.phtml 5 Aug 2002 11:29:33 -0000 1.11 --- experiment_plotter.phtml 12 Sep 2002 11:45:26 -0000 1.12 *************** *** 89,93 **** $rawCols = array("Mean(Mean FG)", "Mean(Mean BG)", "% flagged", "Mean(Median FG)", "Mean(Median BG)", ! "Mean(Ch1 total int.)", "Mean(Ch2 total int.)"); $rawColsX = array("Raw data sets"); $annotCols = array("Owner", "Array print", "Hybridization date"); --- 89,96 ---- $rawCols = array("Mean(Mean FG)", "Mean(Mean BG)", "% flagged", "Mean(Median FG)", "Mean(Median BG)", ! "Mean(Ch1 total int.)", "Mean(Ch2 total int.)", ! "Mean(SNR(Ch1 mean))", "Mean(SNR(Ch2 mean))", ! "Mean(SNR(Ch1 median))", "Mean(SNR(Ch2 median))" ! ); $rawColsX = array("Raw data sets"); $annotCols = array("Owner", "Array print", "Hybridization date"); *************** *** 382,387 **** else { ! fwrite($fd, "set title \"".addslashes(ereg_replace("[^[:print:]]", ! "", $annotCols[$plotAnnot].", ".$exp->getName()))."\"\n"); // Find all annotations and group the data points by them. --- 385,390 ---- else { ! fwrite($fd, "set title \"".addslashes(printable( ! $annotCols[$plotAnnot].", ".$exp->getName()))."\"\n"); // Find all annotations and group the data points by them. *************** *** 407,412 **** for(reset($rawnames); list($i, $n) = each($rawnames); ) { ! fwrite($fd, "set label \" ".addslashes(ereg_replace( ! "[^[:print:]]", "", $n))."\" at $i,0 $justify rotate\n"); } --- 410,415 ---- for(reset($rawnames); list($i, $n) = each($rawnames); ) { ! fwrite($fd, "set label \" ".addslashes(printable($n)). ! "\" at $i,0 $justify rotate\n"); } *************** *** 417,421 **** if($ann == "") $ann = "not annotated"; fwrite($fd, ($f ? "plot" : ",")." '-' title \"". ! addslashes(ereg_replace("[^[:print:]]", "", $ann))."\""); } fwrite($fd, "\n"); --- 420,424 ---- if($ann == "") $ann = "not annotated"; fwrite($fd, ($f ? "plot" : ",")." '-' title \"". ! addslashes(printable($ann))."\""); } fwrite($fd, "\n"); Index: item.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/item.inc.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** item.inc.php 10 Sep 2002 23:05:33 -0000 1.28 --- item.inc.php 12 Sep 2002 11:45:26 -0000 1.29 *************** *** 32,38 **** class Item { ! var $type, $id, $name, $descr, $owner, $addedDate, $visible; ! function Item($type, $name, $descr, $owner, $addedDate, $id, $visible = 1) { $this->type = $type; --- 32,39 ---- class Item { [...81 lines suppressed...] ! } else { $query = "SELECT i.* FROM $this->type i, Shared$this->type s ". ! "WHERE s.item = i.id AND s.owner IN (0, $owner) ". ! "AND i.id = $id ". ! $this->sqlRemoved("i", $removed); } return $this->readQuery($query); } ! function readOwned($id, $owner, $removed = NULL) { $id = (int)$id; $owner = (int)$owner; $query = "SELECT i.* FROM $this->type i ". ! "WHERE i.owner = $owner AND i.id = $id ". ! $this->sqlRemoved("i", $removed); return $this->readQuery($query); } Index: misc.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/misc.inc.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** misc.inc.php 10 Sep 2002 23:06:00 -0000 1.36 --- misc.inc.php 12 Sep 2002 11:45:26 -0000 1.37 *************** *** 85,88 **** --- 85,90 ---- else { + // A Location header must have an absolute path. There will + // be no violation of the HTTP standard on my watch. if($url == "" || substr($url, 0, 1) != "/") $url = $config["urlpath"].$url; Index: raw.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw.inc.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** raw.inc.php 10 Sep 2002 23:06:28 -0000 1.38 --- raw.inc.php 12 Sep 2002 11:45:26 -0000 1.39 *************** *** 706,710 **** $arr = array(); while($row =& db_fetch_row($res)) ! $arr[] = $row; return $arr; } --- 706,713 ---- $arr = array(); while($row =& db_fetch_row($res)) ! { ! if(isset($row[0]) && isset($row[1])) ! $arr[] = $row; ! } return $arr; } *************** *** 716,719 **** --- 719,723 ---- // 3 = mean median fg, 4 = mean median bg, // 5 = mean ch1 int., 6 = mean ch2 int. + // 7-10 = mean SNR(ch[1/2] [mean/median]) // fg and bg are (ch1 fg + ch2 fg) etc. // $grouping: -1 = none, 0 = user name, 1 = print name, 2 = hybe day *************** *** 721,730 **** { $expid = (int)$expid; ! $what = max(0, min(6, (int)$what)); $grouping = max(-1, min(2, (int)$grouping)); if($what != 2) { ! $whats = array("rbad.`FCh1Mean`+rbad.`FCh2Mean`", "rbad.`BCh1Mean`+rbad.`BCh2Mean`", "", --- 725,735 ---- { $expid = (int)$expid; ! $what = max(0, min(10, (int)$what)); $grouping = max(-1, min(2, (int)$grouping)); if($what != 2) { ! $whats = array( ! "rbad.`FCh1Mean`+rbad.`FCh2Mean`", "rbad.`BCh1Mean`+rbad.`BCh2Mean`", "", *************** *** 732,736 **** "rbad.`BCh1Median`+rbad.`BCh2Median`", "rbad.`FCh1Mean`*rbad.`FPixels`", ! "rbad.`FCh2Mean`*rbad.`FPixels`"); $wot = "AVG($whats[$what]), STDDEV($whats[$what]+0.0)*". "SQRT(COUNT(*)/(COUNT(*)+1.0))"; --- 737,746 ---- "rbad.`BCh1Median`+rbad.`BCh2Median`", "rbad.`FCh1Mean`*rbad.`FPixels`", ! "rbad.`FCh2Mean`*rbad.`FPixels`", ! "(rbad.`FCh1Mean`-rbad.`BCh1Mean`) / rbad.`BCh1SD`", ! "(rbad.`FCh2Mean`-rbad.`BCh2Mean`) / rbad.`BCh2SD`", ! "(rbad.`FCh1Median`-rbad.`BCh1Median`) rbad.`BCh1SD`", ! "(rbad.`FCh2Median`-rbad.`BCh2Median`) / rbad.`BCh2SD`" ! ); $wot = "AVG($whats[$what]), STDDEV($whats[$what]+0.0)*". "SQRT(COUNT(*)/(COUNT(*)+1.0))"; *************** *** 747,751 **** "WHERE rbad.`rawBioAssay` = r.id AND r.id = pr.`rawBioAssay` ". "AND pr.experiment = $expid GROUP BY name, id ORDER BY name"; - $res = query($query); $arr = array(); --- 757,760 ---- Index: searchhtml.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/searchhtml.inc.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** searchhtml.inc.php 10 Sep 2002 23:06:30 -0000 1.40 --- searchhtml.inc.php 12 Sep 2002 11:45:26 -0000 1.41 *************** *** 280,284 **** } ! if(!$noform) echo "<form method=post action='$PHP_SELF'>\n"; echo "<tr><th>".webHelp(87)." Field</th><th>Op</th>". --- 280,285 ---- } ! if(!$noform) ! echo "<form method=post action='$PHP_SELF'>\n"; echo "<tr><th>".webHelp(87)." Field</th><th>Op</th>". Index: spotinfo.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/spotinfo.phtml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** spotinfo.phtml 5 Aug 2002 11:19:01 -0000 1.9 --- spotinfo.phtml 12 Sep 2002 11:45:26 -0000 1.10 *************** *** 69,76 **** function sigNoise(&$v, &$e1, &$e2) { ! if($v === false || ($e1 === false && $e2 === false)) return "-"; ! if($e1 === false) $noise = $e2; else if($e2 === false) $noise = $e1; ! else $noise = sqrt($e1*$e1 + $e2*$e2); if($noise == 0) return "inf"; return sprintf("%.2f", $v / $noise); --- 69,77 ---- function sigNoise(&$v, &$e1, &$e2) { ! if($v === false || (/*$e1 === false &&*/ $e2 === false)) return "-"; ! /* if($e1 === false) $noise = $e2; else if($e2 === false) $noise = $e1; ! else $noise = sqrt($e1*$e1 + $e2*$e2);*/ ! $noise =& $e2; if($noise == 0) return "inf"; return sprintf("%.2f", $v / $noise); Index: test.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/test.phtml,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** test.phtml 7 Sep 2002 11:36:32 -0000 1.47 --- test.phtml 12 Sep 2002 11:45:26 -0000 1.48 *************** *** 26,32 **** header("content-type: text/plain"); require_once("init.inc.php"); ! echo "Testing db...\n"; ob_implicit_flush(1); $s = array(0, 0, 0); --- 26,35 ---- header("content-type: text/plain"); + echo "old PHP_SELF: $_SERVER[PHP_SELF]\n"; require_once("init.inc.php"); ! echo "new PHP_SELF: $PHP_SELF\n"; ! ! /*echo "Testing db...\n"; ob_implicit_flush(1); $s = array(0, 0, 0); *************** *** 71,75 **** echo "db_fetch_assoc2: $s[1] s\n"; echo "&db_fetch_assoc2: $s[2] s\n"; ! ?> --- 74,78 ---- echo "db_fetch_assoc2: $s[1] s\n"; echo "&db_fetch_assoc2: $s[2] s\n"; ! */ ?> Index: trans_create.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/trans_create.phtml,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** trans_create.phtml 10 Sep 2002 23:06:30 -0000 1.25 --- trans_create.phtml 12 Sep 2002 11:45:26 -0000 1.26 *************** *** 242,246 **** ob_implicit_flush(0); echo "<p>\n"; ! if($err != "") echo "<span class=red>Error: <?= $err ?></span><p>\n"; ?> <a class=large href="<?= html($location, 0) ?>">Return to BASE</a> --- 242,247 ---- ob_implicit_flush(0); echo "<p>\n"; ! if($err != "") ! echo "<span class=red>Error: $err</span><p>\n"; ?> <a class=large href="<?= html($location, 0) ?>">Return to BASE</a> |
From: <tr...@us...> - 2002-09-11 16:49:50
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv24047 Modified Files: plate_upload.phtml Log Message: missing semicolon Index: plate_upload.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/plate_upload.phtml,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** plate_upload.phtml 10 Sep 2002 23:06:17 -0000 1.29 --- plate_upload.phtml 11 Sep 2002 16:49:46 -0000 1.30 *************** *** 157,161 **** <tr><th>Plate name prefix</th><td><input type=text size=15 name=i_pref maxlength=<?= CLEN_PLATETYPE_NAMEPREFIX ?> ! value="<?= html($ptype->getNamePrefix() 0) ?>"></td></tr> <script>setPref(document.forms[0].i_pt);</script> <tr><th>Plate name padding</th><td>to --- 157,161 ---- <tr><th>Plate name prefix</th><td><input type=text size=15 name=i_pref maxlength=<?= CLEN_PLATETYPE_NAMEPREFIX ?> ! value="<?= html($ptype->getNamePrefix(), 0) ?>"></td></tr> <script>setPref(document.forms[0].i_pt);</script> <tr><th>Plate name padding</th><td>to |
From: <tr...@us...> - 2002-09-11 10:37:33
|
Update of /cvsroot/basedb/basedb In directory usw-pr-cvs1:/tmp/cvs-serv4515 Modified Files: base_pg.sql Log Message: Removed TemplateGeneListTemp, added function ISNULL Index: base_pg.sql =================================================================== RCS file: /cvsroot/basedb/basedb/base_pg.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** base_pg.sql 10 Sep 2002 10:58:47 -0000 1.5 --- base_pg.sql 11 Sep 2002 10:37:30 -0000 1.6 *************** *** 69,73 **** "arrayType" integer DEFAULT '0' NOT NULL, "blockNum" smallint DEFAULT '0' NOT NULL, ! "xOrigin2" integer DEFAULT '0' NOT NULL, "yOrigin" integer DEFAULT '0' NOT NULL, "featureDiameter" smallint DEFAULT '0' NOT NULL, --- 69,73 ---- "arrayType" integer DEFAULT '0' NOT NULL, "blockNum" smallint DEFAULT '0' NOT NULL, ! "xOrigin" integer DEFAULT '0' NOT NULL, "yOrigin" integer DEFAULT '0' NOT NULL, "featureDiameter" smallint DEFAULT '0' NOT NULL, *************** *** 1421,1430 **** ); - CREATE TABLE TemplateGeneListTemp ( - molecule integer DEFAULT '0' NOT NULL, - score integer DEFAULT nextval('genelisttemp_score_seq'::text) NOT NULL, - Constraint TemplateGeneListTemp_pkey Primary Key (molecule, score) - ); - -- -- TOC Entry ID 86 (OID 1099899) --- 1421,1424 ---- *************** *** 2251,2252 **** --- 2245,2248 ---- SELECT setval ('sampletissue_id_seq', 2, true); + + CREATE FUNCTION "ifnull"(smallint, integer) RETURNS smallint AS 'select CASE WHEN $1 IS NULL THEN $2 ELSE $1 END' LANGUAGE 'sql'; |
From: <tr...@us...> - 2002-09-11 10:36:17
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv4239 Modified Files: basefile_spots.inc.php Log Message: flush after every line in stdout version Index: basefile_spots.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/basefile_spots.inc.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** basefile_spots.inc.php 5 Aug 2002 11:29:31 -0000 1.6 --- basefile_spots.inc.php 11 Sep 2002 10:36:14 -0000 1.7 *************** *** 368,371 **** --- 368,372 ---- } echo "\n"; + flush(); } |
From: <tr...@us...> - 2002-09-11 10:35:54
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv4151 Modified Files: search.inc.php Log Message: Genelist fixes, changed , to CROSS JOIN for extraTables Index: search.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/search.inc.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** search.inc.php 11 Sep 2002 09:02:50 -0000 1.40 --- search.inc.php 11 Sep 2002 10:35:51 -0000 1.41 *************** *** 559,564 **** function getExtraTables() { ! if(!$this->extraTables) return implode(" ", $this->leftJoin); ! return ",".implode(",", array_keys($this->extraTables))." ". implode(" ", $this->leftJoin); } --- 559,566 ---- function getExtraTables() { ! if(!$this->extraTables) ! return implode(" ", $this->leftJoin); ! return " CROSS JOIN ". ! implode(" CROSS JOIN ", array_keys($this->extraTables))." ". implode(" ", $this->leftJoin); } *************** *** 580,584 **** list(, $c) = each($this->extraColumns); ) { ! $a .= ", $c[4] AS $c[2]"; } return $a; --- 582,586 ---- list(, $c) = each($this->extraColumns); ) { ! $a .= ", $c[4] AS `$c[2]`"; } return $a; *************** *** 711,715 **** $this->addExtraTable("GeneListGene glg$pos"); $this->addExtraWhere("glg$pos.molecule = $fname ". ! "AND glg$pos.geneList = $gl"); $glname = $this->criteria[$i]->getViewable(); $this->addExtraColumn($glname[0], 1, "glValue$pos", 0, --- 713,717 ---- $this->addExtraTable("GeneListGene glg$pos"); $this->addExtraWhere("glg$pos.molecule = $fname ". ! "AND glg$pos.`geneList` = $gl"); $glname = $this->criteria[$i]->getViewable(); $this->addExtraColumn($glname[0], 1, "glValue$pos", 0, *************** *** 721,725 **** $gl = (int)$this->criteria[$i]->getValue(); $this->addLeftJoin("LEFT JOIN GeneListGene glg$pos ". ! "ON glg$pos.molecule = $fname AND glg$pos.geneList = $gl"); $this->addExtraWhere("glg$pos.molecule $ops[$op]"); } --- 723,727 ---- $gl = (int)$this->criteria[$i]->getValue(); $this->addLeftJoin("LEFT JOIN GeneListGene glg$pos ". ! "ON glg$pos.molecule = $fname AND glg$pos.`geneList` = $gl"); $this->addExtraWhere("glg$pos.molecule $ops[$op]"); } |
From: <tr...@us...> - 2002-09-11 10:35:16
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv4029 Modified Files: bioassay.inc.php Log Message: Magic to get all 4 kinds of basefiles to work Index: bioassay.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassay.inc.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** bioassay.inc.php 11 Sep 2002 09:02:04 -0000 1.37 --- bioassay.inc.php 11 Sep 2002 10:35:12 -0000 1.38 *************** *** 593,597 **** "EXP(AVG(".db_func_log("bad.ratio").")) AS ratio, ". "COUNT(*) AS position"; ! $group = "GROUP BY id"; } else --- 593,597 ---- "EXP(AVG(".db_func_log("bad.ratio").")) AS ratio, ". "COUNT(*) AS position"; ! $group = "GROUP BY id $xf"; } [...271 lines suppressed...] return; } --- 914,918 ---- } } ! $buffer[-1] =& $tempFields; return; } *************** *** 865,869 **** --- 922,930 ---- $res = query($query); while($row =& db_fetch_assoc($res)) + { + for(reset($tempFields); list(, $f) = each($tempFields); ) + unset($row[$f]); $callback($row); + } } |
From: <tr...@us...> - 2002-09-11 09:03:39
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv11914 Modified Files: pgsql.inc.php Log Message: added db_oper_like(), implemented dupKey Index: pgsql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/pgsql.inc.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pgsql.inc.php 10 Sep 2002 23:01:42 -0000 1.13 --- pgsql.inc.php 11 Sep 2002 09:03:36 -0000 1.14 *************** *** 48,53 **** function dupKey() { ! // Need to figure out how to do this. ! return false; } } --- 48,53 ---- function dupKey() { ! return ereg("^ERROR: Cannot insert a duplicate key into unique index", ! pg_last_error()); } } *************** *** 261,265 **** // order or what columns to use. All the table's columns must be included // and in the exact same order they're in in the database. Thus there's ! // also no way to ue the default values. function db_tabfile_load($filename, $table, $columns) { --- 261,265 ---- // order or what columns to use. All the table's columns must be included // and in the exact same order they're in in the database. Thus there's ! // also no way to use the default values. function db_tabfile_load($filename, $table, $columns) { *************** *** 277,284 **** $added++; else - { $err = 1; - error_log("offending line: $f[$i]"); - } } pg_put_line("\\.\n"); --- 277,281 ---- *************** *** 311,318 **** { $query = "DROP TABLE $table"; ! if(!@pg_query($query) && ! pg_last_error() != "ERROR: table \"$table\" does not exist") { ! error_log("PostgresSQL query failed: \"".$query."\" : ".rtrim(pg_last_error())); return false; } --- 308,316 ---- { $query = "DROP TABLE $table"; ! if(!@pg_query($query) && !strcasecmp(pg_last_error(), ! "ERROR: table \"$table\" does not exist")) { ! error_log("PostgresSQL query failed: \"".$query."\" : ". ! rtrim(pg_last_error())); return false; } *************** *** 419,422 **** --- 417,425 ---- { return ""; + } + + function db_oper_like() + { + return "ILIKE"; } |
From: <tr...@us...> - 2002-09-11 09:03:08
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv11572 Modified Files: mysql.inc.php Log Message: added db_oper_like() Index: mysql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/mysql.inc.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mysql.inc.php 10 Sep 2002 10:57:41 -0000 1.16 --- mysql.inc.php 11 Sep 2002 09:03:06 -0000 1.17 *************** *** 317,319 **** --- 317,324 ---- } + function db_oper_like() + { + return "LIKE"; + } + ?> |
From: <tr...@us...> - 2002-09-11 09:02:52
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv11389 Modified Files: user.inc.php search.inc.php Log Message: Replaced LIKE with db_oper_like() Index: user.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/user.inc.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** user.inc.php 10 Sep 2002 23:06:35 -0000 1.10 --- user.inc.php 11 Sep 2002 09:02:50 -0000 1.11 *************** *** 328,332 **** "WHERE userName = '".addslashes($name)."'", "SELECT id, `userName` FROM Submitter ". ! "WHERE name LIKE '".addslashes($name)."%' ".db_limit(0, 1)); for($i = 0; $i < count($qarr); $i++) { --- 328,333 ---- "WHERE userName = '".addslashes($name)."'", "SELECT id, `userName` FROM Submitter ". ! "WHERE name ".db_oper_like()." '".addslashes($name)."%' ". ! db_limit(0, 1)); for($i = 0; $i < count($qarr); $i++) { Index: search.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/search.inc.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** search.inc.php 10 Sep 2002 23:06:30 -0000 1.39 --- search.inc.php 11 Sep 2002 09:02:50 -0000 1.40 *************** *** 677,681 **** if(is_string($arr[0])) { ! if($op == 2) $opname = "LIKE"; else $opname = $ops[$op]; $where .= " AND $fname $opname '".addslashes($arr[0])."'"; --- 677,682 ---- if(is_string($arr[0])) { ! if($op == 2) ! $opname = db_oper_like(); else $opname = $ops[$op]; $where .= " AND $fname $opname '".addslashes($arr[0])."'"; *************** *** 695,699 **** { for($j = 0; $j < count($arr); $j++) ! $arr[$j] = "$fname LIKE '".addslashes($arr[$j])."'"; $n = $op == 7 ? "" : "NOT "; $where .= " AND $n(".implode(" OR ", $arr).")"; --- 696,703 ---- { for($j = 0; $j < count($arr); $j++) ! { ! $arr[$j] = "$fname ".db_oper_like(). ! " '".addslashes($arr[$j])."'"; ! } $n = $op == 7 ? "" : "NOT "; $where .= " AND $n(".implode(" OR ", $arr).")"; |
From: <tr...@us...> - 2002-09-11 09:02:09
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv10892 Modified Files: bioassay.inc.php genelist.inc.php Log Message: Fixed adding of genelists for pgsql Index: bioassay.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassay.inc.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** bioassay.inc.php 10 Sep 2002 23:04:52 -0000 1.36 --- bioassay.inc.php 11 Sep 2002 09:02:04 -0000 1.37 *************** *** 480,484 **** $ob = $search->makeOrderBy($sortfields); ! $query = "SELECT DISTINCT bad.molecule ". "FROM $config[dbDynamic]BioAssayData$this->experiment bad $ljoin ". $search->getExtraTables()." ". --- 480,489 ---- $ob = $search->makeOrderBy($sortfields); ! if($GLOBALS["config"]["RDBMS"] == "mysql") ! $distinct = "DISTINCT"; ! else ! $distinct = ""; ! ! $query = "SELECT $distinct bad.molecule ". "FROM $config[dbDynamic]BioAssayData$this->experiment bad $ljoin ". $search->getExtraTables()." ". Index: genelist.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/genelist.inc.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** genelist.inc.php 10 Sep 2002 23:05:02 -0000 1.22 --- genelist.inc.php 11 Sep 2002 09:02:04 -0000 1.23 *************** *** 143,147 **** "WHERE ".db_true()." ".$search->getExtraWhere()." ". $search->getWhere()." ". ! "GROUP BY id $ob ".$search->makeLimit(); $arr = array(); --- 143,147 ---- "WHERE ".db_true()." ".$search->getExtraWhere()." ". $search->getWhere()." ". ! "$ob ".$search->makeLimit(); [...105 lines suppressed...] ! for(reset($mols); (list($m) = each($mols)) && !$err; ) ! { ! $added++; ! $data = array($this->id, $m, $added); ! if(!db_multiinsert_row($multi, $data)) ! $err = true; ! } ! if(!$err) ! $added = db_multiinsert_finish($multi); ! else ! $added = -1; ! } ! } } ! ignore_user_abort($iua); $this->updateGeneCount(); ! return $added; } |
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv8081 Modified Files: acquisition.inc.php array.inc.php array_batch.phtml array_common.inc.php array_edit.phtml array_print.phtml bio.inc.php bioassay.inc.php bioassayset.inc.php eventlog.inc.php experiment.inc.php experiment_common.inc.php experiment_edit.phtml experiment_list.phtml extract_edit.phtml genelist.inc.php genelist_edit.phtml hyb.inc.php hyb_edit.phtml hyb_image.phtml hyb_result.phtml image.inc.php item.inc.php job.inc.php labeled_edit.phtml left.phtml misc.inc.php molecule.inc.php molecule_list.phtml news.inc.php news_edit.phtml plate.inc.php plate_arrange.phtml plate_edit.phtml plate_upload.phtml platetype_edit.phtml probe_search.phtml program.inc.php program_edit.phtml protocol.inc.php protocol_edit.phtml raw.inc.php raw_common.inc.php raw_edit.phtml sample_edit.phtml sampleannot_edit.phtml sampleannotation.inc.php sampletissue.inc.php sampletissue_tree.phtml search.inc.php searchhtml.inc.php trans_create.phtml transformation.inc.php upload.inc.php user.inc.php user_edit.phtml ware.inc.php ware_edit.phtml wizzzard.inc.php wizzzard_new.phtml Log Message: Defined constants CLEN_... with text column length limits, added maxlength to text INPUTs Index: acquisition.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/acquisition.inc.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** acquisition.inc.php 10 Sep 2002 09:29:44 -0000 1.15 --- acquisition.inc.php 10 Sep 2002 23:04:36 -0000 1.16 *************** *** 28,31 **** --- 28,33 ---- require_once("hyb.inc.php"); + define("CLEN_IMAGEACQUISITION_NAME", 60); + class ImageAcquisition extends Item { *************** *** 121,124 **** --- 123,130 ---- } + function setName($val) + { + $this->name = maxlen($val, CLEN_IMAGEACQUISITION_NAME); + } function setHybridization($val) { *************** *** 127,131 **** function setscanDate($val) { ! $this->scanDate = $val; } --- 133,137 ---- function setscanDate($val) { ! $this->scanDate = strtodate($val); } Index: array.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/array.inc.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** array.inc.php 9 Sep 2002 19:55:46 -0000 1.36 --- array.inc.php 10 Sep 2002 23:04:36 -0000 1.37 *************** *** 27,30 **** --- 27,36 ---- require_once("item.inc.php"); + define("CLEN_ARRAYTYPE_NAME", CLEN_ITEM_NAME); + define("CLEN_ARRAYTYPE_PLATFORM", 255); + define("CLEN_ARRAYBATCH_NAME", CLEN_ITEM_NAME); + define("CLEN_ARRAYBATCH_SURFACETYPE", 40); + define("CLEN_ARRAY_BARCODE", 20); + class ArrayType extends Item { *************** *** 143,147 **** function setPlatform($val) { ! $this->platform = $val; } function setProtocol($val) --- 149,153 ---- function setPlatform($val) { ! $this->platform = maxlen($val, CLEN_ARRAYTYPE_PLATFORM); } function setProtocol($val) *************** *** 607,619 **** function setprintStartDate($val) { ! $this->printStartDate = $val; } function setprintEndDate($val) { ! $this->printEndDate = $val; } function setsurfaceType($val) { ! $this->surfaceType = $val; } function setprotocol($val) --- 613,625 ---- function setprintStartDate($val) { ! $this->printStartDate = strtodate($val); } function setprintEndDate($val) { ! $this->printEndDate = strtodate($val); } function setsurfaceType($val) { ! $this->surfaceType = maxlen($val, CLEN_ARRAYBATCH_SURFACETYPE); } function setprotocol($val) Index: array_batch.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/array_batch.phtml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** array_batch.phtml 7 Sep 2002 11:36:31 -0000 1.18 --- array_batch.phtml 10 Sep 2002 23:04:37 -0000 1.19 *************** *** 153,158 **** ?> <tr><th>Array design</th><td><?= $link ?></td></tr> ! <tr><th>Print name</th><td><input type=text name=i_name size=10 value="<?= ! html($ab->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea name=i_descr cols=40 rows=4 wrap=soft><?= html($ab->getDescr(), 0) ?></textarea></td></tr> --- 153,159 ---- ?> <tr><th>Array design</th><td><?= $link ?></td></tr> ! <tr><th>Print name</th><td><input type=text name=i_name size=10 ! maxlength=<?= CLEN_ARRAYBATCH_NAME ?> ! value="<?= html($ab->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea name=i_descr cols=40 rows=4 wrap=soft><?= html($ab->getDescr(), 0) ?></textarea></td></tr> *************** *** 160,168 **** wrap=soft><?= html($ab->getNotes(), 0) ?></textarea></td></tr> <tr><th>Print started (Y-m-d H:m:s)</th><td><input type=text name=i_sdate ! size=18 value="<?= html($ab->getPrintStartDate(), 0) ?>"></td></tr> <tr><th>Print ended (Y-m-d H:m:s)</th><td><input type=text name=i_edate ! size=18 value="<?= html($ab->getPrintEndDate(), 0) ?>"></td></tr> ! <tr><th>Surface type</th><td><input type=text name=i_surf ! size=18 value="<?= html($ab->getSurfaceType(), 0) ?>"></td></tr> <tr><th>Printing protocol</th><td><select name=i_proto> <? --- 161,174 ---- wrap=soft><?= html($ab->getNotes(), 0) ?></textarea></td></tr> <tr><th>Print started (Y-m-d H:m:s)</th><td><input type=text name=i_sdate ! size=18 value="<?= html($ab->getPrintStartDate(), 0) ?>"> ! <input type=button value="Now" ! onClick="this.form.i_sdate.value='<?= now() ?>'"></td></tr> <tr><th>Print ended (Y-m-d H:m:s)</th><td><input type=text name=i_edate ! size=18 value="<?= html($ab->getPrintEndDate(), 0) ?>"> ! <input type=button value="Now" ! onClick="this.form.i_edate.value='<?= now() ?>'"></td></tr> ! <tr><th>Surface type</th><td><input type=text name=i_surf size=18 ! maxlength=<?= CLEN_ARRAYBATCH_SURFACETYPE ?> ! value="<?= html($ab->getSurfaceType(), 0) ?>"></td></tr> <tr><th>Printing protocol</th><td><select name=i_proto> <? Index: array_common.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/array_common.inc.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** array_common.inc.php 29 Aug 2002 16:51:33 -0000 1.10 --- array_common.inc.php 10 Sep 2002 23:04:40 -0000 1.11 *************** *** 297,311 **** else $e = "<td class=red>$errs[$pos]</td>"; ! echo "<tr bgcolor=$tdbg[$odd]>". ! "<td><input type=text size=14 name='i_barcode[$pos]' ". ! "value=\"".html($bc, 0)."\"></td>". ! "<td>".$pos."</td>". ! "<td><select name='i_state[$pos]'><option $dn value=0>No". ! "<option $dy value=1>Yes</select></td>". ! "<td>".$hlink."</td>". ! "<td>".html($b["userName"])."</td>". ! "<td><input type=text size=40 name='i_adescr[$pos]' ". ! "value=\"".html($descr, 0)."\"></td>". ! "$e</tr>\n"; unset($i_barcode[$pos]); } --- 297,317 ---- else $e = "<td class=red>$errs[$pos]</td>"; ! ?> ! <tr bgcolor=<? $tdbg[$odd] ?>> ! <td><input type=text size=14 name='i_barcode[<?= $pos ?>]' ! maxlength=<?= CLEN_ARRAY_BARCODE ?> ! value="<?= html($bc, 0) ?>"></td> ! <td><?= $pos ?></td> ! <td><select name='i_state[<?= $pos ?>]'> ! <option <?= $dn ?> value=0>No ! <option <?= $dy ?> value=1>Yes ! </select></td> ! <td><?= $hlink ?></td> ! <td><?= html($b["userName"]) ?></td> ! <td><input type=text size=40 name='i_adescr[$pos]' ! value="<?= html($descr, 0) ?>"></td> ! <?= $e ?> ! </tr> ! <? unset($i_barcode[$pos]); } *************** *** 326,329 **** --- 332,336 ---- echo "<tr bgcolor=$tdbg[$odd]>". "<td><input type=text size=14 name='i_barcode[$pos]' ". + "maxlength=".CLEN_ARRAY_BARCODE." ". "value=\"".html($bc, 0)."\"></td>". "<td>".$pos." (new)</td>". *************** *** 344,347 **** --- 351,355 ---- echo "<tr bgcolor=$tdbg[$odd]>". "<td><input type=text size=14 name='i_barcode[$pos]' ". + "maxlength=".CLEN_ARRAY_BARCODE." ". "value=''></td>". "<td>".$pos." (new)</td>". *************** *** 358,363 **** <? } - - ?> --- 366,369 ---- Index: array_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/array_edit.phtml,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** array_edit.phtml 29 Aug 2002 16:51:33 -0000 1.21 --- array_edit.phtml 10 Sep 2002 23:04:45 -0000 1.22 *************** *** 162,167 **** --- 162,169 ---- <tr><th>Design name</th><td><input type=text size=20 name=i_name + maxlength=<?= CLEN_ARRAYTYPE_NAME ?> value="<?= html($at->getName(), 0) ?>"></td></tr> <tr><th>Platform type</th><td><input type=text size=20 name=i_plat + maxlength=<?= CLEN_ARRAYTYPE_PLATFORM ?> value="<?= html($at->getPlatform(), 0) ?>"></td></tr> <tr><th>Configuration (protocol)</th><td> Index: array_print.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/array_print.phtml,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** array_print.phtml 29 Aug 2002 16:51:33 -0000 1.17 --- array_print.phtml 10 Sep 2002 23:04:47 -0000 1.18 *************** *** 157,161 **** ?> ick a file to upload</th><td><input type=file name=i_file></td></tr> ! <tr><th>File description</th><td><input type=text name=i_descr size=30></td></tr> <tr><td colspan=2><input type=submit value="Continue"></td></tr> </form> --- 157,162 ---- ?> ick a file to upload</th><td><input type=file name=i_file></td></tr> ! <tr><th>File description</th> ! <td><input type=text name=i_descr size=30></td></tr> <tr><td colspan=2><input type=submit value="Continue"></td></tr> </form> Index: bio.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bio.inc.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** bio.inc.php 9 Sep 2002 19:55:46 -0000 1.23 --- bio.inc.php 10 Sep 2002 23:04:50 -0000 1.24 *************** *** 28,31 **** --- 28,35 ---- /*require_once("project.inc.php");*/ + define("CLEN_SAMPLE_NAME", CLEN_ITEM_NAME); + define("CLEN_EXTRACT_NAME", CLEN_ITEM_NAME); + define("CLEN_LABELEDEXTRACT_NAME", CLEN_ITEM_NAME); + class Sample extends Item { Index: bioassay.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassay.inc.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** bioassay.inc.php 10 Sep 2002 10:57:41 -0000 1.35 --- bioassay.inc.php 10 Sep 2002 23:04:52 -0000 1.36 *************** *** 29,32 **** --- 29,34 ---- require_once("search.inc.php"); + define("CLEN_BIOASSAY_NAME", 50); + class BioAssay extends Item { *************** *** 131,134 **** --- 133,140 ---- [...137 lines suppressed...] *** 1017,1025 **** $groups = array("rbad.block", "rbad.flags", ! "FLOOR(LOG(bad.ratio)/LOG(2)+.5)"); $rawgroups = array(1, 1, 0, 1, 1); if($histbox == -1) { ! $groups[2] = "FLOOR(LOG(bad.ratio)*30+.5)"; $rawgroups[2] = 1; $extra = "rbad.dia,"; --- 1032,1040 ---- $groups = array("rbad.block", "rbad.flags", ! "ROUND(".db_func_log("bad.ratio", 2).")"); $rawgroups = array(1, 1, 0, 1, 1); if($histbox == -1) { ! $groups[2] = "ROUND(".db_func_log("bad.ratio")."*30.)"; $rawgroups[2] = 1; $extra = "rbad.dia,"; Index: bioassayset.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassayset.inc.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** bioassayset.inc.php 10 Sep 2002 10:57:41 -0000 1.27 --- bioassayset.inc.php 10 Sep 2002 23:04:54 -0000 1.28 *************** *** 29,32 **** --- 29,34 ---- require_once("transformation.inc.php"); + define("CLEN_BIOASSAYSET_NAME", 30); + class BioAssaySet extends Item { *************** *** 164,167 **** --- 166,173 ---- } + function setName($val) + { + $this->name = maxlen($val, CLEN_BIOASSAYSET_NAME); + } function setexperiment($val) { *************** *** 253,257 **** $id = (int)$id; $query = "SELECT COUNT(*) FROM BioAssay ". ! "WHERE bioAssaySet = $id"; $res = query($query); if($row =& db_fetch_row($res)) return $row[0]; --- 259,263 ---- $id = (int)$id; $query = "SELECT COUNT(*) FROM BioAssay ". ! "WHERE `bioAssaySet` = $id"; $res = query($query); if($row =& db_fetch_row($res)) return $row[0]; *************** *** 270,274 **** $query = "SELECT COUNT(*) ". "FROM BioAssay ba, $config[dbDynamic]BioAssayData$expid bad ". ! "WHERE ba.bioAssaySet = $id AND bad.bioAssay = ba.id"; $res = query($query); if($row =& db_fetch_row($res)) return $row[0]; --- 276,280 ---- $query = "SELECT COUNT(*) ". "FROM BioAssay ba, $config[dbDynamic]BioAssayData$expid bad ". ! "WHERE ba.`bioAssaySet` = $id AND bad.`bioAssay` = ba.id"; $res = query($query); if($row =& db_fetch_row($res)) return $row[0]; *************** *** 287,291 **** $query = "SELECT COUNT(*) ". "FROM $config[dbDynamic]BioAssaySetGene$expid ". ! "WHERE bioAssaySet = $id"; $res = query($query); if($row =& db_fetch_row($res)) return $row[0]; --- 293,297 ---- $query = "SELECT COUNT(*) ". "FROM $config[dbDynamic]BioAssaySetGene$expid ". ! "WHERE `bioAssaySet` = $id"; $res = query($query); if($row =& db_fetch_row($res)) return $row[0]; Index: eventlog.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/eventlog.inc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** eventlog.inc.php 8 Sep 2002 22:38:08 -0000 1.5 --- eventlog.inc.php 10 Sep 2002 23:04:57 -0000 1.6 *************** *** 26,29 **** --- 26,31 ---- require_once("db.inc.php"); + define("CLEN_EVENTLOG_MESSAGE", 255); + class EventLog { *************** *** 32,36 **** $query = "INSERT INTO EventLog ". "(`eventDate`, `eventType`, message) VALUES ". ! "(NOW(), '".addslashes($type)."', '".addslashes($message)."')"; return (bool)query($query); } --- 34,39 ---- $query = "INSERT INTO EventLog ". "(`eventDate`, `eventType`, message) VALUES ". ! "(NOW(), '".addslashes($type)."', ". ! "'".addslashes(maxlen($message, CLEN_EVENTLOG_MESSAGE))."')"; return (bool)query($query); } Index: experiment.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/experiment.inc.php,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** experiment.inc.php 9 Sep 2002 10:56:08 -0000 1.49 --- experiment.inc.php 10 Sep 2002 23:04:59 -0000 1.50 *************** *** 27,30 **** --- 27,39 ---- require_once("bioassayset.inc.php"); + define("CLEN_EXPERIMENT_NAME", 30); + define("CLEN_EXPERIMENT_AUTHORS", 65535); + define("CLEN_EXPERIMENT_AFFILIATIONS", 65535); + define("CLEN_EXPERIMENT_EXPERIMENTTYPE", 255); + define("CLEN_EXPERIMENT_EXPERIMENTDESIGN", 65535); + define("CLEN_EXPERIMENT_PUBLICATIONS", 65535); + define("CLEN_EXPERIMENT_ABSTRACT", 65535); + define("CLEN_EXPERIMENT_PUBMEDID", 40); + class Experiment extends Item { *************** *** 210,213 **** --- 219,226 ---- } + function setName($val) + { + $this->name = maxlen($val, CLEN_EXPERIMENT_NAME); + } function setshownTab($val) { *************** *** 241,269 **** function setauthors($val) { ! $this->authors = $val; } function setaffiliations($val) { ! $this->affiliations = $val; } function setexperimentType($val) { ! $this->experimentType = $val; } function setexperimentDesign($val) { ! $this->experimentDesign = $val; } function setpublication($val) { ! $this->publication = $val; } function setabstract($val) { ! $this->abstract = $val; } function setpubMedId($val) { ! $this->pubMedId = $val; } function setpublicationDate($val) --- 254,282 ---- function setauthors($val) { ! $this->authors = maxlen($val, CLEN_EXPERIMENT_AUTHORS); } function setaffiliations($val) { ! $this->affiliations = maxlen($val, CLEN_EXPERIMENT_AFFILIATIONS); } function setexperimentType($val) { ! $this->experimentType = maxlen($val, CLEN_EXPERIMENT_EXPERIMENTTYPE); } function setexperimentDesign($val) { ! $this->experimentDesign = maxlen($val, CLEN_EXPERIMENT_EXPERIMENTDESIGN); } function setpublication($val) { ! $this->publication = maxlen($val, CLEN_EXPERIMENT_PUBLICATION); } function setabstract($val) { ! $this->abstract = maxlen($val, CLEN_EXPERIMENT_ABSTRACT); } function setpubMedId($val) { ! $this->pubMedId = maxlen($val, CLEN_EXPERIMENT_PUBMEDID); } function setpublicationDate($val) Index: experiment_common.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/experiment_common.inc.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** experiment_common.inc.php 29 Aug 2002 16:51:33 -0000 1.31 --- experiment_common.inc.php 10 Sep 2002 23:05:00 -0000 1.32 *************** *** 351,354 **** --- 351,355 ---- <input type=hidden name=i_setupdate value=<?= $setid ?>> <tr><th>Name</th><td><input type=text name=i_setname size=15 + maxlength=<?= CLEN_BIOASSAYSET_NAME ?> value="<?= html($set->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea name=i_setdescr cols=50 rows=5 *************** *** 545,548 **** --- 546,550 ---- <input type=hidden name=i_tranupdate value=<?= $tranid ?>> <tr><th>Name</th><td><input type=text name=i_tranname size=15 + maxlength=<?= CLEN_TRANSFORMATION_NAME ?> value="<?= html($tran->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea name=i_trandescr cols=50 rows=5 Index: experiment_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/experiment_edit.phtml,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** experiment_edit.phtml 29 Aug 2002 16:51:33 -0000 1.25 --- experiment_edit.phtml 10 Sep 2002 23:05:00 -0000 1.26 *************** *** 251,254 **** --- 251,255 ---- ?> <tr><th>Name</th><td><input type=text size=30 name=i_name + maxlength=<?= CLEN_EXPERIMENT_NAME ?> value="<?= html($exp->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea cols=70 rows=5 name=i_descr><?= *************** *** 259,264 **** --- 260,267 ---- html($exp->getAffiliations(), 0) ?></textarea></td></tr> <tr><th>Experiment type</th><td><input type=text size=30 name=i_etype + maxlength=<?= CLEN_EXPERIMENT_EXPERIMENTTYPE ?> value="<?= html($exp->getExperimentType(), 0) ?>"></td></tr> <tr><th>Experiment design</th><td><input type=text size=30 name=i_edesign + maxlength=<?= CLEN_EXPERIMENT_EXPERIMENTDESIGN ?> value="<?= html($exp->getExperimentDesign(), 0) ?>"></td></tr> <tr><th>Publication</th><td><textarea cols=70 rows=5 name=i_publ><?= *************** *** 267,273 **** html($exp->getAbstract(), 0) ?></textarea></td></tr> <tr><th>PubMed ID</th><td><input type=text size=30 name=i_pubmed value="<?= html($exp->getPubMedId(), 0) ?>"></td></tr> <tr><th>Publication date</th><td><input type=text size=30 name=i_pubdate ! value="<?= htmldate($exp->getPublicationDate(), false) ?>"></td></tr> <tr><td colspan=2><input type=submit value="Accept" name=i_ok></td></tr> <? --- 270,279 ---- html($exp->getAbstract(), 0) ?></textarea></td></tr> <tr><th>PubMed ID</th><td><input type=text size=30 name=i_pubmed + maxlength=<?= CLEN_EXPERIMENT_PUBMEDID ?> value="<?= html($exp->getPubMedId(), 0) ?>"></td></tr> <tr><th>Publication date</th><td><input type=text size=30 name=i_pubdate ! value="<?= htmldate($exp->getPublicationDate(), false) ?>"> ! <input type=button value="Today" ! onClick="this.form.i_pubdate.value='<?= today() ?>'"></td></tr> <tr><td colspan=2><input type=submit value="Accept" name=i_ok></td></tr> <? *************** *** 382,386 **** <? $opt = "Create new BioAssaySet ".webHelp(42)." called ". ! "<input type=text name=i_setname size=12> from ". "<select name=i_setrawsource>". "<option value='1_0_-1_0_0_0_0'>Mean FG - Mean BG\n". --- 388,393 ---- <? $opt = "Create new BioAssaySet ".webHelp(42)." called ". ! "<input type=text name=i_setname size=12 ". ! "maxlength=".CLEN_BIOASSAY_NAME."> from ". "<select name=i_setrawsource>". "<option value='1_0_-1_0_0_0_0'>Mean FG - Mean BG\n". Index: experiment_list.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/experiment_list.phtml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** experiment_list.phtml 5 Aug 2002 11:29:32 -0000 1.9 --- experiment_list.phtml 10 Sep 2002 23:05:01 -0000 1.10 *************** *** 95,99 **** <p><table <?= $cellpad ?>> <tr><td>Start new experiment: ! <input type=text size=10 name=i_expname> <input type=submit value='Go' name=i_expgo></td></tr> </form> --- 95,100 ---- <p><table <?= $cellpad ?>> <tr><td>Start new experiment: ! <input type=text size=10 name=i_expname ! maxlength=<?= CLEN_EXPERIMENT_NAME ?>> <input type=submit value='Go' name=i_expgo></td></tr> </form> Index: extract_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/extract_edit.phtml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** extract_edit.phtml 29 Aug 2002 16:51:33 -0000 1.13 --- extract_edit.phtml 10 Sep 2002 23:05:02 -0000 1.14 *************** *** 202,205 **** --- 202,206 ---- <tr><th>Sample</th><td><?= $sname ?></td></tr> <tr><th>Name</th><td><input type=text size=30 name=i_name + maxlength=<?= CLEN_EXTRACT_NAME ?> value="<?= html($ext->getName(), 0) ?>"></td></tr> <tr><th>Extraction protocol</th><td><select name=i_proto> Index: genelist.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/genelist.inc.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** genelist.inc.php 9 Sep 2002 06:29:34 -0000 1.21 --- genelist.inc.php 10 Sep 2002 23:05:02 -0000 1.22 *************** *** 26,29 **** --- 26,31 ---- require_once("item.inc.php"); + define("CLEN_GENELIST_NAME", 50); + class GeneList extends Item { *************** *** 85,88 **** --- 87,94 ---- } + function setName($val) + { + $this->name = maxlen($val, CLEN_GENELIST_NAME); + } function setExperiment($val) { Index: genelist_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/genelist_edit.phtml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** genelist_edit.phtml 7 Sep 2002 13:11:44 -0000 1.14 --- genelist_edit.phtml 10 Sep 2002 23:05:05 -0000 1.15 *************** *** 170,173 **** --- 170,174 ---- <tr><th>Name</th><td colspan=3><input type=text size=30 name=i_name + maxlength=<?= CLEN_GENELIST_NAME ?> value="<?= html($glist->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td colspan=3><textarea cols=40 rows=5 name=i_descr Index: hyb.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/hyb.inc.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** hyb.inc.php 9 Sep 2002 19:55:46 -0000 1.20 --- hyb.inc.php 10 Sep 2002 23:05:10 -0000 1.21 *************** *** 27,30 **** --- 27,32 ---- require_once("bio.inc.php"); + define("CLEN_HYBRIDIZATION_NAME", CLEN_ITEM_NAME); + class Hybridization extends Item { Index: hyb_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/hyb_edit.phtml,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** hyb_edit.phtml 29 Aug 2002 16:51:34 -0000 1.31 --- hyb_edit.phtml 10 Sep 2002 23:05:13 -0000 1.32 *************** *** 229,232 **** --- 229,233 ---- <tr><th>Name</th><td><input type=text size=30 name=i_name + maxlength=<?= CLEN_HYBRIDIZATION_NAME ?> value="<?= html($hyb->getName(), 0) ?>"></td></tr> <? Index: hyb_image.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/hyb_image.phtml,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** hyb_image.phtml 29 Aug 2002 16:51:34 -0000 1.22 --- hyb_image.phtml 10 Sep 2002 23:05:22 -0000 1.23 *************** *** 283,286 **** --- 283,287 ---- <tr><th>Hybridization</th><td><?= html($hyb->getName()) ?></td></tr> <tr><th>Image set name</th><td><input type=text size=30 name=i_name + maxlength=<?= CLEN_IMAGEACQUISITION_NAME ?> value="<?= html($acq->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea wrap=soft cols=45 rows=6 name=i_descr Index: hyb_result.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/hyb_result.phtml,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** hyb_result.phtml 7 Sep 2002 11:36:32 -0000 1.53 --- hyb_result.phtml 10 Sep 2002 23:05:26 -0000 1.54 *************** *** 175,178 **** --- 175,179 ---- <tr><th>Data set(RawBioAssay) name <?= webHelp(82) ?></th> <td><input type=text name=i_name size=30 + maxlength=<?= CLEN_RAWBIOASSAY_NAME ?> value="<?= html($raw->getName(), 0) ?>"></td></tr> <tr><th>Feature extraction software</th><td> Index: image.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/image.inc.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** image.inc.php 10 Sep 2002 09:29:44 -0000 1.13 --- image.inc.php 10 Sep 2002 23:05:29 -0000 1.14 *************** *** 27,30 **** --- 27,32 ---- require_once("acquisition.inc.php"); + define("CLEN_IMAGE_NAME", 150); + class Image extends Item { *************** *** 110,113 **** --- 112,119 ---- } + function setName($val) + { + $this->name = maxlen($val, CLEN_IMAGE_NAME); + } function setimageAcquisition($val) { Index: item.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/item.inc.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** item.inc.php 9 Sep 2002 19:55:26 -0000 1.27 --- item.inc.php 10 Sep 2002 23:05:33 -0000 1.28 *************** *** 27,30 **** --- 27,33 ---- require_once("misc.inc.php"); + define("CLEN_ITEM_NAME", 40); + define("CLEN_ITEM_DESCR", 255); + class Item { *************** *** 116,124 **** function setName($val) { ! $this->name = printable($val); } function setDescr($val) { ! $this->descr = $val; } function setAddedDate($val) --- 119,127 ---- function setName($val) { ! $this->name = printable(maxlen($val, CLEN_ITEM_NAME)); } function setDescr($val) { ! $this->descr = maxlen($val, CLEN_ITEM_DESCR); } function setAddedDate($val) Index: job.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/job.inc.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** job.inc.php 10 Sep 2002 10:57:41 -0000 1.38 --- job.inc.php 10 Sep 2002 23:05:42 -0000 1.39 *************** *** 27,30 **** --- 27,32 ---- require_once("transformation.inc.php"); + define("CLEN_JOBSETTING_SETTING", 65535); + class Job { Index: labeled_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/labeled_edit.phtml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** labeled_edit.phtml 29 Aug 2002 16:51:34 -0000 1.13 --- labeled_edit.phtml 10 Sep 2002 23:05:53 -0000 1.14 *************** *** 211,214 **** --- 211,215 ---- ?> <tr><th>Name</th><td><input type=text size=20 name=i_name + maxlength=<?= CLEN_LABELEDEXTRACT_NAME ?> value="<?= html($lext->getName(), 0) ?>"></td></tr> Index: left.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/left.phtml,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** left.phtml 8 Sep 2002 22:38:08 -0000 1.45 --- left.phtml 10 Sep 2002 23:05:58 -0000 1.46 *************** *** 135,142 **** <input type=hidden name=location value="index.phtml"> <tr><td><?= $txt ?></td></tr> ! <tr><td class=tiny align=right>Login: <input class=tiny name=i_login type=text ! size=9 value="<?= isset($i_un) ? html($i_un, 0) : "" ?>"></td></tr> ! <tr><td class=tiny align=right>Pass: <input class=tiny name=i_password type=password ! size=9></td></tr> <tr><td align=right><input class=tiny type=submit value="Log in"></td></tr> <? --- 135,142 ---- <input type=hidden name=location value="index.phtml"> <tr><td><?= $txt ?></td></tr> ! <tr><td class=tiny align=right>Login: <input class=tiny name=i_login ! type=text size=9 value="<?= isset($i_un) ? html($i_un, 0) : "" ?>"></td></tr> ! <tr><td class=tiny align=right>Pass: <input class=tiny ! name=i_password type=password size=9></td></tr> <tr><td align=right><input class=tiny type=submit value="Log in"></td></tr> <? Index: misc.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/misc.inc.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** misc.inc.php 9 Sep 2002 06:39:01 -0000 1.35 --- misc.inc.php 10 Sep 2002 23:06:00 -0000 1.36 *************** *** 40,47 **** } ! function maxlen(&$txt, $len) { ! if(strlen($txt) > $len) return substr($txt, 0, $len) . "..."; ! else return $txt; } --- 40,49 ---- } ! function maxlen(&$txt, $len, $etc = "") { ! if(strlen($txt) > $len) ! return substr($txt, 0, $len).$etc; ! else ! return $txt; } *************** *** 323,326 **** --- 325,333 ---- { return date("Y-m-d H:i:s"); + } + + function today() + { + return date("Y-m-d"); } Index: molecule.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/molecule.inc.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** molecule.inc.php 9 Sep 2002 19:55:46 -0000 1.31 --- molecule.inc.php 10 Sep 2002 23:06:03 -0000 1.32 *************** *** 27,30 **** --- 27,53 ---- require_once("genelist.inc.php"); + // The maximum cloneId length requires a bit of explanation: + // To get a reasonable sort order for both numbers and strings, + // the cloneId has its length prepended when it's stored in the + // database. This length is stored in the simplest possible way - + // as the ascii value of a single character. Because we want + // case insensitivity in the cloneId, there will be problems with + // the sort order if the character gets into the range of lowercase [...93 lines suppressed...] { ! $this->geneSymbol = maxlen($val, CLEN_MOLECULE_GENESYMBOL); } function setChromosome($val) { ! $this->chromosome = maxlen($val, CLEN_MOLECULE_CHROMOSOME); } function setCytoBand($val) { ! $this->cytoBand = maxlen($val, CLEN_MOLECULE_CYTOBAND); } function setMarkers($val) { ! $this->markers = maxlen($val, CLEN_MOLECULE_MARKERS); } function setAntibiotics($val) { ! $this->antibiotics = maxlen($val, CLEN_MOLECULE_ANTIBIOTICS); } function setLocusLink($val) Index: molecule_list.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/molecule_list.phtml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** molecule_list.phtml 5 Aug 2002 11:29:34 -0000 1.8 --- molecule_list.phtml 10 Sep 2002 23:06:05 -0000 1.9 *************** *** 156,160 **** $s["cloneId"])."</td>". "<td>".html($s["geneSymbol"])."</td>". ! "<td>".html(maxlen($s["geneName"], 40))."</td>". "<td>".html($s["chromosome"])."</td>". "<td>".html($s["cytoBand"])."</td>". --- 156,160 ---- $s["cloneId"])."</td>". "<td>".html($s["geneSymbol"])."</td>". ! "<td>".html(maxlen($s["geneName"], 40, "..."))."</td>". "<td>".html($s["chromosome"])."</td>". "<td>".html($s["cytoBand"])."</td>". Index: news.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/news.inc.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** news.inc.php 9 Sep 2002 06:29:34 -0000 1.8 --- news.inc.php 10 Sep 2002 23:06:06 -0000 1.9 *************** *** 26,29 **** --- 26,31 ---- require_once("item.inc.php"); + define("CLEN_NEWS_NAME", 255); + class News extends Item { *************** *** 40,43 **** --- 42,50 ---- { return parent::write(array()); + } + + function setName($val) + { + $this->name = printable(maxlen($val, CLEN_NEWS_NAME)); } Index: news_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/news_edit.phtml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** news_edit.phtml 29 Aug 2002 16:51:34 -0000 1.5 --- news_edit.phtml 10 Sep 2002 23:06:07 -0000 1.6 *************** *** 96,99 **** --- 96,100 ---- <tr><th>Title</th><td><input type=text size=50 name=i_name + maxlength=<?= CLEN_NEWS_NAME ?> value="<?= html($news->getName(), 0) ?>"></td></tr> <tr><th>News text</th><td><textarea cols=60 rows=9 name=i_descr Index: plate.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/plate.inc.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** plate.inc.php 9 Sep 2002 19:55:46 -0000 1.32 --- plate.inc.php 10 Sep 2002 23:06:13 -0000 1.33 *************** *** 26,29 **** --- 26,35 ---- require_once("item.inc.php"); + define("CLEN_PLATETYPE_NAME", CLEN_ITEM_NAME); + define("CLEN_PLATETYPE_NAMEPREFIX", 40); + define("CLEN_PLATE_NAME", 30); + define("CLEN_PLATE_BARCODE", 30); + define("CLEN_PLATEEVENTTYPE_NAME", 40); + class PlateType extends Item { *************** *** 115,119 **** function setNamePrefix($val) { ! $this->namePrefix = $val; } function setParentSuffix($val) --- 121,125 ---- function setNamePrefix($val) { ! $this->namePrefix = maxlen($val, CLEN_PLATETYPE_NAMEPREFIX); } function setParentSuffix($val) *************** *** 385,388 **** --- 391,398 ---- + function setName($val) + { + $this->name = printable(maxlen($val, CLEN_PLATE_NAME)); + } function resetId() { *************** *** 399,404 **** function setBarcode($val) { ! if($val === false || $val === NULL) $this->barcode = NULL; ! else $this->barcode = $val; } --- 409,416 ---- function setBarcode($val) { ! if($val === false || $val === NULL) ! $this->barcode = NULL; ! else ! $this->barcode = maxlen($val, CLEN_PLATE_BARCODE); } Index: plate_arrange.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/plate_arrange.phtml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** plate_arrange.phtml 5 Aug 2002 11:29:34 -0000 1.15 --- plate_arrange.phtml 10 Sep 2002 23:06:13 -0000 1.16 *************** *** 193,197 **** You may enter a string to be used as a prefix for the names of the plates. </td></tr> ! <form method=post action='<?= $PHP_SELF ?>'> <input type=hidden name=location value="<?= html($location, 0) ?>"> <tr><th>Plates</th><td><input type=text name=i_384s size=5 value=1></td></tr> --- 193,197 ---- You may enter a string to be used as a prefix for the names of the plates. </td></tr> ! <form method=post action='plate_arrange.phtml'> <input type=hidden name=location value="<?= html($location, 0) ?>"> <tr><th>Plates</th><td><input type=text name=i_384s size=5 value=1></td></tr> *************** *** 296,303 **** echo "<option $sel value=$id>".html($n)."\n"; } ! $edate = isset($i_edate[$eid]) ? html($i_edate[$eid], 0) : ""; ! echo "</select></td>". ! "<td><input type=text size=15 name=i_edate[$eid] ". ! "value=\"$edate\"></td></tr>\n"; } unset($e); --- 296,307 ---- echo "<option $sel value=$id>".html($n)."\n"; } ! ?> ! </select></td> ! <td><input type=text size=15 name="i_edate[<?= $eid ?>]" ! value="<?= isset($i_edate[$eid]) ? html($i_edate[$eid], 0) : "" ?>"> ! <input type=button value="Today" ! onClick="this.form['i_edate[<?= $eid ?>]'].value='<?= today()?>'" ! ></td></tr> ! <? } unset($e); *************** *** 338,341 **** --- 342,346 ---- </td><th>Name</th> <td><input type=text size=25 name='i_384name[<?= $newpos ?>]' + maxlength=<?= CLEN_PLATE_NAME ?> value="<?= html($name, 0) ?>" onFocus='foc(<?= $newpos ?>)'> <?= webHelp(24) ?></td> Index: plate_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/plate_edit.phtml,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** plate_edit.phtml 9 Sep 2002 06:39:01 -0000 1.27 --- plate_edit.phtml 10 Sep 2002 23:06:15 -0000 1.28 *************** *** 286,292 **** --- 286,294 ---- <tr><th><?= $clone ? "Daughter plate name" : "Name" ?></th> <td><input type=text size=20 name=i_name + maxlength=<?= CLEN_PLATE_NAME ?> value="<?= html($plate->getName(), 0) ?>"> (<?= html($ptype->getName()) ?>)</td></tr> <tr><th>Barcode</th><td><input type=text size=20 name=i_bc + maxlength=<?= CLEN_PLATE_BARCODE ?> value="<?= html($plate->getBarcode(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea cols=50 rows=5 name=i_descr Index: plate_upload.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/plate_upload.phtml,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** plate_upload.phtml 9 Sep 2002 19:55:46 -0000 1.28 --- plate_upload.phtml 10 Sep 2002 23:06:17 -0000 1.29 *************** *** 78,82 **** ?> <td><input type=file name=i_file></td></tr> ! <tr><th>File description</th><td><input type=text name=i_descr size=30></td></tr> <tr><td colspan=2><input type=submit value="Continue"></td></tr> </form> --- 78,83 ---- ?> <td><input type=file name=i_file></td></tr> ! <tr><th>File description</th> ! <td><input type=text name=i_descr size=30></td></tr> <tr><td colspan=2><input type=submit value="Continue"></td></tr> </form> *************** *** 133,136 **** --- 134,140 ---- html(addslashes($ptypes[$i]->getNamePrefix()), 0)."\";"; } + + if(isset($i_pref)) + $ptype->setNamePrefix($i_pref); ?> <script> *************** *** 152,158 **** </select></td></tr> <tr><th>Plate name prefix</th><td><input type=text size=15 ! name=i_pref value="<?= ! html(isset($i_pref) ? $i_pref : $ptype->getNamePrefix(), 0) ! ?>"></td></tr> <script>setPref(document.forms[0].i_pt);</script> <tr><th>Plate name padding</th><td>to --- 156,161 ---- </select></td></tr> <tr><th>Plate name prefix</th><td><input type=text size=15 ! name=i_pref maxlength=<?= CLEN_PLATETYPE_NAMEPREFIX ?> ! value="<?= html($ptype->getNamePrefix() 0) ?>"></td></tr> <script>setPref(document.forms[0].i_pt);</script> <tr><th>Plate name padding</th><td>to *************** *** 224,229 **** for(reset($protos); list($id, $n) = each($protos); ) echo "<option value=$id>".html($n)."\n"; ! echo "</select></td><td><input type=text size=15 ". ! "name=i_edate[$e[id]]></td></tr>\n"; } unset($e); --- 227,236 ---- for(reset($protos); list($id, $n) = each($protos); ) echo "<option value=$id>".html($n)."\n"; ! ?> ! </select></td><td><input type=text size=15 ! name="i_edate[<?= $e[id] ?>]"> <input type=button value="Today" ! onClick="this.form['i_edate[<?= $e[id] ?>]'].value='<?= today() ! ?>'"></td></tr> ! <? } unset($e); *************** *** 236,242 **** { $name = $i_pref . str_pad($pnum, $pad, " ", STR_PAD_LEFT); ! echo "<tr><td>".html($pnum)."</td><td><input type=text ". ! "name=\"i_pname[".html($pnum)."]\" value=\"".html($name)."\">". ! "</td><td>$wells</td></tr>\n"; } ?> --- 243,253 ---- { $name = $i_pref . str_pad($pnum, $pad, " ", STR_PAD_LEFT); ! ?> ! <tr><td><?= html($pnum) ?></td> ! <td><input type=text name="i_pname[<?= html($pnum) ?>]" ! size=15 maxlength=<?= CLEN_PLATE_NAME ?> ! value="<?= html($name, 0) ?>"></td> ! <td><?= $wells ?></td></tr> ! <? } ?> Index: platetype_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/platetype_edit.phtml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** platetype_edit.phtml 9 Sep 2002 19:55:46 -0000 1.13 --- platetype_edit.phtml 10 Sep 2002 23:06:22 -0000 1.14 *************** *** 182,185 **** --- 182,186 ---- <tr><th>Name</th><td><input type=text size=20 name=i_name + maxlength=<?= CLEN_PLATETYPE_NAME ?> value="<?= html($ptype->getName(), 0) ?>"></td></tr> <? *************** *** 196,199 **** --- 197,201 ---- ?> <tr><th>Plate name prefix</th><td><input type=text size=20 name=i_prefix + maxlength=<?= CLEN_PLATETYPE_NAMEPREFIX ?> value="<?= html($ptype->getNamePrefix(), 0) ?>"></td></tr> <tr><th>Append parent plate name</th><td><input type=checkbox name=i_suffix *************** *** 210,213 **** --- 212,216 ---- { echo "<tr><td><input type=text size=20 name='i_ename[]' ". + "maxlength=".CLEN_PLATETYPE_NAMEPREFIX." ". "value=\"".html($eventTypes[$i]["name"], 0)."\"></td>\n". "<td><select name='i_proto[]'>"; *************** *** 229,232 **** --- 232,236 ---- $id = $eventTypes[$i]["id"]; echo "<tr><td><input type=text size=20 name='i_ename[$id]' ". + "maxlength=".CLEN_PLATETYPE_NAMEPREFIX." ". "value=\"".html($eventTypes[$i]["name"], 0)."\"></td>". "<td>".html($protoTypes[$eventTypes[$i]["protocolType"]]). Index: probe_search.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/probe_search.phtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** probe_search.phtml 5 Aug 2002 11:29:35 -0000 1.2 --- probe_search.phtml 10 Sep 2002 23:06:24 -0000 1.3 *************** *** 105,109 **** $s["cloneId"])."</td>". "<td>".html($s["geneSymbol"])."</td>". ! "<td>".html(maxlen($s["geneName"], 40))."</td>". "</tr>\n"; } --- 105,109 ---- $s["cloneId"])."</td>". "<td>".html($s["geneSymbol"])."</td>". ! "<td>".html(maxlen($s["geneName"], 40, "..."))."</td>". "</tr>\n"; } Index: program.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/program.inc.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** program.inc.php 10 Sep 2002 10:57:41 -0000 1.23 --- program.inc.php 10 Sep 2002 23:06:25 -0000 1.24 *************** *** 27,30 **** --- 27,34 ---- require_once("sampleannotation.inc.php"); + define("CLEN_PROGRAM_NAME", CLEN_ITEM_NAME); + define("CLEN_PROGRAM_EXECNAME", 40); + define("CLEN_PROGRAM_URL", 255); + class Program extends Item { *************** *** 120,124 **** function setExecName($val) { ! $this->execName = $val; } function setUsedColumns($val) --- 124,128 ---- function setExecName($val) { ! $this->execName = printable(maxlen($val, CLEN_PROGRAM_EXECNAME)); } function setUsedColumns($val) *************** *** 144,148 **** function setUrl($val) { ! $this->url = $val; } --- 148,152 ---- function setUrl($val) { ! $this->url = printable(maxlen($val, CLEN_PROGRAM_URL)); } Index: program_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/program_edit.phtml,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** program_edit.phtml 31 Aug 2002 11:44:03 -0000 1.21 --- program_edit.phtml 10 Sep 2002 23:06:27 -0000 1.22 *************** *** 273,278 **** --- 273,280 ---- <tr><th>Name</th><td colspan=3><input type=text size=25 name=i_name + maxlength=<?= CLEN_PROGRAM_NAME ?> value="<?= html($prog->getName(), 0) ?>"></td></tr> <tr><th>Name of executable</th><td colspan=3><input type=text size=25 + maxlength=<?= CLEN_PROGRAM_EXECNAME ?> name=i_ename value="<?= html($prog->getExecName(), 0) ?>"></td></tr> *************** *** 281,285 **** $prog->getOnServer() ? "checked" : "" ?>></td></tr> <tr><th>Associated URL</th><td colspan=3><input type=text size=45 ! name=i_url value="<?= html($prog->getUrl(), 0) ?>"></td></tr> <tr><th>Description / Help text</th><td colspan=3><textarea name=i_descr rows=8 cols=60 wrap=soft><?= html($prog->getDescr(), 0) --- 283,288 ---- $prog->getOnServer() ? "checked" : "" ?>></td></tr> <tr><th>Associated URL</th><td colspan=3><input type=text size=45 ! name=i_url maxlength=<?= CLEN_PROGRAM_URL ?> ! value="<?= html($prog->getUrl(), 0) ?>"></td></tr> <tr><th>Description / Help text</th><td colspan=3><textarea name=i_descr rows=8 cols=60 wrap=soft><?= html($prog->getDescr(), 0) Index: protocol.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/protocol.inc.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** protocol.inc.php 8 Sep 2002 23:12:40 -0000 1.9 --- protocol.inc.php 10 Sep 2002 23:06:27 -0000 1.10 *************** *** 27,30 **** --- 27,33 ---- require_once("upload.inc.php"); + define("CLEN_PROTOCOL_NAME", 30); + + class Protocol { *************** *** 119,123 **** function setName($val) { ! $this->name = $val; } function setDescr($val) --- 122,126 ---- function setName($val) { ! $this->name = maxlen($val, CLEN_PROTOCOL_NAME); } function setDescr($val) Index: protocol_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/protocol_edit.phtml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** protocol_edit.phtml 29 Aug 2002 16:51:34 -0000 1.8 --- protocol_edit.phtml 10 Sep 2002 23:06:27 -0000 1.9 *************** *** 99,102 **** --- 99,103 ---- <tr><th>Protocol name</th><td><input type=text name=i_name size=30 + maxlength=<?= CLEN_PROTOCOL_NAME ?> value="<?= html($proto->getName(), 0) ?>"></td></tr> *************** *** 125,129 **** { $hasfile = 1; ! echo "<td>".html($upl->getName())." (".$upl->getFileSize()." bytes) uploaded ". substr($upl->getAddedDate(), 0, 16)."</td></tr>\n"; } --- 126,131 ---- { $hasfile = 1; ! echo "<td>".html($upl->getName())." (".$upl->getFileSize(). ! " bytes) uploaded ". substr($upl->getAddedDate(), 0, 16)."</td></tr>\n"; } *************** *** 146,150 **** </select></td></tr> <tr><th>Upload another file</th><td><input type=file name=i_file></td></tr> ! <tr><th>File description</th><td><input type=text name=i_fdescr size=30></td></tr> <tr><td colspan=2><input type=submit value="Accept"></td></tr> --- 148,153 ---- </select></td></tr> <tr><th>Upload another file</th><td><input type=file name=i_file></td></tr> ! <tr><th>File description</th><td><input type=text ! name=i_fdescr size=30></td></tr> <tr><td colspan=2><input type=submit value="Accept"></td></tr> Index: raw.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw.inc.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** raw.inc.php 10 Sep 2002 10:57:41 -0000 1.37 --- raw.inc.php 10 Sep 2002 23:06:28 -0000 1.38 *************** *** 29,32 **** --- 29,34 ---- require_once("acquisition.inc.php"); + define("CLEN_RAWBIOASSAY_NAME", 60); + class RawBioAssay extends Item { *************** *** 158,161 **** --- 160,167 ---- } + function setName($val) + { + $this->name = maxlen($val, CLEN_RAWBIOASSAY_NAME); + } function setLabeledCh1($val) { *************** *** 649,653 **** { $histbox = (float)$histbox; ! $xc = "FLOOR($xc/$histbox)*$histbox"; $yc = "COUNT(*)"; $groupby = "GROUP BY `C`, `A` ". --- 655,659 ---- { $histbox = (float)$histbox; ! $xc = "ROUND($xc/$histbox)*$histbox"; $yc = "COUNT(*)"; $groupby = "GROUP BY `C`, `A` ". *************** *** 658,666 **** $third = (int)$third; $groups = array("rbad.block", "rbad.flags", ! "FLOOR(.5+".db_func_log("(rbad.`FCh1Mean`-rbad.`BCh1Mean`)/". "(rbad.`FCh2Mean`-rbad.`BCh2Mean`)", 2).")"); if($histbox == -1) { ! $groups[2] = "FLOOR(.5+30.*". db_func_log("(rbad.`FCh1Mean`-rbad.`BCh1Mean`)/". "(rbad.`FCh2Mean`-rbad.`BCh2Mean`)").")"; --- 664,672 ---- $third = (int)$third; $groups = array("rbad.block", "rbad.flags", ! "ROUND(".db_func_log("(rbad.`FCh1Mean`-rbad.`BCh1Mean`)/". "(rbad.`FCh2Mean`-rbad.`BCh2Mean`)", 2).")"); if($histbox == -1) { ! $groups[2] = "ROUND(30.*". db_func_log("(rbad.`FCh1Mean`-rbad.`BCh1Mean`)/". "(rbad.`FCh2Mean`-rbad.`BCh2Mean`)").")"; Index: raw_common.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw_common.inc.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** raw_common.inc.php 29 Aug 2002 16:51:34 -0000 1.17 --- raw_common.inc.php 10 Sep 2002 23:06:28 -0000 1.18 *************** *** 151,155 **** for($j = 1; $j <= 2; $j++) { ! if(!$s["sample$j"]) $slink[$j] = html(""); else if(acc(BUA_BIO_READ) && Sample::isSharedId($s["sample$j"], $userid)) --- 151,156 ---- for($j = 1; $j <= 2; $j++) { ! if(!$s["sample$j"]) ! $slink[$j] = html(""); else if(acc(BUA_BIO_READ) && Sample::isSharedId($s["sample$j"], $userid)) *************** *** 248,252 **** ?> </select><br> ! or start new experiment: <input type=text size=10 name=i_expname> <input type=submit value='Go' name=i_expgo></td></tr> </table> --- 249,254 ---- ?> </select><br> ! or start new experiment: <input type=text size=10 ! maxlength=<?= CLEN_EXPERIMENT_NAME ?> name=i_expname> <input type=submit value='Go' name=i_expgo></td></tr> </table> Index: raw_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw_edit.phtml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** raw_edit.phtml 29 Aug 2002 16:51:34 -0000 1.15 --- raw_edit.phtml 10 Sep 2002 23:06:28 -0000 1.16 *************** *** 114,123 **** { ?> ! <form method=post enctype="multipart/form-data" action='<?= ! $PHP_SELF."?i_r=".$raw->getId() ?>'> <input type=hidden name=i_act value=upd> <input type=hidden name=location value="<?= html($location, 0) ?>"> <tr><th>Name</th><td><input type=text size=30 name=i_name value="<?= html($raw->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea cols=50 rows=5 name=i_descr --- 114,124 ---- { ?> ! <form method=post enctype="multipart/form-data" ! action='raw_edit.phtml?i_r=<?= $raw->getId() ?>'> <input type=hidden name=i_act value=upd> <input type=hidden name=location value="<?= html($location, 0) ?>"> <tr><th>Name</th><td><input type=text size=30 name=i_name + maxlength=<?= CLEN_RAWBIOASSAY_NAME ?> value="<?= html($raw->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea cols=50 rows=5 name=i_descr Index: sample_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/sample_edit.phtml,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** sample_edit.phtml 29 Aug 2002 16:51:34 -0000 1.17 --- sample_edit.phtml 10 Sep 2002 23:06:29 -0000 1.18 *************** *** 151,154 **** --- 151,155 ---- <tr><th>Name</th><td><input type=text size=30 name=i_name + maxlength=<?= CLEN_SAMPLE_NAME ?> value="<?= html($samp->getName(), 0) ?>"></td></tr> <? Index: sampleannot_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/sampleannot_edit.phtml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** sampleannot_edit.phtml 29 Aug 2002 16:51:34 -0000 1.9 --- sampleannot_edit.phtml 10 Sep 2002 23:06:29 -0000 1.10 *************** *** 124,127 **** --- 124,128 ---- <tr><th>Name</th><td><input type=text size=30 name=i_name + maxlength=<?= CLEN_SAMPLEANNOTATION_NAME ?> value="<?= html($sat->getName(), 0) ?>"> <?= webHelp(59) ?></td></tr> *************** *** 161,164 **** --- 162,166 ---- ?> <tr><th>Default value</th><td><input type=text size=30 name=i_def + maxlength=<?= CLEN_SAMPLEANNOTATION_DEFAULTVALUE ?> value="<?= html($sat->getDefaultValue(), 0) ?>"></td></tr> <tr><td colspan=2><input type=submit value="Accept" name=i_ok></td></tr> Index: sampleannotation.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/sampleannotation.inc.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** sampleannotation.inc.php 8 Sep 2002 22:38:08 -0000 1.16 --- sampleannotation.inc.php 10 Sep 2002 23:06:29 -0000 1.17 *************** *** 26,29 **** --- 26,33 ---- require_once("db.inc.php"); + define("CLEN_SAMPLEANNOTATION_NAME", 40); + define("CLEN_SAMPLEANNOTATION_OPTIONS", 255); + define("CLEN_SAMPLEANNOTATION_DEFAULTVALUE", 255); + class SampleAnnotationType { *************** *** 100,104 **** function setName($val) { ! $this->name = $val; } function setValueType($val) --- 104,108 ---- function setName($val) { ! $this->name = maxlen($val, CLEN_SAMPLEANNOTATION_NAME); } function setValueType($val) *************** *** 120,125 **** { if($this->valueType == "e") ! $this->options = $val; ! else $this->options = (int)$val; } function setDefaultValue($val) --- 124,130 ---- { if($this->valueType == "e") ! $this->options = maxlen($val, CLEN_SAMPLEANNOTATION_OPTIONS); ! else ! $this->options = (int)$val; } function setDefaultValue($val) *************** *** 129,133 **** else if($this->valueType == "f") $this->defaultValue = (float)$val; ! else $this->defaultValue = $val; } --- 134,142 ---- else if($this->valueType == "f") $this->defaultValue = (float)$val; ! else ! { ! $this->defaultValue = ! maxlen($val, CLEN_SAMPLEANNOTATION_DEFAULTVALUE); ! } } Index: sampletissue.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/sampletissue.inc.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sampletissue.inc.php 8 Sep 2002 22:38:08 -0000 1.8 --- sampletissue.inc.php 10 Sep 2002 23:06:30 -0000 1.9 *************** *** 26,29 **** --- 26,31 ---- require_once("db.inc.php"); + define("CLEN_SAMPLETISSUE_NAME", 40); + class SampleTissue { *************** *** 96,100 **** function setName($val) { ! $this->name = $val; } --- 98,102 ---- function setName($val) { ! $this->name = maxlen($val, CLEN_SAMPLETISSUE_NAME); } Index: sampletissue_tree.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/sampletissue_tree.phtml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sampletissue_tree.phtml 5 Aug 2002 11:29:35 -0000 1.8 --- sampletissue_tree.phtml 10 Sep 2002 23:06:30 -0000 1.9 *************** *** 89,94 **** <form name=ff method=post action="sampletissue_tree.phtml?i_t=<?= $tissueid ?>"> ! <tr><th>Rename</th><td><input type=text name=i_name value="<?= ! html($tissue->getName(), 0) ?>" size=14> <input type=submit value="Ok"> <?= webHelp(57) ?></td></tr> <input type=hidden name=i_newchild value=""> --- 89,95 ---- <form name=ff method=post action="sampletissue_tree.phtml?i_t=<?= $tissueid ?>"> ! <tr><th>Rename</th><td><input type=text name=i_name ! maxlength=<?= CLEN_SAMPLETISSU_NAME ?> ! value="<?= html($tissue->getName(), 0) ?>" size=14> <input type=submit value="Ok"> <?= webHelp(57) ?></td></tr> <input type=hidden name=i_newchild value=""> Index: search.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/search.inc.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** search.inc.php 9 Sep 2002 06:21:20 -0000 1.38 --- search.inc.php 10 Sep 2002 23:06:30 -0000 1.39 *************** *** 85,88 **** --- 85,92 ---- require_once("db.inc.php"); require_once("genelist.inc.php"); + + define("CLEN_SEARCHCRITERION_SEARCHSTRING", 255); + define("CLEN_PRESET_NAME", 40); + define("BASE_EXTRACOL", 50); *************** *** 175,179 **** function setName($val) { ! $this->name = printable($val); } function setSearch($val) --- 179,183 ---- function setName($val) { ! $this->name = printable(maxlen($val, CLEN_PRESET_NAME)); } function setSearch($val) *************** *** 865,869 **** function setValue($val) { ! $this->searchString = $val; } --- 869,873 ---- function setValue($val) { ! $this->searchString = maxlen($val, CLEN_SEARCHCRITERION_SEARCHSTRING); } Index: searchhtml.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/searchhtml.inc.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** searchhtml.inc.php 29 Aug 2002 16:51:34 -0000 1.39 --- searchhtml.inc.php 10 Sep 2002 23:06:30 -0000 1.40 *************** *** 343,346 **** --- 343,347 ---- { echo "<td><input type=text name='i_value${tableId}[$pos]' size=20 ". + "maxlength=".CLEN_SEARCHCRITERION_SEARCHSTRING." ". "value=\"".html($val, 0)."\"></td>\n"; } *************** *** 424,428 **** { echo "<td><input type=text name='i_value${tableId}[0]' size=20 ". ! "</td>\n"; } else // enum --- 425,429 ---- { echo "<td><input type=text name='i_value${tableId}[0]' size=20 ". ! "maxlength=".CLEN_SEARCHCRITERION_SEARCHSTRING." </td>\n"; } else // enum *************** *** 463,466 **** --- 464,468 ---- } echo "Save current as new preset <input type=text ". + "maxlength=".CLEN_PRESET_NAME." ". "name=i_presetname${tableId} size=8>". "<input type=submit value='Ok' name='i_presetact${tableId}[new]'>"; Index: trans_create.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/trans_create.phtml,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** trans_create.phtml 10 Sep 2002 10:57:41 -0000 1.24 --- trans_create.phtml 10 Sep 2002 23:06:30 -0000 1.25 *************** *** 332,335 **** --- 332,336 ---- <tr><th>Filtering name</th><td><input type=text name=i_tname size=20 + maxlength=<?= CLEN_TRANSFORMATION_NAME ?> value="<?= html($tran->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea name=i_tdescr cols=50 rows=3 *************** *** 337,340 **** --- 338,342 ---- <tr><th>Child BioAssaySet</th><td><input type=text name=i_sname size=20 + maxlength=<?= CLEN_BIOASSAYSET_NAME ?> value="<?= html($newset->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea name=i_sdescr cols=50 rows=3 *************** *** 373,376 **** --- 375,379 ---- ?></td></tr> <tr><th>Job name</th><td><input type=text name=i_tname size=20 + maxlength=<?= CLEN_TRANSFORMATION_NAME ?> value="<?= html($tran->getName(), 0) ?>"></td></tr> <tr><th>Description</th><td><textarea name=i_tdescr rows=3 cols=50 *************** *** 451,454 **** --- 454,458 ---- $size = max(1, (int)$arr["options"]); echo "<input type=text name='i_sett[$pos]... [truncated message content] |
From: <tr...@us...> - 2002-09-10 23:01:58
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv7338 Modified Files: pgsql.inc.php Log Message: Made db_fetch_assoc not return numerical keys Index: pgsql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/pgsql.inc.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pgsql.inc.php 10 Sep 2002 10:57:41 -0000 1.12 --- pgsql.inc.php 10 Sep 2002 23:01:42 -0000 1.13 *************** *** 27,34 **** class BaseDatabase { ! var $serv, $affected; function BaseDatabase($server, $user, $password, $database) { $this->affected = 0; $cstring = "host='".addslashes($server)."' ". "user = '".addslashes($user)."' ". --- 27,35 ---- class BaseDatabase { ! var $serv, $affected, $nextrow; function BaseDatabase($server, $user, $password, $database) { $this->affected = 0; + $this->nextrow = array(); $cstring = "host='".addslashes($server)."' ". "user = '".addslashes($user)."' ". *************** *** 53,57 **** - function &db_fetch_row(&$r) { --- 54,57 ---- *************** *** 60,66 **** function &db_fetch_assoc(&$r) { ! // print_r(get_defined_vars()); ! // return pg_fetch_array($GLOBALS["curDb"]->serv, $r, PGSQL_ASSOC); ! return pg_fetch_array($r); } function db_num_rows(&$r) --- 60,81 ---- function &db_fetch_assoc(&$r) { ! // To emulate the missing pg_fetch_assoc() we need to know the ! // current row number, as pg_fetch_array() won't accept a third ! // argument (PGSQL_ASSOC) otherwise. ! // There are two main reasons that we want _assoc rather than _array. ! // The first reason is that mysql_fetch_array does not give a string ! // key for fields that are NULL. pg_fetch_array doesn't have that bug. ! // The second reason is that we want to be able to implode() the array ! // and output it to e.g. a tab-separated file. A more efficient solution ! // than this one is to use pg_fetch_array($r) and then have another ! // db_something function to clean up the numeric keys when needed, ! // but this would introduce unnecessary function calls in places where ! // it could hurt performance for MySQL users (the inner loop when ! // exporting a spot BASEfile, for instance). ! $row = $GLOBALS["curDb"]->nextrow[(int)$r]++; ! if($row >= pg_num_rows($r)) ! return false; ! return pg_fetch_array($r, $row, PGSQL_ASSOC); ! // return pg_fetch_array($r); } function db_num_rows(&$r) *************** *** 86,89 **** --- 101,105 ---- else $GLOBALS["curDb"]->affected = -1; + $GLOBALS["curDb"]->nextrow[(int)$res] = 0; return $res; } |
From: <tr...@us...> - 2002-09-10 10:58:50
|
Update of /cvsroot/basedb/basedb In directory usw-pr-cvs1:/tmp/cvs-serv23365 Modified Files: base_pg.sql Log Message: Changed char to varchar, renamed some constraints Index: base_pg.sql =================================================================== RCS file: /cvsroot/basedb/basedb/base_pg.sql,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** base_pg.sql 10 Sep 2002 09:31:04 -0000 1.4 --- base_pg.sql 10 Sep 2002 10:58:47 -0000 1.5 *************** *** 730,734 **** sequence text DEFAULT '' NOT NULL, length smallint DEFAULT '0' NOT NULL, ! species character(2) DEFAULT '' NOT NULL, "clusterId" integer DEFAULT '0' NOT NULL, "cloneId" character varying(255) DEFAULT '' NOT NULL, --- 730,734 ---- sequence text DEFAULT '' NOT NULL, length smallint DEFAULT '0' NOT NULL, ! species character varying(2) DEFAULT '' NOT NULL, "clusterId" integer DEFAULT '0' NOT NULL, "cloneId" character varying(255) DEFAULT '' NOT NULL, *************** *** 738,742 **** accession character varying(20) DEFAULT '' NOT NULL, nid character varying(20) DEFAULT '' NOT NULL, ! chromosome character(3) DEFAULT '' NOT NULL, "cytoBand" character varying(30) DEFAULT '' NOT NULL, "geneName" text DEFAULT '' NOT NULL, --- 738,742 ---- accession character varying(20) DEFAULT '' NOT NULL, nid character varying(20) DEFAULT '' NOT NULL, ! chromosome character varying(3) DEFAULT '' NOT NULL, "cytoBand" character varying(30) DEFAULT '' NOT NULL, "geneName" text DEFAULT '' NOT NULL, *************** *** 896,900 **** name character varying(40) DEFAULT '' NOT NULL, "lastTouched" timestamp with time zone NOT NULL, ! CONSTRAINT Preset_type CHECK ("searchType" IN ('sample','arraytype','extract','hybridization','plate','user','value','labeled','raw','exp','gene','array','molecule','upload')), Constraint Preset_pkey Primary Key (search) ); --- 896,900 ---- name character varying(40) DEFAULT '' NOT NULL, "lastTouched" timestamp with time zone NOT NULL, ! CONSTRAINT Preset_searchType CHECK ("searchType" IN ('sample','arraytype','extract','hybridization','plate','user','value','labeled','raw','exp','gene','array','molecule','upload')), Constraint Preset_pkey Primary Key (search) ); *************** *** 962,970 **** name character varying(40) DEFAULT '' NOT NULL, "commonName" character varying(40) DEFAULT '' NOT NULL, ! "valueType" character(2) DEFAULT 'i' NOT NULL, options text DEFAULT '' NOT NULL, "defaultValue" text DEFAULT '' NOT NULL, "enumOptions" text default '' not null, ! CONSTRAINT ProgramParameter_type CHECK ("valueType" IN ('i','f','t','a','n','h','e')), Constraint ProgramParameter_pkey Primary Key (program, position) ); --- 962,970 ---- name character varying(40) DEFAULT '' NOT NULL, "commonName" character varying(40) DEFAULT '' NOT NULL, ! "valueType" character(1) DEFAULT 'i' NOT NULL, options text DEFAULT '' NOT NULL, "defaultValue" text DEFAULT '' NOT NULL, "enumOptions" text default '' not null, ! CONSTRAINT ProgramParameter_valueType CHECK ("valueType" IN ('i','f','t','a','n','h','e')), Constraint ProgramParameter_pkey Primary Key (program, position) ); |
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv23080 Modified Files: bioassay.inc.php bioassayset.inc.php job.inc.php mysql.inc.php pgsql.inc.php program.inc.php raw.inc.php trans_create.phtml Log Message: More PostgreSQL stuff Index: bioassay.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassay.inc.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** bioassay.inc.php 9 Sep 2002 10:56:08 -0000 1.34 --- bioassay.inc.php 10 Sep 2002 10:57:41 -0000 1.35 *************** *** 433,438 **** "m.species, m.`clusterId`, bad.molecule, bad.position AS position, ". "$dia $ecol ". ! "FROM $config[dbDynamic]BioAssayData$this->experiment bad ". ! $search->getExtraTables()." $ljoin ". "WHERE ".db_true()." ". $search->getWhere()." ".$search->getExtraWhere(). --- 433,438 ---- "m.species, m.`clusterId`, bad.molecule, bad.position AS position, ". "$dia $ecol ". ! "FROM $config[dbDynamic]BioAssayData$this->experiment bad $ljoin ". ! $search->getExtraTables()." ". "WHERE ".db_true()." ". $search->getWhere()." ".$search->getExtraWhere(). *************** *** 475,480 **** $query = "SELECT DISTINCT bad.molecule ". ! "FROM $config[dbDynamic]BioAssayData$this->experiment bad ". ! $search->getExtraTables()." $ljoin ". "WHERE ".db_true()." ".$search->getWhere()." ". $search->getExtraWhere()." $ob"; --- 475,480 ---- $query = "SELECT DISTINCT bad.molecule ". ! "FROM $config[dbDynamic]BioAssayData$this->experiment bad $ljoin ". ! $search->getExtraTables()." ". "WHERE ".db_true()." ".$search->getWhere()." ". $search->getExtraWhere()." $ob"; *************** *** 591,597 **** $query = "SELECT ba.id, $sel $xf ". ! "FROM $config[dbDynamic]BioAssayData$expid bad ". $search->getExtraTables()." ". - "$ljoin ". "WHERE bad.molecule = $molecule ". $search->getWhere()." ".$search->getExtraWhere()." "; --- 591,596 ---- $query = "SELECT ba.id, $sel $xf ". ! "FROM $config[dbDynamic]BioAssayData$expid bad $ljoin ". $search->getExtraTables()." ". "WHERE bad.molecule = $molecule ". $search->getWhere()." ".$search->getExtraWhere()." "; *************** *** 881,889 **** $ob = $search->makeOrderBy($sortfields); ! $query = "SELECT rba.name as rawname, ba.* ". "FROM BioAssay ba ". "LEFT JOIN RawBioAssay rba ON rba.id = ba.`rawBioAssay` ". "WHERE ba.`bioAssaySet` = $setid ".$search->getWhere()." ". ! "GROUP BY ba.id $ob ".$search->makeLimit(); $arr = array(); --- 880,888 ---- $ob = $search->makeOrderBy($sortfields); ! $query = "SELECT ba.*, rba.name as rawname ". "FROM BioAssay ba ". "LEFT JOIN RawBioAssay rba ON rba.id = ba.`rawBioAssay` ". "WHERE ba.`bioAssaySet` = $setid ".$search->getWhere()." ". ! "$ob ".$search->makeLimit(); $arr = array(); *************** *** 944,948 **** $query = "INSERT INTO $config[dbDynamic]BioAssayData$this->experiment ". "(`bioAssay`, position, molecule, intensity1, intensity2, ratio) ". ! "SELECT $this->id, position, molecule, $i1, $i2, ($i1) / ($i2) ". "FROM RawBioAssayData WHERE `rawBioAssay` = $this->rawBioAssay"; if(!query($query)) return false; --- 943,948 ---- $query = "INSERT INTO $config[dbDynamic]BioAssayData$this->experiment ". "(`bioAssay`, position, molecule, intensity1, intensity2, ratio) ". ! "SELECT $this->id, position, molecule, $i1, $i2, ". ! "CASE WHEN $i1 > 0 AND $i2 > 0 THEN ($i1)/($i2) ELSE -1 END ". "FROM RawBioAssayData WHERE `rawBioAssay` = $this->rawBioAssay"; if(!query($query)) return false; Index: bioassayset.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassayset.inc.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** bioassayset.inc.php 9 Sep 2002 10:56:08 -0000 1.26 --- bioassayset.inc.php 10 Sep 2002 10:57:41 -0000 1.27 *************** *** 81,85 **** $expid = $this->experiment; ! $query = "SELECT id FROM BioAssay WHERE bioAssaySet = $id"; $rc = true; if(!($res = query($query))) --- 81,85 ---- $expid = $this->experiment; ! $query = "SELECT id FROM BioAssay WHERE `bioAssaySet` = $id"; $rc = true; if(!($res = query($query))) *************** *** 199,203 **** $id = (int)$id; $query = "SELECT 1 FROM BioAssaySet ". ! "WHERE id = $id && experiment = ".(int)$expid; $res = query($query); if(db_num_rows($res)) return true; --- 199,203 ---- $id = (int)$id; $query = "SELECT 1 FROM BioAssaySet ". ! "WHERE id = $id AND experiment = ".(int)$expid; $res = query($query); if(db_num_rows($res)) return true; *************** *** 631,635 **** "$config[dbDynamic]BioAssaySetGene$this->experiment ". "(`bioAssaySet`, molecule, cnt) ". ! "SELECT STRAIGHT_JOIN $this->id, bad.molecule, COUNT(DISTINCT ba.id) ". "FROM BioAssay ba, $datatable bad ". "WHERE ba.`bioAssaySet` = $this->id AND bad.`bioAssay` = ba.id ". --- 631,636 ---- "$config[dbDynamic]BioAssaySetGene$this->experiment ". "(`bioAssaySet`, molecule, cnt) ". ! "SELECT ".db_straight_join()." $this->id, ". ! "bad.molecule, COUNT(DISTINCT ba.id) ". "FROM BioAssay ba, $datatable bad ". "WHERE ba.`bioAssaySet` = $this->id AND bad.`bioAssay` = ba.id ". *************** *** 643,647 **** "$config[dbDynamic]BioAssaySetPosGene$this->experiment ". "(`bioAssaySet`, position, molecule, cnt) ". ! "SELECT STRAIGHT_JOIN $this->id, bad.position, bad.molecule, COUNT(*) ". "FROM BioAssay ba, $datatable bad ". "WHERE ba.`bioAssaySet` = $this->id AND bad.`bioAssay` = ba.id ". --- 644,649 ---- "$config[dbDynamic]BioAssaySetPosGene$this->experiment ". "(`bioAssaySet`, position, molecule, cnt) ". ! "SELECT ".db_straight_join()." $this->id, ". ! "bad.position, bad.molecule, COUNT(*) ". "FROM BioAssay ba, $datatable bad ". "WHERE ba.`bioAssaySet` = $this->id AND bad.`bioAssay` = ba.id ". Index: job.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/job.inc.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** job.inc.php 10 Sep 2002 09:29:44 -0000 1.37 --- job.inc.php 10 Sep 2002 10:57:41 -0000 1.38 *************** *** 38,43 **** $this->experiment = (int)$experiment; $this->transformation = (int)$transformation; ! $this->startTime = $startTime; ! $this->endTime = $endTime; $this->status = $status; $this->program = (int)$program; --- 38,43 ---- $this->experiment = (int)$experiment; $this->transformation = (int)$transformation; ! $this->startTime = strtodate($startTime); ! $this->endTime = strtodate($endTime); $this->status = $status; $this->program = (int)$program; *************** *** 229,238 **** function setStartTime($val) { ! $this->startTime = $val; $this->saveVar("startTime", $val); } function setEndTime($val) { ! $this->endTime = $val; $this->saveVar("endTime", $val); } --- 229,238 ---- function setStartTime($val) { ! $this->startTime = strtodate($val); $this->saveVar("startTime", $val); } function setEndTime($val) { ! $this->endTime = strtodate($val); $this->saveVar("endTime", $val); } Index: mysql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/mysql.inc.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mysql.inc.php 10 Sep 2002 09:29:44 -0000 1.15 --- mysql.inc.php 10 Sep 2002 10:57:41 -0000 1.16 *************** *** 307,313 **** { if($base) ! return "LOG($arg)/LOG($base)"; else return "LOG($arg)"; } --- 307,318 ---- { if($base) ! return "(LOG($arg)/LOG($base))"; else return "LOG($arg)"; + } + + function db_straight_join() + { + return "STRAIGHT_JOIN"; } Index: pgsql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/pgsql.inc.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pgsql.inc.php 10 Sep 2002 09:29:44 -0000 1.11 --- pgsql.inc.php 10 Sep 2002 10:57:41 -0000 1.12 *************** *** 394,401 **** { if($base) ! $e = "LOG(".(float)$base.", float8($arg))"; else $e = "LOG(float8($arg))"; return "CASE WHEN $arg > 0. THEN $e ELSE NULL END"; } --- 394,406 ---- { if($base) ! $e = "(LOG(float8($arg))/LOG($base.))"; else $e = "LOG(float8($arg))"; return "CASE WHEN $arg > 0. THEN $e ELSE NULL END"; + } + + function db_straight_join() + { + return ""; } Index: program.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/program.inc.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** program.inc.php 9 Sep 2002 06:29:34 -0000 1.22 --- program.inc.php 10 Sep 2002 10:57:41 -0000 1.23 *************** *** 167,171 **** { $query = "SELECT id, name FROM Program ". ! "WHERE `onServer` ORDER BY name"; $res = query($query); $arr = array(); --- 167,171 ---- { $query = "SELECT id, name FROM Program ". ! "WHERE `onServer` <> 0 ORDER BY name"; $res = query($query); $arr = array(); *************** *** 185,189 **** --- 185,193 ---- $arr = array(); while($row =& db_fetch_assoc($res)) + //temp. fix for my dev database + { + $row["valueType"]=trim($row["valueType"]); $arr[(int)$row["position"]] = $row; + } return $arr; } Index: raw.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw.inc.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** raw.inc.php 10 Sep 2002 09:29:44 -0000 1.36 --- raw.inc.php 10 Sep 2002 10:57:41 -0000 1.37 *************** *** 484,488 **** "FROM RawBioAssay r, LabeledExtract le, Extract e ". "WHERE r.id = ".(int)$rawid." ". ! "AND le.id = r.`labeledCh`".($pos+1)." ". "AND e.id = le.extract"; $res = query($query); --- 484,488 ---- "FROM RawBioAssay r, LabeledExtract le, Extract e ". "WHERE r.id = ".(int)$rawid." ". ! "AND le.id = r.`labeledCh".($pos+1)."` ". "AND e.id = le.extract"; $res = query($query); Index: trans_create.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/trans_create.phtml,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** trans_create.phtml 29 Aug 2002 16:51:34 -0000 1.23 --- trans_create.phtml 10 Sep 2002 10:57:41 -0000 1.24 *************** *** 181,184 **** --- 181,186 ---- if(!$prog->read($i_prog)) $err = "No such plug-in"; + else if(!$prog->getOnServer()) + $err = "The selected plug-in has been disabled by the admin"; } if(!$prog->getId()) $step = 0; *************** *** 401,406 **** if(!isset($ptypes[$type])) { ! echo "<tr><td colspan=3>Unknown parameter ". ! "type '$type'</td></tr>\n"; continue; } --- 403,408 ---- if(!isset($ptypes[$type])) { ! echo "<tr><td colspan=3>Unknown parameter type ". ! "'$type'</td></tr>\n"; continue; } |
From: <tr...@us...> - 2002-09-10 09:31:07
|
Update of /cvsroot/basedb/basedb In directory usw-pr-cvs1:/tmp/cvs-serv31316 Modified Files: base_pg.sql Log Message: Changed smallint to float (should have been unsigned smallint, but there's no such type in pgsql) Index: base_pg.sql =================================================================== RCS file: /cvsroot/basedb/basedb/base_pg.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** base_pg.sql 9 Sep 2002 19:53:54 -0000 1.3 --- base_pg.sql 10 Sep 2002 09:31:04 -0000 1.4 *************** *** 212,222 **** CREATE TABLE BioAssaySetCreation ( "bioAssaySet" integer DEFAULT '0' NOT NULL, ! "partMeanFG" double precision DEFAULT '0' NOT NULL, ! "partMedianFG" double precision DEFAULT '0' NOT NULL, ! "partMeanBG" double precision DEFAULT '0' NOT NULL, ! "partMedianBG" double precision DEFAULT '0' NOT NULL, ! "partMeanMeanBG" double precision DEFAULT '0' NOT NULL, ! "partMeanMedianBG" double precision DEFAULT '0' NOT NULL, ! "partTotalIntensity" double precision DEFAULT '0' NOT NULL, Constraint BioAssaySetCreation_pkey Primary Key ("bioAssaySet") [...114 lines suppressed...] ! "CV" real, Constraint RawBioAssayData_pkey Primary Key ("rawBioAssay", position) ); *************** *** 1388,1394 **** position integer DEFAULT '0' NOT NULL, molecule integer DEFAULT '0' NOT NULL, ! intensity1 double precision DEFAULT '0' NOT NULL, ! intensity2 double precision DEFAULT '0' NOT NULL, ! ratio double precision DEFAULT '0' NOT NULL, Constraint TemplateBioAssayData_pkey Primary Key ("bioAssay", position) ); --- 1388,1394 ---- position integer DEFAULT '0' NOT NULL, molecule integer DEFAULT '0' NOT NULL, ! intensity1 real DEFAULT '0' NOT NULL, ! intensity2 real DEFAULT '0' NOT NULL, ! ratio real DEFAULT '0' NOT NULL, Constraint TemplateBioAssayData_pkey Primary Key ("bioAssay", position) ); |
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv30948 Modified Files: acquisition.inc.php image.inc.php job.inc.php mysql.inc.php pgsql.inc.php plot.inc.php raw.inc.php ware.inc.php Log Message: More fixes for postgresql Index: acquisition.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/acquisition.inc.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** acquisition.inc.php 9 Sep 2002 06:29:33 -0000 1.14 --- acquisition.inc.php 10 Sep 2002 09:29:44 -0000 1.15 *************** *** 99,103 **** function removeImages() { ! $query = "SELECT id FROM Image WHERE imageAcquisition = $this->id"; $res = query($query); $rc = true; --- 99,103 ---- function removeImages() { ! $query = "SELECT id FROM Image WHERE `imageAcquisition` = $this->id"; $res = query($query); $rc = true; *************** *** 158,162 **** $query = "SELECT COUNT(*) FROM ImageAcquisition ia ". ! "LEFT JOIN Image im ON im.imageAcquisition = ia.id ". "WHERE ".db_true()." ". $search->getWhere()." ".$search->getExtraWhere(); --- 158,162 ---- $query = "SELECT COUNT(*) FROM ImageAcquisition ia ". ! "LEFT JOIN Image im ON im.`imageAcquisition` = ia.id ". "WHERE ".db_true()." ". $search->getWhere()." ".$search->getExtraWhere(); *************** *** 173,190 **** { // Add more fields here ! $sortfields = array("name", "scannerName", "scannerVersion", ! "scanDate", "images", "raws"); $ob = $search->makeOrderBy($sortfields); ! $query = "SELECT ia.*, COUNT(im.id) AS images, ". ! "hw.name AS scannerName, hw.version AS scannerVersion, ". "COUNT(r.id) AS raws ". ! "FROM ImageAcquisition ia, Hardware hw ". ! "LEFT JOIN Image im ON im.imageAcquisition = ia.id ". ! "LEFT JOIN RawBioAssay r ON r.imageAcquisition = ia.id ". "WHERE hw.id = ia.scanner ". $search->getWhere()." ".$search->getExtraWhere()." ". ! "GROUP BY ia.id $ob ".$search->makeLimit(); $arr = array(); if(!($res = query($query))) --- 173,199 ---- { // Add more fields here ! $sortfields = array("name", "`scannerName`", "`scannerVersion`", ! "`scanDate`", "images", "raws"); $ob = $search->makeOrderBy($sortfields); ! if(db_has_subselects()) ! { ! $ss1 = "t.* FROM ImageAcquisition ia, ". ! "(SELECT ia.id,"; ! $ss2 = ", hw.name, hw.version) AS t WHERE ia.id = t.id"; ! } ! else ! $ss1 = $ss2 = ""; ! ! $query = "SELECT ia.*, $ss1 COUNT(im.id) AS images, ". ! "hw.name AS `scannerName`, hw.version AS `scannerVersion`, ". "COUNT(r.id) AS raws ". ! "FROM Hardware hw, ImageAcquisition ia ". ! "LEFT JOIN Image im ON im.`imageAcquisition` = ia.id ". ! "LEFT JOIN RawBioAssay r ON r.`imageAcquisition` = ia.id ". "WHERE hw.id = ia.scanner ". $search->getWhere()." ".$search->getExtraWhere()." ". ! "GROUP BY ia.id $ss2 $ob ".$search->makeLimit(); $arr = array(); if(!($res = query($query))) Index: image.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/image.inc.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** image.inc.php 9 Sep 2002 06:29:34 -0000 1.12 --- image.inc.php 10 Sep 2002 09:29:44 -0000 1.13 *************** *** 66,71 **** function write() { ! return parent::write(array("`imageAcquisition`", "channels", ! "`fileSize`")); } --- 66,71 ---- function write() { ! return parent::write(array("imageAcquisition", "channels", ! "fileSize")); } Index: job.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/job.inc.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** job.inc.php 9 Sep 2002 06:29:34 -0000 1.36 --- job.inc.php 10 Sep 2002 09:29:44 -0000 1.37 *************** *** 222,226 **** { $query = "UPDATE Job ". ! "SET `resultText` = CONCAT(`resultText`, '\n".addslashes($text)."') ". "WHERE id = $this->id"; query($query); --- 222,227 ---- { $query = "UPDATE Job ". ! "SET `resultText` = ".db_string_concat( ! array("`resultText`", "'\n".addslashes($text)."'"))." ". "WHERE id = $this->id"; query($query); *************** *** 261,265 **** /* ! // Counts the number of hits and sets up the search object with that information function prepareSearch(&$search, $expid, $hpp) { --- 262,266 ---- /* ! // Counts the number of hits and sets up the search object function prepareSearch(&$search, $expid, $hpp) { Index: mysql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/mysql.inc.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mysql.inc.php 9 Sep 2002 19:55:27 -0000 1.14 --- mysql.inc.php 10 Sep 2002 09:29:44 -0000 1.15 *************** *** 122,125 **** --- 122,126 ---- for(reset($keyvalues); list(, $v) = each($keyvalues); ) $arr[] = "'".addslashes($v)."'"; + $arr[] = "NULL"; for(reset($values); list(, $v) = each($values); ) $arr[] = "'".addslashes($v)."'"; *************** *** 296,299 **** --- 297,313 ---- { return $expr; + } + + function db_string_concat($args) + { + return "CONCAT(".implode(",", $args).")"; + } + + function db_func_log($arg, $base = 0) + { + if($base) + return "LOG($arg)/LOG($base)"; + else + return "LOG($arg)"; } Index: pgsql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/pgsql.inc.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pgsql.inc.php 9 Sep 2002 19:55:27 -0000 1.10 --- pgsql.inc.php 10 Sep 2002 09:29:44 -0000 1.11 *************** *** 250,256 **** global $curDb; $f = file($filename); ! if(!pg_copy_from($curDb->serv, $table, $f)) return -1; ! return count($f); } --- 250,275 ---- global $curDb; $f = file($filename); ! if(!$f) ! return 0; ! $query = "COPY $table FROM stdin"; ! if(!query($query)) return -1; ! $added = 0; ! for($i = 0, $err = 0; $i < count($f) && !$err; $i++) ! { ! if(pg_put_line($f[$i])) ! $added++; ! else ! { ! $err = 1; ! error_log("offending line: $f[$i]"); ! } ! } ! pg_put_line("\\.\n"); ! pg_end_copy(); ! return $err ? -1 : $added; ! /* if(!pg_copy_from($curDb->serv, strtolower($table), $f)) ! return -1; ! return count($f);*/ } *************** *** 365,368 **** --- 384,401 ---- { return "CASE WHEN $expr THEN 1 ELSE 0 END"; + } + + function db_string_concat($args) + { + return implode("||", $args); + } + + function db_func_log($arg, $base = 0) + { + if($base) + $e = "LOG(".(float)$base.", float8($arg))"; + else + $e = "LOG(float8($arg))"; + return "CASE WHEN $arg > 0. THEN $e ELSE NULL END"; } Index: plot.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/plot.inc.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** plot.inc.php 9 Sep 2002 10:56:08 -0000 1.21 --- plot.inc.php 10 Sep 2002 09:29:44 -0000 1.22 *************** *** 96,100 **** else if($this->item == 2) $s = "$table.ratio"; else $s = "$table.intensity1*$table.intensity2"; ! if($log) $s = "LOG($s)/LOG($log)"; if($this->item == 3) { --- 96,101 ---- else if($this->item == 2) $s = "$table.ratio"; else $s = "$table.intensity1*$table.intensity2"; ! if($log) ! $s = db_func_log($s, $log); if($this->item == 3) { *************** *** 118,122 **** else $s = "($table.`FCh1$mn`-$table.`BCh1$mn`)*". "($table.`FCh2$mn`-$table.`BCh2$mn`)"; ! if($log) $s = "LOG($s)/LOG($log)"; if($this->item == 3) { --- 119,124 ---- else $s = "($table.`FCh1$mn`-$table.`BCh1$mn`)*". "($table.`FCh2$mn`-$table.`BCh2$mn`)"; ! if($log) ! $s = db_func_log($s, $log); if($this->item == 3) { Index: raw.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw.inc.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** raw.inc.php 9 Sep 2002 15:49:59 -0000 1.35 --- raw.inc.php 10 Sep 2002 09:29:44 -0000 1.36 *************** *** 285,294 **** $ob = $search->makeOrderBy($sortfields); ! $query = "SELECT r.*, ". ! "CONCAT(sw.name, ' ', sw.version) AS software ". "FROM RawBioAssay r, Software sw ". "WHERE sw.id = r.`featureSoftware` ". $search->getWhere()." ".$search->getExtraWhere()." ". ! "GROUP BY r.id $ob ".$search->makeLimit(); $arr = array(); [...62 lines suppressed...] ! "FLOOR(LOG((rbad.`FCh1Mean`-rbad.`BCh1Mean`)/". ! "(rbad.`FCh2Mean`-rbad.`BCh2Mean`))/LOG(2)+.5)"); if($histbox == -1) { ! $groups[2] = "FLOOR(LOG((rbad.`FCh1Mean`-rbad.`BCh1Mean`)/". ! "(rbad.`FCh2Mean`-rbad.`BCh2Mean`))*30+.5)"; $extra = "rbad.dia,"; } --- 658,668 ---- $third = (int)$third; $groups = array("rbad.block", "rbad.flags", ! "FLOOR(.5+".db_func_log("(rbad.`FCh1Mean`-rbad.`BCh1Mean`)/". ! "(rbad.`FCh2Mean`-rbad.`BCh2Mean`)", 2).")"); if($histbox == -1) { ! $groups[2] = "FLOOR(.5+30.*". ! db_func_log("(rbad.`FCh1Mean`-rbad.`BCh1Mean`)/". ! "(rbad.`FCh2Mean`-rbad.`BCh2Mean`)").")"; $extra = "rbad.dia,"; } Index: ware.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/ware.inc.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ware.inc.php 9 Sep 2002 06:29:34 -0000 1.11 --- ware.inc.php 10 Sep 2002 09:29:44 -0000 1.12 *************** *** 87,91 **** $fields = array(); ! if($onlyShown) $search->addExtraWhere("w.shown"); $search->makeWhere($fields); --- 87,91 ---- $fields = array(); ! if($onlyShown) $search->addExtraWhere("w.shown <> 0"); $search->makeWhere($fields); *************** *** 168,172 **** function getBrief() { ! $query = "SELECT id, name, version FROM Software WHERE shown"; $res = query($query); $arr = array(); --- 168,172 ---- function getBrief() { ! $query = "SELECT id, name, version FROM Software WHERE shown <> 0"; $res = query($query); $arr = array(); *************** *** 236,240 **** function getBrief() { ! $query = "SELECT id, name, version FROM Hardware WHERE shown"; $res = query($query); $arr = array(); --- 236,240 ---- function getBrief() { ! $query = "SELECT id, name, version FROM Hardware WHERE shown <> 0"; $res = query($query); $arr = array(); |
From: <tr...@us...> - 2002-09-09 15:50:05
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv10482 Modified Files: raw.inc.php Log Message: SQL fixes: stddev, types in expressions, LEFT JOIN order... Index: raw.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw.inc.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** raw.inc.php 9 Sep 2002 06:29:34 -0000 1.34 --- raw.inc.php 9 Sep 2002 15:49:59 -0000 1.35 *************** *** 366,372 **** "s1.id AS sample1, s1.name AS `sampleName1`, ". "s2.id AS sample2, s2.name AS `sampleName2` ". ! "FROM RawBioAssay r, SharedRawBioAssay sr, Submitter u, ". ! "ImageAcquisition ia, Hybridization h ". ! $search->getExtraTables()." ". "LEFT JOIN LabeledExtract le1 ON le1.id = r.`labeledCh1` ". "LEFT JOIN Extract e1 ON e1.id = le1.extract ". --- 366,370 ---- "s1.id AS sample1, s1.name AS `sampleName1`, ". "s2.id AS sample2, s2.name AS `sampleName2` ". [...149 lines suppressed...] ! else ! { ! $wot = "100*SUM(".db_cast_boolean_int("rbad.flags <> 0"). ! ")/COUNT(rbad.flags), 0"; } $query = "SELECT r.name, $wot, r.id ". *************** *** 730,734 **** "ExperimentRawBioAssay pr ". "WHERE rbad.`rawBioAssay` = r.id AND r.id = pr.`rawBioAssay` ". ! "AND pr.experiment = $expid GROUP BY id ORDER BY name"; $res = query($query); --- 735,739 ---- "ExperimentRawBioAssay pr ". "WHERE rbad.`rawBioAssay` = r.id AND r.id = pr.`rawBioAssay` ". ! "AND pr.experiment = $expid GROUP BY name, id ORDER BY name"; $res = query($query); |
From: <tr...@us...> - 2002-09-09 15:49:42
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv10129 Modified Files: pgsql.inc.php mysql.inc.php Log Message: Added boolean->number conversion Index: pgsql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/pgsql.inc.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pgsql.inc.php 9 Sep 2002 10:56:08 -0000 1.8 --- pgsql.inc.php 9 Sep 2002 15:49:15 -0000 1.9 *************** *** 351,353 **** --- 351,364 ---- } + // conversion from the annoying boolean type + function db_cast_boolean_float($expr) + { + return "CASE WHEN $expr THEN 1.0 ELSE 0.0 END"; + } + + function db_cast_boolean_int($expr) + { + return "CASE WHEN $expr THEN 1 ELSE 0 END"; + } + ?> Index: mysql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/mysql.inc.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mysql.inc.php 9 Sep 2002 10:56:08 -0000 1.12 --- mysql.inc.php 9 Sep 2002 15:49:26 -0000 1.13 *************** *** 282,284 **** --- 282,295 ---- } + // conversion from the annoying boolean type + function db_cast_boolean_float($expr) + { + return $expr; + } + + function db_cast_boolean_int($expr) + { + return $expr; + } + ?> |
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv19503 Modified Files: bioassay.inc.php bioassayset.inc.php common.inc.php experiment.inc.php mysql.inc.php pgsql.inc.php plot.inc.php Log Message: Turned dynamic database into table name prefix Index: bioassay.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassay.inc.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** bioassay.inc.php 9 Sep 2002 06:29:34 -0000 1.33 --- bioassay.inc.php 9 Sep 2002 10:56:08 -0000 1.34 *************** *** 75,79 **** return false; ! $query = "DELETE FROM $config[dbDynamic].BioAssayData$this->experiment ". "WHERE `bioAssay` = $this->id"; query($query); --- 75,79 ---- return false; ! $query = "DELETE FROM $config[dbDynamic]BioAssayData$this->experiment ". "WHERE `bioAssay` = $this->id"; [...197 lines suppressed...] "SELECT $this->id, position, molecule, $i1, $i2, ($i1) / ($i2) ". --- 942,946 ---- } ! $query = "INSERT INTO $config[dbDynamic]BioAssayData$this->experiment ". "(`bioAssay`, position, molecule, intensity1, intensity2, ratio) ". "SELECT $this->id, position, molecule, $i1, $i2, ($i1) / ($i2) ". *************** *** 1053,1057 **** $query = "SELECT $xc AS `A`, $yc AS `B`, $extra ". ! "FROM $config[dbDynamic].BioAssayData$this->experiment bad ". $sea->getExtraTables()." ". "WHERE bad.`bioAssay` = $this->id ".$sea->getExtraWhere()." ". --- 1053,1057 ---- $query = "SELECT $xc AS `A`, $yc AS `B`, $extra ". ! "FROM $config[dbDynamic]BioAssayData$this->experiment bad ". $sea->getExtraTables()." ". "WHERE bad.`bioAssay` = $this->id ".$sea->getExtraWhere()." ". Index: bioassayset.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassayset.inc.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** bioassayset.inc.php 8 Sep 2002 22:38:08 -0000 1.25 --- bioassayset.inc.php 9 Sep 2002 10:56:08 -0000 1.26 *************** *** 96,103 **** $query = "DELETE FROM BioAssaySetCreation WHERE `bioAssaySet` = $id"; query($query); ! $query = "DELETE FROM $config[dbDynamic].BioAssaySetGene$expid ". "WHERE `bioAssaySet` = $id"; query($query); ! $query = "DELETE FROM $config[dbDynamic].BioAssaySetPosGene$expid ". "WHERE `bioAssaySet` = $id"; query($query); --- 96,103 ---- $query = "DELETE FROM BioAssaySetCreation WHERE `bioAssaySet` = $id"; [...222 lines suppressed...] "SELECT STRAIGHT_JOIN $this->id, bad.position, bad.molecule, COUNT(*) ". --- 641,645 ---- // appear in. $query = "INSERT INTO ". ! "$config[dbDynamic]BioAssaySetPosGene$this->experiment ". "(`bioAssaySet`, position, molecule, cnt) ". "SELECT STRAIGHT_JOIN $this->id, bad.position, bad.molecule, COUNT(*) ". *************** *** 678,682 **** { global $config; ! $table = "$config[dbDynamic].BioAssayData$this->experiment"; $columns = array("bioAssay", "position", "molecule", "intensity1", "intensity2", "ratio"); --- 680,684 ---- { global $config; ! $table = "$config[dbDynamic]BioAssayData$this->experiment"; $columns = array("bioAssay", "position", "molecule", "intensity1", "intensity2", "ratio"); Index: common.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/common.inc.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** common.inc.php 8 Sep 2002 13:18:33 -0000 1.18 --- common.inc.php 9 Sep 2002 10:56:08 -0000 1.19 *************** *** 26,29 **** --- 26,30 ---- require_once("display.inc.php"); require_once("getconfig.inc.php"); + require_once("db.inc.php"); if(!isset($config) || !is_array($config)) *************** *** 49,52 **** --- 50,57 ---- unset($cfgvars); unset($v); + + // The name of the dynamic database has to be turned into something + // that can be put in an SQL statement as the prefix of a table name. + db_dynamic_db_prepare($config["dbDynamic"]); // This appeared before we had chosen the name 'BASE'. It used to be in Index: experiment.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/experiment.inc.php,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** experiment.inc.php 9 Sep 2002 06:33:50 -0000 1.48 --- experiment.inc.php 9 Sep 2002 10:56:08 -0000 1.49 *************** *** 88,96 **** { if(!db_table_copy("TemplateBioAssayData", ! "$config[dbDynamic].BioAssayData$this->id") || !db_table_copy("TemplateBioAssaySetGene", ! "$config[dbDynamic].BioAssaySetGene$this->id") || !db_table_copy("TemplateBioAssaySetPosGene", ! "$config[dbDynamic].BioAssaySetPosGene$this->id")) { if(!$this->remove()) --- 88,96 ---- { if(!db_table_copy("TemplateBioAssayData", ! "$config[dbDynamic]BioAssayData$this->id") || !db_table_copy("TemplateBioAssaySetGene", ! "$config[dbDynamic]BioAssaySetGene$this->id") || !db_table_copy("TemplateBioAssaySetPosGene", ! "$config[dbDynamic]BioAssaySetPosGene$this->id")) { if(!$this->remove()) *************** *** 114,120 **** return false; ! db_table_drop("$config[dbDynamic].BioAssayData$id"); ! db_table_drop("$config[dbDynamic].BioAssaySetGene$id"); ! db_table_drop("$config[dbDynamic].BioAssaySetPosGene$id"); return true; } --- 114,120 ---- return false; ! db_table_drop("$config[dbDynamic]BioAssayData$id"); ! db_table_drop("$config[dbDynamic]BioAssaySetGene$id"); ! db_table_drop("$config[dbDynamic]BioAssaySetPosGene$id"); return true; } Index: mysql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/mysql.inc.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mysql.inc.php 9 Sep 2002 06:39:01 -0000 1.11 --- mysql.inc.php 9 Sep 2002 10:56:08 -0000 1.12 *************** *** 275,277 **** --- 275,284 ---- } + function db_dynamic_db_prepare(&$dyn) + { + // MySQL can access a table in another database as database.table, + // so we just append a '.' to the database name. + $dyn .= "."; + } + ?> Index: pgsql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/pgsql.inc.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pgsql.inc.php 9 Sep 2002 06:39:01 -0000 1.7 --- pgsql.inc.php 9 Sep 2002 10:56:08 -0000 1.8 *************** *** 339,341 **** --- 339,353 ---- } + function db_dynamic_db_prepare(&$dyn) + { + // PostgreSQL can only access tables in one database at a time, + // so we turn this into a prefix for the table name. As there's + // (by default) a 31-character limit on table names, we need to + // make sure that the name doesn't get to long. The longest table + // name we can expect is BioAssaySetPosGene[0-9]{10}, which has + // 28 characters. Although having 10^9 Experiments seems a bit odd, + // we play it safe and limit the prefix to 2 chars plus underscore. + $dyn = substr($dyn, 0, 2)."_"; + } + ?> Index: plot.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/plot.inc.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** plot.inc.php 8 Sep 2002 22:38:08 -0000 1.20 --- plot.inc.php 9 Sep 2002 10:56:08 -0000 1.21 *************** *** 435,439 **** if($a1->type == "v") ! $table1 = "$config[dbDynamic].BioAssayData".$a1->vset->getExperiment()." t1"; else $table1 = "RawBioAssayData t1"; if($a1->type == $a2->type && $a1->id == $a2->id) --- 435,439 ---- if($a1->type == "v") ! $table1 = "$config[dbDynamic]BioAssayData".$a1->vset->getExperiment()." t1"; else $table1 = "RawBioAssayData t1"; if($a1->type == $a2->type && $a1->id == $a2->id) *************** *** 465,469 **** { if($a2->type == "v") ! $table2 = "$config[dbDynamic].BioAssayData".$a2->vset->getExperiment()." t2"; else $table2 = "RawBioAssayData t2"; --- 465,469 ---- { if($a2->type == "v") ! $table2 = "$config[dbDynamic]BioAssayData".$a2->vset->getExperiment()." t2"; else $table2 = "RawBioAssayData t2"; |
From: <tr...@us...> - 2002-09-09 10:29:59
|
Update of /cvsroot/basedb/basedb In directory usw-pr-cvs1:/tmp/cvs-serv8197 Modified Files: README Log Message: Added note about newer/future versions of PHP Index: README =================================================================== RCS file: /cvsroot/basedb/basedb/README,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** README 9 Sep 2002 08:22:00 -0000 1.8 --- README 9 Sep 2002 10:29:56 -0000 1.9 *************** *** 14,19 **** anyone has tested MySQL 4, but it's likely that it works. PHP 4.2.1 works, and 4.2.0 probably works too. Note that there is a security ! issue with 4.2.1, and you should use 4.2.2. At the moment of writing, PHP 4.3 ! hasn't been released yet, and we haven't tested BASE with it. PHP compilation: --- 14,20 ---- anyone has tested MySQL 4, but it's likely that it works. PHP 4.2.1 works, and 4.2.0 probably works too. Note that there is a security ! issue with 4.2.1, and you should use 4.2.2 or later. At the moment of writing, ! PHP 4.3 hasn't been released yet, and we haven't tested BASE with it. It's ! possible that some changes to BASE will be needed for PHP 4.3 compatibility. PHP compilation: |
From: <tr...@us...> - 2002-09-09 10:23:08
|
Update of /cvsroot/basedb/basedb In directory usw-pr-cvs1:/tmp/cvs-serv4536 Modified Files: base_pg.sql Log Message: Re-added quotes around all mixed-case column names Index: base_pg.sql =================================================================== RCS file: /cvsroot/basedb/basedb/base_pg.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** base_pg.sql 8 Sep 2002 14:48:00 -0000 1.1 --- base_pg.sql 9 Sep 2002 10:23:04 -0000 1.2 *************** *** 22,26 **** id integer DEFAULT nextval('array_id_seq'::text) NOT NULL, batch integer DEFAULT '0' NOT NULL, ! orderNumber smallint DEFAULT '0' NOT NULL, barcode character varying(20) DEFAULT '' NOT NULL, destroyed smallint DEFAULT '0' NOT NULL, --- 22,26 ---- id integer DEFAULT nextval('array_id_seq'::text) NOT NULL, batch integer DEFAULT '0' NOT NULL, ! "orderNumber" smallint DEFAULT '0' NOT NULL, barcode character varying(20) DEFAULT '' NOT NULL, [...1591 lines suppressed...] -- --- 2221,2225 ---- -- ! CREATE INDEX addeddate_news_index ON News USING btree ("addedDate"); -- *************** *** 2237,2241 **** -- ! CREATE INDEX mol_rawbioassaydata_index ON RawBioAssayData USING btree (rawBioAssay, molecule); -- --- 2229,2233 ---- -- ! CREATE INDEX mol_rawbioassaydata_index ON RawBioAssayData USING btree ("rawBioAssay", molecule); -- |
From: <tr...@us...> - 2002-09-09 08:22:05
|
Update of /cvsroot/basedb/basedb In directory usw-pr-cvs1:/tmp/cvs-serv18914 Modified Files: README Log Message: Corrected tpyo, part II Index: README =================================================================== RCS file: /cvsroot/basedb/basedb/README,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** README 9 Sep 2002 08:17:21 -0000 1.7 --- README 9 Sep 2002 08:22:00 -0000 1.8 *************** *** 7,18 **** Here's what you need to do to get BASE running: ! Download, install, and configure Apache, MySQL, and PHP. Version ! requirements: Apache 1.3.x has been tested. Apache 2 might be tricky to get ! to work with PHP, but it has been done. MySQL 3.23.x (x > 40 or so) is know to work with BASE. We don't know if anyone has tested MySQL 4, but it's likely that it works. PHP 4.2.1 works, and 4.2.0 probably works too. Note that there is a security issue with 4.2.1, and you should use 4.2.2. At the moment of writing, PHP 4.3 ! hasn't been released yet, adn we haven't tested BASE with it. PHP compilation: --- 7,19 ---- Here's what you need to do to get BASE running: ! Download, install, and configure Apache, MySQL, and PHP. ! Version requirements: ! Apache 1.3.x has been tested. Apache 2 might be tricky to get to work with ! PHP, but it has been done. MySQL 3.23.x (x > 40 or so) is know to work with BASE. We don't know if anyone has tested MySQL 4, but it's likely that it works. PHP 4.2.1 works, and 4.2.0 probably works too. Note that there is a security issue with 4.2.1, and you should use 4.2.2. At the moment of writing, PHP 4.3 ! hasn't been released yet, and we haven't tested BASE with it. PHP compilation: |