Use is_dir instead of check for the length of the stirng.
This commit is contained in:
@@ -26,11 +26,9 @@
|
|||||||
|
|
||||||
//process this only one time
|
//process this only one time
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
if (isset($_SESSION['switch']['scripts']['dir'])) {
|
$obj = new scripts;
|
||||||
$obj = new scripts;
|
$obj->copy_files();
|
||||||
$obj->copy_files();
|
$obj->write_config();
|
||||||
$obj->write_config();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -99,7 +99,7 @@ class scripts {
|
|||||||
* Writes the config.lua
|
* Writes the config.lua
|
||||||
*/
|
*/
|
||||||
public function write_config() {
|
public function write_config() {
|
||||||
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
|
if (is_dir($_SESSION['switch']['scripts']['dir'])) {
|
||||||
|
|
||||||
//define the global variables
|
//define the global variables
|
||||||
global $db;
|
global $db;
|
||||||
|
|||||||
Reference in New Issue
Block a user