2012-06-02 21:18:29 +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');
|
|
|
|
|
|
|
|
jimport('joomla.application.component.view');
|
|
|
|
|
2012-06-09 13:34:32 +00:00
|
|
|
class jedcheckerViewUploads extends JView
|
|
|
|
{
|
2012-06-02 21:18:29 +00:00
|
|
|
|
2012-06-09 13:34:32 +00:00
|
|
|
public function display($tpl = null)
|
|
|
|
{
|
2012-06-02 21:18:29 +00:00
|
|
|
$this->setToolbar();
|
2012-06-09 13:34:32 +00:00
|
|
|
$this->jsOptions['url'] = JURI::base();
|
|
|
|
$this->jsOptions['rules'] = $this->getRules();
|
2012-06-02 21:18:29 +00:00
|
|
|
parent::display($tpl);
|
|
|
|
}
|
|
|
|
|
2012-06-09 13:34:32 +00:00
|
|
|
public function getRules()
|
|
|
|
{
|
|
|
|
$exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'index.html');
|
|
|
|
$files = JFolder::files(JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules', '.', false, false, $exclude);
|
|
|
|
foreach ($files as $file) {
|
|
|
|
$rules[] = str_replace('.php', '', $file);
|
|
|
|
}
|
|
|
|
return $rules;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setToolbar()
|
|
|
|
{
|
2012-06-02 21:18:29 +00:00
|
|
|
JToolBarHelper::custom('uploads.unzip', 'unzip', 'unzip', 'unzip', false);
|
2012-06-02 22:38:07 +00:00
|
|
|
JToolBarHelper::custom('police.check', 'police-check', 'police-check', 'check', false);
|
2012-06-23 14:12:44 +00:00
|
|
|
JToolBarHelper::title('JED checker');
|
2012-06-02 21:18:29 +00:00
|
|
|
}
|
|
|
|
}
|