2012-06-02 22:38:07 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @author Daniel Dimitrov - compojoom.com
|
|
|
|
* @date: 02.06.12
|
|
|
|
*
|
|
|
|
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE
|
|
|
|
*/
|
|
|
|
|
|
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
|
|
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
|
|
|
|
jimport('joomla.filesystem');
|
|
|
|
jimport('joomla.filesystem.archive');
|
|
|
|
|
|
|
|
class jedcheckerControllerPolice extends JController {
|
|
|
|
public function check() {
|
2012-06-09 13:34:32 +00:00
|
|
|
$rule = JRequest::getString('rule');
|
|
|
|
JLoader::discover('jedcheckerRules',JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/');
|
|
|
|
// require_once JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/'.$rule.'.php';
|
2012-06-09 12:51:17 +00:00
|
|
|
$path = JFactory::getConfig()->get('tmp_path') . '/jed_checker/unzipped';
|
2012-06-09 13:34:32 +00:00
|
|
|
$class = 'jedcheckerRules'.ucfirst($rule);
|
|
|
|
$police = new $class;
|
2012-06-02 22:38:07 +00:00
|
|
|
|
2012-06-09 13:34:32 +00:00
|
|
|
$folders = JFolder::folders($path);
|
2012-06-09 12:51:17 +00:00
|
|
|
$police->check($path.'/'.$folders[0]);
|
2012-06-02 22:38:07 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|