/** * @package WP Pipes plugin - PIPES * @version $Id: cronlog.php 170 2014-01-26 06:34:40Z thongta $ * @author wppipes.com * @copyright 2014 wppipes.com. All rights reserved. * @license GNU/GPL v3, see LICENSE */ defined('PIPES_CORE') or die('Restricted access'); defined('_JEXEC') or die('Restricted access'); jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); //require_once JPATH_COMPONENT.DS.'cronjob.php'; //require_once JPATH_ROOT.DS.'components'.DS.'com_wppipes'.DS.'define.php'; define('OGRAB_CACHE_LOG', OGRAB_CACHE . 'log' . DS); $CronLog = new CronLog(); $CronLog->view(); class CronLog { function getFiles($dir) { $res = new stdClass(); $res->items = array(); $res->total = 0; if (!is_dir($dir)) { return $res; } $items = JFolder::files($dir, '.', true, true); $names = array(); foreach ($items as $item) { $item = str_replace(DS . '/', DS . DS, $item); $names[] = str_replace($dir . DS, '', $item);