Commit 80401c6a authored by Dan McGee's avatar Dan McGee Committed by Lukas Fleischer
Browse files

More PHP Notice undefined fixups


Signed-off-by: default avatarDan McGee <dan@archlinux.org>
Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 29b2f3b3
...@@ -88,7 +88,11 @@ if (isset($_GET['ID'])) { ...@@ -88,7 +88,11 @@ if (isset($_GET['ID'])) {
$_GET['SB'] = 'v'; $_GET['SB'] = 'v';
$_GET['SO'] = 'd'; $_GET['SO'] = 'd';
} }
pkg_search_page($_COOKIE["AURSID"]); if (isset($_COOKIE["AURSID"])) {
pkg_search_page($_COOKIE["AURSID"]);
} else {
pkg_search_page();
}
} }
html_footer(AUR_VERSION); html_footer(AUR_VERSION);
......
...@@ -663,7 +663,8 @@ function try_login() { ...@@ -663,7 +663,8 @@ function try_login() {
if ($logged_in) { if ($logged_in) {
# set our SID cookie # set our SID cookie
if ($_POST['remember_me'] == "on") { if (isset($_POST['remember_me']) &&
$_POST['remember_me'] == "on") {
# Set cookies for 30 days. # Set cookies for 30 days.
$cookie_time = time() + $PERSISTENT_COOKIE_TIMEOUT; $cookie_time = time() + $PERSISTENT_COOKIE_TIMEOUT;
......
...@@ -43,7 +43,11 @@ ...@@ -43,7 +43,11 @@
</tr> </tr>
<?php <?php
$atype = account_from_sid($_COOKIE['AURSID']); if (isset($_COOKIE['AURSID'])) {
$atype = account_from_sid($_COOKIE['AURSID']);
} else {
$atype = "";
}
for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
(($i % 2) == 0) ? $c = "data1" : $c = "data2"; (($i % 2) == 0) ? $c = "data1" : $c = "data2";
if ($row["OutOfDateTS"] !== NULL): $c = "outofdate"; endif; if ($row["OutOfDateTS"] !== NULL): $c = "outofdate"; endif;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment