Use is_dir instead of check for the length of the stirng.

This commit is contained in:
markjcrane 2016-04-03 09:36:27 -06:00
parent 9217b599ed
commit 7b1a596d6f
2 changed files with 4 additions and 6 deletions

View File

@ -26,11 +26,9 @@
//process this only one time
if ($domains_processed == 1) {
if (isset($_SESSION['switch']['scripts']['dir'])) {
$obj = new scripts;
$obj->copy_files();
$obj->write_config();
}
$obj = new scripts;
$obj->copy_files();
$obj->write_config();
}
?>

View File

@ -99,7 +99,7 @@ class scripts {
* Writes the config.lua
*/
public function write_config() {
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
if (is_dir($_SESSION['switch']['scripts']['dir'])) {
//define the global variables
global $db;