summaryrefslogtreecommitdiffstats
path: root/web/template/header.php
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-12-29 22:36:06 -0600
committerLoui Chang <louipc.ist@gmail.com>2009-01-04 14:09:53 -0500
commit8f97330100af0baa89e635046bc97554782ec571 (patch)
tree733f27f5072e6dae661d2bf31fb9051d17ea088a /web/template/header.php
parentbf4fe7f47c7ee110ec67803c77eb95870cde7c60 (diff)
downloadaurweb-8f97330100af0baa89e635046bc97554782ec571.tar.xz
Store account type in local var when possible
No need to call this function way too often, especially when on the package list page where it could be called up to once per row. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/template/header.php')
-rw-r--r--web/template/header.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/template/header.php b/web/template/header.php
index dcf99f3..6bd344b 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