summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
Diffstat (limited to 'web/template')
-rw-r--r--web/template/header.php5
-rw-r--r--web/template/pkg_search_results.php3
2 files changed, 5 insertions, 3 deletions
diff --git a/web/template/header.php b/web/template/header.php
index dcf99f31..6bd344b1 100644
--- a/web/template/header.php
+++ b/web/template/header.php
@@ -49,8 +49,9 @@ if (isset($_COOKIE["AURSID"])) {
<li><a href="pkgsubmit.php"><?php print __("Submit"); ?></a></li>
<li><a href="packages.php?SeB=m&K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print __("My Packages"); ?></a></li>
<?php
- if (account_from_sid($_COOKIE["AURSID"]) == "Trusted User"
- || account_from_sid($_COOKIE["AURSID"]) == "Developer") {
+ $SID = $_COOKIE['AURSID'];
+ $atype = account_from_sid($SID);
+ if ($atype == "Trusted User" || $atype == "Developer") {
?>
<li><a href="tu.php"><?php print __("Trusted User"); ?></a></li>
<?php
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index a1cb038e..de77b91c 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -48,6 +48,7 @@ $_GET['K'] = urlencode($_GET['K']);
</tr>
<?php
+$atype = account_from_sid($_COOKIE['AURSID']);
for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
(($i % 2) == 0) ? $c = "data1" : $c = "data2";
if ($row["OutOfDate"]): $c = "outofdate"; endif;
@@ -99,7 +100,7 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
<option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option>
<option value='do_Adopt'><?php print __("Adopt Packages") ?></option>
<option value='do_Disown'><?php print __("Disown Packages") ?></option>
- <?php if (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer"): ?>
+ <?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
<option value='do_Delete'><?php print __("Delete Packages") ?></option>
<?php endif; ?>
<option value='do_Notify'><?php print __("Notify") ?></option>