mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-23 21:27:35 +00:00
Implemented tmp/jed_checker/local.txt file
This commit is contained in:
parent
cc1a81c387
commit
e10f996500
@ -78,7 +78,7 @@ class jedcheckerControllerPolice extends JControllerlegacy
|
||||
}
|
||||
|
||||
// Parse the local.txt file and parse it
|
||||
$local = JFactory::getConfig()->get('tmp_path') . '/com_jedchecker/local.txt';
|
||||
$local = JFactory::getConfig()->get('tmp_path') . '/jed_checker/local.txt';
|
||||
if (JFile::exists($local)) {
|
||||
$content = JFile::read($local);
|
||||
if (!empty($content)) {
|
||||
|
@ -42,7 +42,7 @@ class jedcheckerViewUploads extends JViewLegacy
|
||||
JToolBarHelper::custom('uploads.unzip', 'unzip', 'unzip', 'unzip', false);
|
||||
}
|
||||
if($this->filesExist('unzipped')) {
|
||||
JToolBarHelper::custom('police.check', 'police-check', 'police-check', 'check', false);
|
||||
JToolBarHelper::custom('police.check', 'police-check', 'police-check', 'Check', false);
|
||||
}
|
||||
|
||||
JToolBarHelper::title('JED checker');
|
||||
@ -53,14 +53,23 @@ class jedcheckerViewUploads extends JViewLegacy
|
||||
* @param $type
|
||||
* @return bool
|
||||
*/
|
||||
private function filesExist($type) {
|
||||
private function filesExist($type)
|
||||
{
|
||||
$path = JFactory::getConfig()->get('tmp_path') . '/jed_checker/'.$type;
|
||||
|
||||
// Check for the existence of files
|
||||
jimport('joomla.filesystem.folder');
|
||||
if(JFolder::exists($path)) {
|
||||
if(JFolder::folders($path, '.', false) || JFolder::files($path, '.', false)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} else {
|
||||
$local = JFactory::getConfig()->get('tmp_path') . '/jed_checker/local.txt';
|
||||
if ($type == 'unzipped' && JFile::exists($local)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user