summaryrefslogtreecommitdiffstats
path: root/lib/init.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-04 08:15:40 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-04 08:15:40 +0000
commitb315ff2d260209c2d99ee056ed974585caf9f6cf (patch)
tree4c3e13f84b5b6cce764fb587c7a245c02b50a3b3 /lib/init.php
parent2169a44d52a35ed05ca098235247dde078bd223d (diff)
downloadampache-b315ff2d260209c2d99ee056ed974585caf9f6cf.tar.gz
ampache-b315ff2d260209c2d99ee056ed974585caf9f6cf.tar.bz2
ampache-b315ff2d260209c2d99ee056ed974585caf9f6cf.zip
some minror tweaks
Diffstat (limited to 'lib/init.php')
-rw-r--r--lib/init.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/init.php b/lib/init.php
index 5458ce43..154ad5f7 100644
--- a/lib/init.php
+++ b/lib/init.php
@@ -5,9 +5,8 @@
All rights reserved.
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License v2
+ as published by the Free Software Foundation
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,12 +19,9 @@
*/
-/*!
- @header INIT file
- Take care of our init grunt work so we don't scatter paths
- all over the place.
-
-*/
+/***
+ * DO NOT EDIT THIS FILE
+ ***/
// Set the Error level manualy... I'm to lazy to fix notices
error_reporting(E_ALL ^ E_NOTICE);
@@ -37,8 +33,6 @@ $prefix = realpath($ampache_path . "/../");
$configfile = "$prefix/config/ampache.cfg.php";
require_once($prefix . "/lib/general.lib.php");
-/*********************STOP EDITING*********************************/
-
/*
Check to see if this is Http or https
*/
@@ -73,7 +67,7 @@ if (!$results = read_config($configfile,0)) {
}
/** This is the version.... fluf nothing more... **/
-$results['version'] = '3.3.3-Alpha2 Build (002)';
+$results['version'] = '3.3.3-Alpha2 Build (003)';
$results['raw_web_path'] = $results['web_path'];
$results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path'];
@@ -257,8 +251,16 @@ if (in_array("http",$results['auth_methods'])) {
// If we don't want a session
if (!isset($no_session) AND conf('use_auth')) {
- if (!vauth_check_session()) { logout(); exit(); }
+ /* Verify Their session */
+ if (!vauth_check_session()) { logout(); exit; }
+
+ /* Create the new user */
$user = new User($_SESSION['userdata']['username']);
+
+ /* If they user ID doesn't exist deny them */
+ if (!$user->uid) { logout(); exit; }
+
+ /* Load preferences and theme */
init_preferences();
set_theme();
$user->set_preferences();