aboutsummaryrefslogtreecommitdiff
path: root/php/cfg
diff options
context:
space:
mode:
Diffstat (limited to 'php/cfg')
-rw-r--r--php/cfg/admin_init.php5
-rw-r--r--php/cfg/init.php4
2 files changed, 3 insertions, 6 deletions
diff --git a/php/cfg/admin_init.php b/php/cfg/admin_init.php
index 7d22ab3..68f3063 100644
--- a/php/cfg/admin_init.php
+++ b/php/cfg/admin_init.php
@@ -6,10 +6,9 @@
*/
require_once(LIB.'/auth.php'); // auth functions
require_once(LIB.'/forms.php'); // form library
-require_once(LIB.'/list.php'); // list library
-if (!auth_is_valid_session()) {
+if (!Auth::is_valid_session()) {
header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/login.php');
exit;
}
-?>
+
diff --git a/php/cfg/init.php b/php/cfg/init.php
index 4eb6ed0..3e8f6fb 100644
--- a/php/cfg/init.php
+++ b/php/cfg/init.php
@@ -10,9 +10,7 @@ require_once(LIB.'/csv.php'); // util file for random functions (no SQL here)
$start = microtime_float(); // start timer
require_once(LIB.'/mirror.php'); // user and admin functions for the mirror app (some SQL)
require_once(LIB.'/db.php'); // core mysql wrappers used in mirror functions
-db_connect(DBHOST,DBUSER,DBPASS); // open persistent connection to db
-db_select(DBNAME); // select db
+DB::connect(DBHOST,DBUSER,DBPASS,DBNAME); // open persistent connection to db
if (!empty($protect)) {
require_once('admin_init.php');
}
-?>