33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-11-02 03:32:38 +00:00
jedchecker/source/administrator/components/com_jedchecker/views/uploads/view.html.php
Daniel Dimitrov 7dc7fd3ab0 the check is now an ajax request. (one need just to add rules in the libraries/rules and they
will be automatically called by the component - no further actions necessary)
layout improvements
2012-06-09 15:34:32 +02:00

40 lines
1.1 KiB
PHP

<?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');
class jedcheckerViewUploads extends JView
{
public function display($tpl = null)
{
$this->setToolbar();
$this->jsOptions['url'] = JURI::base();
$this->jsOptions['rules'] = $this->getRules();
parent::display($tpl);
}
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()
{
JToolBarHelper::custom('uploads.unzip', 'unzip', 'unzip', 'unzip', false);
JToolBarHelper::custom('police.check', 'police-check', 'police-check', 'check', false);
}
}