Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv8453 Modified Files: array.inc.php array_batch.phtml array_common.inc.php arrayslide_list.phtml extract_edit.phtml hyb_edit.phtml item.inc.php links_common.inc.php Log Message: Array made subclass of Item and renamed to ArraySlide Index: array.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/array.inc.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** array.inc.php 1 Oct 2002 21:53:19 -0000 1.40 --- array.inc.php 2 Oct 2002 17:50:56 -0000 1.41 *************** *** 31,35 **** define("CLEN_ARRAYBATCH_NAME", 40); define("CLEN_ARRAYBATCH_SURFACETYPE", 40); ! define("CLEN_ARRAY_BARCODE", 20); class ArrayType extends Item --- 31,35 ---- define("CLEN_ARRAYBATCH_NAME", 40); define("CLEN_ARRAYBATCH_SURFACETYPE", 40); ! define("CLEN_ARRAYSLIDE_NAME", 20); [...733 lines suppressed...] ! "LEFT JOIN UserGroup hug ON hug.id = h.owner ". "WHERE a.batch = ab.id AND ab.`arrayType` = at.id ". ! "AND ug.id = a.owner ". $search->getWhere()." ".$search->getExtraWhere()." ". $ob." ".$search->makeLimit(); *************** *** 886,891 **** return $arr; } - } ?> --- 907,912 ---- return $arr; } } + ?> Index: array_batch.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/array_batch.phtml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** array_batch.phtml 10 Sep 2002 23:04:37 -0000 1.19 --- array_batch.phtml 2 Oct 2002 17:50:56 -0000 1.20 *************** *** 29,133 **** require_once("array_common.inc.php"); require_once("hyb.inc.php"); verifyAccess(BUA_ARRAY_READ); setLocation("array_list.phtml"); - if(!isset($i_bc)) $i_bc = array(); - $err = ""; - $edit = true; [...357 lines suppressed...] <tr><th>Printing protocol</th><td><?= ! protocolIdLink($ab->getProtocol(), $curUser) ?></td></tr> ! <? ! dateAndOwnerTable($ab, $curUser); ! ?> </table> <p> *************** *** 239,243 **** <input type=hidden name=location value="<?= html($location, 0) ?>"> <? ! arrayList($abid); echo "</form>\n"; } --- 232,236 ---- <input type=hidden name=location value="<?= html($location, 0) ?>"> <? ! arrayList($abid, $curUser); echo "</form>\n"; } Index: array_common.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/array_common.inc.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** array_common.inc.php 1 Oct 2002 21:53:19 -0000 1.13 --- array_common.inc.php 2 Oct 2002 17:50:56 -0000 1.14 *************** *** 97,110 **** } ! function arrayList($arrayBatch) { ! global $curUser, $tdbg; ! $userid = $curUser->getId(); ! if(!$arrayBatch) { ! $searchfields = array("Barcode", "Hybridization", "Hyb owner", [...445 lines suppressed...] ! <option <?= $a["destroyed"] ? "selected" : "" ?> value=1>Yes </select></td> ! <td><input type=text size=30 name='i_adescr[<?= $on ?>]' ! value="<?= html($a["descr"], 0) ?>"><?= $e ?></td> </tr> <? ! } ! else ! { ! ?> ! <tr bgcolor=<? $tdbg[$odd] ?>><td><?= $laston ?></td> ! <td class=help>Read access denied</td> ! <td>-</td><td>-</td></tr> ! <? ! } } ?> ! <tr><td colspan=4><input type=submit value='Accept' name=i_ok></td></tr> </table> <? Index: arrayslide_list.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/arrayslide_list.phtml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** arrayslide_list.phtml 5 Aug 2002 11:29:31 -0000 1.4 --- arrayslide_list.phtml 2 Oct 2002 17:50:56 -0000 1.5 *************** *** 39,43 **** </table> <? ! arrayList(0); ?> </form> --- 39,43 ---- </table> <? ! arrayList(0, $curUser); ?> </form> Index: extract_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/extract_edit.phtml,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** extract_edit.phtml 1 Oct 2002 21:53:20 -0000 1.21 --- extract_edit.phtml 2 Oct 2002 17:50:56 -0000 1.22 *************** *** 108,112 **** if($curDb->dupKey()) $err = "There is already an extract with that name"; ! else $err = "Unable to save extract"; } else --- 108,113 ---- if($curDb->dupKey()) $err = "There is already an extract with that name"; ! else ! $err = "Unable to save extract"; } else Index: hyb_edit.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/hyb_edit.phtml,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** hyb_edit.phtml 1 Oct 2002 21:53:20 -0000 1.36 --- hyb_edit.phtml 2 Oct 2002 17:50:56 -0000 1.37 *************** *** 89,92 **** --- 89,97 ---- if(isset($i_array) && $i_array != "" && $err == "") { + $as = new ArraySlide(); + if(!$as->readShared($i_array, $curUser)) + $err = "No such array slide or access denied"; + else if($as->getHybridization()) + $err = "That array slide has already been used"; $ai = ArrayBatch::getArrayId($i_array); if(!$ai) Index: item.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/item.inc.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** item.inc.php 30 Sep 2002 08:26:43 -0000 1.34 --- item.inc.php 2 Oct 2002 17:50:56 -0000 1.35 *************** *** 351,355 **** { error_log("Invalid user in Item::whereShared($table, $user, $write). ". ! "$_SERVER[REQUEST_URI] $_SERVER[QUERY_STRING]"); } if($user->access(BUA_SUPERUSER)) --- 351,355 ---- { error_log("Invalid user in Item::whereShared($table, $user, $write). ". ! "$_SERVER[REQUEST_URI]"); } if($user->access(BUA_SUPERUSER)) Index: links_common.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/links_common.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** links_common.inc.php 30 Sep 2002 16:57:05 -0000 1.2 --- links_common.inc.php 2 Oct 2002 17:50:56 -0000 1.3 *************** *** 75,78 **** --- 75,89 ---- } + function hybridizationArrLink(&$arr) + { + if(!isset($arr["hybridization"])) + return html(""); + if(!$arr["hybRead"]) + return html($arr["hybName"]).remMark($arr["hybRemoved"]); + return "<a ".href("hyb_edit.phtml?i_hyb=". + (int)$arr["hybridization"], 2).">". + html($arr["hybName"])."</a>".remMark($arr["hybRemoved"]); + } + function hybridizationIdLink($id, &$user) { *************** *** 82,85 **** --- 93,134 ---- return html($arr["name"]).remMark($arr["removed"]); return "<a ".href("hyb_edit.phtml?i_hyb=$id", 2).">". + html($arr["name"])."</a>".remMark($arr["removed"]); + } + + function arrayTypeArrLink(&$arr) + { + if(!$arr["designRead"]) + return html($arr["designName"]).remMark($arr["designRemoved"]); + return "<a ".href("array_edit.phtml?i_at=". + (int)$arr["arrayType"], 2).">". + html($arr["designName"])."</a>".remMark($arr["designRemoved"]); + } + + function arrayTypeIdLink($id, &$user) + { + $id = (int)$id; + $arr = ArrayType::getBasicFromId($id); + if(!ArrayType::isSharedId($id, $user)) + return html($arr["name"]).remMark($arr["removed"]); + return "<a ".href("array_edit.phtml?i_at=$id", 2).">". + html($arr["name"])."</a>".remMark($arr["removed"]); + } + + function arrayBatchArrLink(&$arr) + { + if(!$arr["batchRead"]) + return html($arr["batchName"]).remMark($arr["batchRemoved"]); + return "<a ".href("array_batch.phtml?i_ab=". + (int)$arr["batch"], 2).">". + html($arr["batchName"])."</a>".remMark($arr["batchRemoved"]); + } + + function arrayBatchIdLink($id, &$user) + { + $id = (int)$id; + $arr = ArrayBatch::getBasicFromId($id); + if(!ArrayBatch::isSharedId($id, $user)) + return html($arr["name"]).remMark($arr["removed"]); + return "<a ".href("array_batch.phtml?i_ab=$id", 2).">". html($arr["name"])."</a>".remMark($arr["removed"]); } |