mirror of
https://github.com/jimeh/dlist.git
synced 2026-02-19 07:56:41 +00:00
- updated configuration file.
- edited init script so it will only look for specific file names. "index.html", "index.php", so on, instead of running glob() on "index.*". - moved internal timer to seperate exec file. git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@7 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
/*
|
||||
|
||||
dList Intialization
|
||||
|
||||
Copyright © 2006 Jim Myhrberg. All rights reserved.
|
||||
zynode@gmail.com
|
||||
|
||||
@@ -28,8 +30,10 @@ if(!preg_match("/\/$/", $dir_url)) $redirect = '/';
|
||||
// check for index files and redirect if found
|
||||
if ( empty($redirect) ) {
|
||||
foreach($config['index_files'] as $what) {
|
||||
$indexsearch = glob($dir_path.$what.'.*');
|
||||
if(isset($indexsearch[0])) { $redirect = basename($indexsearch[0]); break; }
|
||||
if ( file_exists($dir_path.$what) ) {
|
||||
$redirect = basename($what);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !empty($redirect) ) {
|
||||
|
||||
Reference in New Issue
Block a user