mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-24 05:37:38 +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
|
// 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)) {
|
if (JFile::exists($local)) {
|
||||||
$content = JFile::read($local);
|
$content = JFile::read($local);
|
||||||
if (!empty($content)) {
|
if (!empty($content)) {
|
||||||
|
@ -42,7 +42,7 @@ class jedcheckerViewUploads extends JViewLegacy
|
|||||||
JToolBarHelper::custom('uploads.unzip', 'unzip', 'unzip', 'unzip', false);
|
JToolBarHelper::custom('uploads.unzip', 'unzip', 'unzip', 'unzip', false);
|
||||||
}
|
}
|
||||||
if($this->filesExist('unzipped')) {
|
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');
|
JToolBarHelper::title('JED checker');
|
||||||
@ -53,13 +53,22 @@ class jedcheckerViewUploads extends JViewLegacy
|
|||||||
* @param $type
|
* @param $type
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function filesExist($type) {
|
private function filesExist($type)
|
||||||
|
{
|
||||||
$path = JFactory::getConfig()->get('tmp_path') . '/jed_checker/'.$type;
|
$path = JFactory::getConfig()->get('tmp_path') . '/jed_checker/'.$type;
|
||||||
|
|
||||||
|
// Check for the existence of files
|
||||||
jimport('joomla.filesystem.folder');
|
jimport('joomla.filesystem.folder');
|
||||||
if(JFolder::exists($path)) {
|
if(JFolder::exists($path)) {
|
||||||
if(JFolder::folders($path, '.', false) || JFolder::files($path, '.', false)) {
|
if(JFolder::folders($path, '.', false) || JFolder::files($path, '.', false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$local = JFactory::getConfig()->get('tmp_path') . '/jed_checker/local.txt';
|
||||||
|
if ($type == 'unzipped' && JFile::exists($local)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user