From e9193a7161affc823477775784007c38fa9600cf Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Wed, 14 Sep 2011 22:53:27 +0200 Subject: fix typo and remove some globals --- includes/pages/user_settings.php | 8 ++++---- includes/sys_user.php | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php index 1b039f0c..aa22b419 100644 --- a/includes/pages/user_settings.php +++ b/includes/pages/user_settings.php @@ -155,10 +155,10 @@ function user_settings() { echo "\n"; } - switch (GetPicturShow($_SESSION['UID'])) { + switch (GetPictureShow($_SESSION['UID'])) { case 'Y' : echo Get_Text('pub_einstellungen_PictureShow') . "
"; - echo displayPictur($_SESSION['UID'], 0); + echo displayPicture($_SESSION['UID'], 0); echo "
\n"; echo "\n"; echo "\n"; @@ -166,7 +166,7 @@ function user_settings() { break; case 'N' : echo Get_Text('pub_einstellungen_PictureNoShow') . "
"; - echo displayPictur($_SESSION['UID'], 0); + echo displayPicture($_SESSION['UID'], 0); echo "\n"; echo "\n"; echo "\n"; @@ -217,7 +217,7 @@ function user_settings() { if (($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/gif")) { $data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"]))); - if (GetPicturShow($_SESSION['UID']) == "") + if (GetPictureShow($_SESSION['UID']) == "") $SQL = "INSERT INTO `UserPicture` " . "( `UID`,`Bild`, `ContentType`, `show`) " . "VALUES ('" . $_SESSION['UID'] . "', '$data', '" . $_FILES["file"]["type"] . "', 'N')"; diff --git a/includes/sys_user.php b/includes/sys_user.php index 8d5a6ae6..c44fbc85 100644 --- a/includes/sys_user.php +++ b/includes/sys_user.php @@ -33,8 +33,6 @@ function TID2Type($TID) { } function ReplaceSmilies($neueckig) { - global $url, $ENGEL_ROOT; - $neueckig = str_replace(";o))", "", $neueckig); $neueckig = str_replace(":-))", "", $neueckig); $neueckig = str_replace(";o)", "", $neueckig); @@ -59,7 +57,7 @@ function ReplaceSmilies($neueckig) { return $neueckig; } -function GetPicturShow($UID) { +function GetPictureShow($UID) { global $con; $SQL = "SELECT `show` FROM `UserPicture` WHERE `UID`='" . sql_escape($UID) . "'"; @@ -71,7 +69,7 @@ function GetPicturShow($UID) { return ""; } -function displayPictur($UID, $height = "30") { +function displayPicture($UID, $height = "30") { global $url, $ENGEL_ROOT; if ($height > 0) @@ -83,8 +81,8 @@ function displayPictur($UID, $height = "30") { function displayavatar($UID, $height = "30") { global $con, $url, $ENGEL_ROOT; - if (GetPicturShow($UID) == 'Y') - return " " . displayPictur($UID, $height); + if (GetPictureShow($UID) == 'Y') + return " " . displayPicture($UID, $height); $user = sql_select("SELECT * FROM `User` WHERE `UID`=" . sql_escape($UID) . " LIMIT 1"); if (count($user) > 0) -- cgit v1.2.3-54-g00ecf