* fix glob error.
This commit is contained in:
@@ -43,18 +43,22 @@ class backup extends control
|
||||
$backups = array();
|
||||
if(empty($this->view->error))
|
||||
{
|
||||
foreach(glob("{$this->backupPath}*.sql.php") as $file)
|
||||
$sqlFiles = glob("{$this->backupPath}*.sql.php");
|
||||
if(!empty($sqlFiles))
|
||||
{
|
||||
$backupFile = new stdclass();
|
||||
$backupFile->time = filemtime($file);
|
||||
$backupFile->name = str_replace('.sql.php', '', basename($file));
|
||||
$backupFile->files[$file] = filesize($file);
|
||||
if(file_exists($this->backupPath . $backupFile->name . '.file.zip.php'))
|
||||
foreach($sqlFiles as $file)
|
||||
{
|
||||
$backupFile->files[$this->backupPath . $backupFile->name . '.file.zip.php'] = filesize($this->backupPath . $backupFile->name . '.file.zip.php');
|
||||
}
|
||||
$backupFile = new stdclass();
|
||||
$backupFile->time = filemtime($file);
|
||||
$backupFile->name = str_replace('.sql.php', '', basename($file));
|
||||
$backupFile->files[$file] = filesize($file);
|
||||
if(file_exists($this->backupPath . $backupFile->name . '.file.zip.php'))
|
||||
{
|
||||
$backupFile->files[$this->backupPath . $backupFile->name . '.file.zip.php'] = filesize($this->backupPath . $backupFile->name . '.file.zip.php');
|
||||
}
|
||||
|
||||
$backups[$backupFile->name] = $backupFile;
|
||||
$backups[$backupFile->name] = $backupFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
krsort($backups);
|
||||
|
||||
@@ -60,7 +60,11 @@ class editorModel extends model
|
||||
elseif(is_dir($moduleFullFile))
|
||||
{
|
||||
$ext = ($moduleFile == 'js' or $moduleFile == 'css') ? $moduleFile : 'php';
|
||||
foreach(glob($moduleFullFile . $this->pathFix . "*.$ext") as $fileName) $allModules[$moduleFullDir][$moduleFullFile][$fileName] = basename($fileName);
|
||||
$extFiles = glob($moduleFullFile . $this->pathFix . "*.$ext");
|
||||
if(!empty($extFiles))
|
||||
{
|
||||
foreach($extFiles as $fileName) $allModules[$moduleFullDir][$moduleFullFile][$fileName] = basename($fileName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -87,5 +87,10 @@
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType == 'bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
|
||||
<?php foreach(glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php") as $fileName) include_once $fileName; ?>
|
||||
<?php
|
||||
$headerHooks = glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php");
|
||||
if(!empty($headerHooks))
|
||||
{
|
||||
foreach($headerHooks as $fileName) helper::import($fileName);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
<?php
|
||||
$headerHooks = glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php");
|
||||
if(is_array($headerHooks))
|
||||
if(!empty($headerHooks))
|
||||
{
|
||||
foreach($headerHooks as $fileName) helper::import($fileName);
|
||||
}
|
||||
|
||||
@@ -39,5 +39,10 @@
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
|
||||
<?php foreach(glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php") as $fileName) include_once $fileName; ?>
|
||||
<?php
|
||||
$headerHooks = glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php");
|
||||
if(!empty($headerHooks))
|
||||
{
|
||||
foreach($headerHooks as $fileName) helper::import($fileName);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user