aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-05-01 19:10:09 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-05-01 19:10:09 +0000
commitb5743048e73c512e5b911bc25c4007d7793a1e49 (patch)
tree9ffea0647839e48e247ee8c15bfaaa4ad42754b0 /phpBB/includes/functions.php
parent76453deb61ce8a5b535995f9eeccb087f00879df (diff)
downloadforums-b5743048e73c512e5b911bc25c4007d7793a1e49.tar
forums-b5743048e73c512e5b911bc25c4007d7793a1e49.tar.gz
forums-b5743048e73c512e5b911bc25c4007d7793a1e49.tar.bz2
forums-b5743048e73c512e5b911bc25c4007d7793a1e49.tar.xz
forums-b5743048e73c512e5b911bc25c4007d7793a1e49.zip
Fixed a pile of Windows carriage returns
git-svn-id: file:///svn/phpbb/trunk@222 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php35
1 files changed, 14 insertions, 21 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 190cd75180..3846c8d1d5 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -188,10 +188,9 @@ function language_select($default, $name="language", $dirname="language/")
function theme_select($default)
{
global $db;
-
- $sql = "SELECT themes_id, themes_name
- FROM ".THEMES_TABLE."
- ORDER BY themes_name";
+ $sql = "SELECT themes_id, themes_name
+ FROM ".THEMES_TABLE."
+ ORDER BY themes_name";
if($result = $db->sql_query($sql))
{
$num = $db->sql_numrows($result);
@@ -207,7 +206,7 @@ function theme_select($default)
{
$selected = "";
}
- $theme_select .= "\t<optio value=\"".$rowset[$i]['themes_id']."\"$selected>".stripslashes($rowset[$i]['themes_name'])."</option>\n";
+ $theme_select .= "\t<option value=\"".$rowset[$i]['themes_id']."\"$selected>".stripslashes($rowset[$i]['themes_name'])."</option>\n";
}
$theme_select .= "</select>\n";
}
@@ -217,24 +216,20 @@ function theme_select($default)
}
return($theme_select);
}
-
//
// Initialise user settings on page load
-//
function init_userprefs($userdata)
{
-
global $override_user_theme, $template, $sys_template;
global $default_lang, $default_theme, $date_format, $sys_timezone;
global $theme;
-
if(!$override_user_themes)
{
if($userdata['user_id'] != ANONYMOUS || $userdata['user_id'] != DELETED)
{
$theme = setuptheme($userdata['user_theme']);
}
- else
+ else
{
$theme = setuptheme($default_theme);
}
@@ -255,7 +250,6 @@ function init_userprefs($userdata)
{
$sys_timezone = $userdata['user_timezone'];
}
-
// Setup user's Template
if($userdata['user_template'] != '')
{
@@ -265,7 +259,7 @@ function init_userprefs($userdata)
{
$template = new Template("templates/".$sys_template);
}
-
+
// Include the appropriate language file ... if it exists.
if(!strstr($PHP_SELF, "admin"))
{
@@ -285,23 +279,22 @@ function init_userprefs($userdata)
include('../language/lang_'.$default_lang.'.'.$phpEx);
}
}
-
return;
-
}
+
function setuptheme($theme)
{
global $db;
-
- $sql = "SELECT *
- FROM ".THEMES_TABLE."
- WHERE themes_id = '$theme'";
-
+ $sql = "SELECT * FROM ".THEMES_TABLE." WHERE themes_id = '$theme'";
+
if(!$result = $db->sql_query($sql))
+ {
return(0);
+ }
if(!$myrow = $db->sql_fetchrow($result))
+ {
return(0);
-
+ }
return($myrow);
}
@@ -442,4 +435,4 @@ function create_date($format, $gmepoch, $tz)
{
return (gmdate($format, $gmepoch + (3600 * $tz)));
}
-?> \ No newline at end of file
+?>