From 9d5d61fbc76a711d2accce43ea5c293bd256b2a9 Mon Sep 17 00:00:00 2001 From: Jonathan Ernst Date: Fri, 10 Dec 2004 01:11:40 +0000 Subject: [PATCH] - access most globals by their $_XYZ['varname'] name - fix some code errors and typos (missing $ in front of variable names and so on) - fixed a lot of warnings that would have been thrown when error_reporting is set to show notices (if(isset($variable))) instead of if($variable) for example) --- admin/editAppFamily.php | 2 +- admin/editAppNote.php | 4 ++-- admin/editAppVersion.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/editAppFamily.php b/admin/editAppFamily.php index d46aa62..6784bd3 100644 --- a/admin/editAppFamily.php +++ b/admin/editAppFamily.php @@ -8,7 +8,7 @@ include(BASE."include/"."qclass.php"); global $apidb_root; -if(!loggedin() || (!havepriv("admin") && !$current->ownsApp($appId)) ) +if(!loggedin() || (!havepriv("admin") && !$_SESSION['current']->ownsApp($appId)) ) { errorpage("Insufficient Privileges!"); exit; diff --git a/admin/editAppNote.php b/admin/editAppNote.php index 48b509c..c098248 100644 --- a/admin/editAppNote.php +++ b/admin/editAppNote.php @@ -53,7 +53,7 @@ if($sub) $fullAppName = "Application: ".lookupAppName($appId)." Version: ".lookupVersionName($appId, $versionId); $ms = APPDB_ROOT."appview.php?appId=$appId&versionId=$versionId"."\n"; $ms .= "\n"; - $ms .= ($current->username ? $current->username : "Anonymous")." deleted note from ".$fullAppName."\n"; + $ms .= ($_SESSION['current']->username ? $_SESSION['current']->username : "Anonymous")." deleted note from ".$fullAppName."\n"; $ms .= "\n"; $ms .= "title: ".$oldNoteTitle."\n"; $ms .= "\n"; @@ -92,7 +92,7 @@ if($sub) $fullAppName = "Application: ".lookupAppName($appId)." Version: ".lookupVersionName($appId, $versionId); $ms = APPDB_ROOT."appview.php?appId=$appId&versionId=$versionId"."\n"; $ms .= "\n"; - $ms .= ($current->username ? $current->username : "Anonymous")." changed note for ".$fullAppName."\n"; + $ms .= ($_SESSION['current']->username ? $_SESSION['current']->username : "Anonymous")." changed note for ".$fullAppName."\n"; $ms .= "\n"; $ms .= "From --------------------------\n"; $ms .= "title: ".$oldNoteTitle."\n"; diff --git a/admin/editAppVersion.php b/admin/editAppVersion.php index 0111d38..6022fe5 100644 --- a/admin/editAppVersion.php +++ b/admin/editAppVersion.php @@ -81,7 +81,7 @@ if($HTTP_POST_VARS) $fullAppName = "Application: ".lookupAppName($appId)." Version: ".lookupVersionName($appId, $versionId); $ms .= APPDB_ROOT."appview.php?appId=$appId&versionId=$versionId"."\n"; $ms .= "\n"; - $ms .= ($current->username ? $current->username : "Anonymous")." changed ".$fullAppName."\n"; + $ms .= ($_SESSION['current']->username ? $_SESSION['current']->username : "Anonymous")." changed ".$fullAppName."\n"; $ms .= "\n"; $ms .= $WhatChanged."\n"; $ms .= "\n";