Update of /cvsroot/basedb/basedb/www
In directory sc8-pr-cvs1:/tmp/cvs-serv20384/www
Modified Files:
gene_explore.phtml hyb_edit.phtml hyb_list.phtml
labeled_list.phtml left.phtml raw_edit.phtml
trans_create.phtml
Log Message:
Fixed problems that were found while running as non-superuser
Index: gene_explore.phtml
===================================================================
RCS file: /cvsroot/basedb/basedb/www/gene_explore.phtml,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** gene_explore.phtml 13 Feb 2003 22:29:37 -0000 1.73
--- gene_explore.phtml 15 Feb 2003 11:29:07 -0000 1.74
***************
*** 178,182 ****
$searchtypes = BioAssaySet::geneSearchTypes();
$rlmessage = "";
! if(isset($i_replistname) && $i_replistname != "")
{
// Get search
--- 178,183 ----
$searchtypes = BioAssaySet::geneSearchTypes();
$rlmessage = "";
! if(isset($i_replistname) && $i_replistname != "" &&
! $exp->mayEdit($curUser))
{
// Get search
***************
*** 225,228 ****
--- 226,234 ----
$BC->endTransaction();
}
+ else if(isset($i_replistname) && $i_replistname != "")
+ {
+ $rlmessage = "<span class=red>Write access to ".
+ "experiment denied</span>";
+ }
$search = makeSearchTable($curUser, "gene", "BioAssaySet",
***************
*** 234,248 ****
$curDisplay->getHitsPerPage(), true);
?>
<p><table <?= $cellpad ?>>
! <tr><td><input type=button onclick="setGene(1)" value="Explore">
! <span class=help>or click a gene name.</span>
! <input type=button onclick="exportData(this.form)" value="Export data">
! <input type=button onclick="doTrans(this.form,1)"
! value="Filter data">
! <input type=button onclick="doTrans(this.form,0)"
! value="Send to application">
! <input type=button onclick="makeReporterList(this.form)"
! value="Add as reporter list"></td></tr>
<?
if($rlmessage != "")
--- 240,262 ----
$curDisplay->getHitsPerPage(), true);
+ $funcs = array("<input type=button onclick='setGene(1)' ".
+ "value='Explore'> <span class=help>or click a gene ".
+ "name.</span>",
+ "<input type=button onclick='exportData(this.form)' ".
+ "value='Export data'>");
+ if($exp->mayEdit($curUser))
+ {
+ $funcs[] = "<input type=button onclick='doTrans(this.form,1)' ".
+ "value='Filter data'>";
+ $funcs[] = "<input type=button onclick='doTrans(this.form,0)' ".
+ "value='Send to application'>";
+ $funcs[] = "<input type=button ".
+ "onclick='makeReporterList(this.form)' ".
+ "value='Add as reporter list'>";
+ }
+
?>
<p><table <?= $cellpad ?>>
! <tr><td><?= implode(" \n", $funcs) ?></td></tr>
<?
if($rlmessage != "")
Index: hyb_edit.phtml
===================================================================
RCS file: /cvsroot/basedb/basedb/www/hyb_edit.phtml,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** hyb_edit.phtml 13 Feb 2003 22:29:37 -0000 1.54
--- hyb_edit.phtml 15 Feb 2003 11:29:07 -0000 1.55
***************
*** 25,28 ****
--- 25,29 ----
require_once("protocol.inc.php");
require_once("labeled.inc.php");
+ require_once("label.inc.php");
require_once("hyb.inc.php");
require_once("array.inc.php");
Index: hyb_list.phtml
===================================================================
RCS file: /cvsroot/basedb/basedb/www/hyb_list.phtml,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** hyb_list.phtml 22 Jan 2003 08:02:05 -0000 1.27
--- hyb_list.phtml 15 Feb 2003 11:29:07 -0000 1.28
***************
*** 25,28 ****
--- 25,29 ----
require_once("protocol.inc.php");
require_once("labeled.inc.php");
+ require_once("label.inc.php");
require_once("hyb.inc.php");
require_once("search.inc.php");
Index: labeled_list.phtml
===================================================================
RCS file: /cvsroot/basedb/basedb/www/labeled_list.phtml,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** labeled_list.phtml 22 Jan 2003 08:02:09 -0000 1.26
--- labeled_list.phtml 15 Feb 2003 11:29:07 -0000 1.27
***************
*** 26,29 ****
--- 26,30 ----
require_once("protocol.inc.php");
require_once("labeled.inc.php");
+ require_once("label.inc.php");
require_once("hyb.inc.php");
require_once("search.inc.php");
Index: left.phtml
===================================================================
RCS file: /cvsroot/basedb/basedb/www/left.phtml,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** left.phtml 13 Feb 2003 08:47:48 -0000 1.68
--- left.phtml 15 Feb 2003 11:29:08 -0000 1.69
***************
*** 270,281 ****
"</td></tr>\n";
! $acclink = "user_edit.phtml?i_u=".$curUser->getId()."&location=";
if(!acc(BUA_USER_READ)) {}
else if($l == "users")
{
echo "<tr><th class=subheadact><a target=_top ".
! "href='index.phtml?l=users&m=".urlencode($acclink)."'>".
"Users</a></td></tr>\n";
echo "<tr><td><a target=main href='$acclink'>".
"My account</a></td></tr>\n";
--- 270,287 ----
"</td></tr>\n";
! // By default show user list to admins, account to others
! if(acc(BUA_ADMIN_USER))
! $ulink = "user_list.phtml";
! else
! $ulink = "user_edit.phtml?i_u=".$curUser->getId()."&location=";
!
if(!acc(BUA_USER_READ)) {}
else if($l == "users")
{
echo "<tr><th class=subheadact><a target=_top ".
! "href='index.phtml?l=users&m=".urlencode($ulink)."'>".
"Users</a></td></tr>\n";
+ $acclink = "user_edit.phtml?i_u=".$curUser->getId()."&location=";
echo "<tr><td><a target=main href='$acclink'>".
"My account</a></td></tr>\n";
***************
*** 288,292 ****
{
echo "<tr><th class=subhead><a target=_top href='index.phtml".
! "?l=users&m=".urlencode($acclink)."'>Users</a></td></tr>\n";
}
--- 294,298 ----
{
echo "<tr><th class=subhead><a target=_top href='index.phtml".
! "?l=users&m=".urlencode($ulink)."'>Users</a></td></tr>\n";
}
Index: raw_edit.phtml
===================================================================
RCS file: /cvsroot/basedb/basedb/www/raw_edit.phtml,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** raw_edit.phtml 25 Jan 2003 00:46:52 -0000 1.34
--- raw_edit.phtml 15 Feb 2003 11:29:08 -0000 1.35
***************
*** 303,307 ****
{
echo "<tr><th>Image set</th>".
! "<td>".imageAcquisitionArrLink($ainfo)."</td></tr>\n";
}
}
--- 303,308 ----
{
echo "<tr><th>Image set</th>".
! "<td>".imageAcquisitionArrLink($ainfo, $curUser).
! "</td></tr>\n";
}
}
Index: trans_create.phtml
===================================================================
RCS file: /cvsroot/basedb/basedb/www/trans_create.phtml,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** trans_create.phtml 10 Feb 2003 08:40:49 -0000 1.45
--- trans_create.phtml 15 Feb 2003 11:29:08 -0000 1.46
***************
*** 71,75 ****
?>
<table <?= $cellpad ?>>
! <tr><th class=pagehead><?= $pageName ?></th></tr>
<tr><td class=large><a href="<?= html($location) ?>">Return</a></td></tr>
<tr><td class=red>Error: <?= $err ?></td></tr>
--- 71,75 ----
?>
<table <?= $cellpad ?>>
! <tr><th class=pagehead>Transformation error</th></tr>
<tr><td class=large><a href="<?= html($location) ?>">Return</a></td></tr>
<tr><td class=red>Error: <?= $err ?></td></tr>
|