summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorJan-Philipp Litza <janphilipp@litza.de>2011-09-14 22:53:27 +0200
committerJan-Philipp Litza <janphilipp@litza.de>2011-09-14 22:53:27 +0200
commite9193a7161affc823477775784007c38fa9600cf (patch)
treea4e6b012db55f964fb2c89b1e141dba138db2d0a /includes
parent1342dc49cf1789f9d54cb3c7be327c68f403a0f7 (diff)
fix typo and remove some globals
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/user_settings.php8
-rw-r--r--includes/sys_user.php10
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 "</form>\n";
}
- switch (GetPicturShow($_SESSION['UID'])) {
+ switch (GetPictureShow($_SESSION['UID'])) {
case 'Y' :
echo Get_Text('pub_einstellungen_PictureShow') . "<br />";
- echo displayPictur($_SESSION['UID'], 0);
+ echo displayPicture($_SESSION['UID'], 0);
echo "<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"delPicture\">\n";
echo "<input type=\"submit\" value=\"" . Get_Text("delete"), "\">\n";
@@ -166,7 +166,7 @@ function user_settings() {
break;
case 'N' :
echo Get_Text('pub_einstellungen_PictureNoShow') . "<br />";
- echo displayPictur($_SESSION['UID'], 0);
+ echo displayPicture($_SESSION['UID'], 0);
echo "<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"delPicture\">\n";
echo "<input type=\"submit\" value=\"" . Get_Text("delete"), "\">\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))", "<img src=\"pic/smiles/icon_redface.gif\">", $neueckig);
$neueckig = str_replace(":-))", "<img src=\"pic/smiles/icon_redface.gif\">", $neueckig);
$neueckig = str_replace(";o)", "<img src=\"pic/smiles/icon_wind.gif\">", $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 "&nbsp;" . displayPictur($UID, $height);
+ if (GetPictureShow($UID) == 'Y')
+ return "&nbsp;" . displayPicture($UID, $height);
$user = sql_select("SELECT * FROM `User` WHERE `UID`=" . sql_escape($UID) . " LIMIT 1");
if (count($user) > 0)