Пример #1
0
 function cleanCache()
 {
     require_once JPATH_ROOT . DS . 'components' . DS . 'com_sef' . DS . 'sef.cache.php';
     $cache =& sefCache::getInstance();
     $cache->cleanCache();
 }
Пример #2
0
 function getStatistics()
 {
     $sefConfig =& SEFConfig::getConfig();
     $stats = array();
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_AUTOMATIC_SEF_URLS');
     $stat->value = $this->getCount(0);
     $stat->link = 'index.php?option=com_sef&controller=sefurls&viewmode=0';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_CUSTOM_SEF_URLS');
     $stat->value = $this->getCount(2);
     $stat->link = 'index.php?option=com_sef&controller=sefurls&viewmode=2';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_404_URLS');
     $stat->value = $this->getCount(1);
     $stat->link = 'index.php?option=com_sef&controller=sefurls&viewmode=1';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_MOVED_URLS');
     $stat->value = $this->getCount(3);
     $stat->link = 'index.php?option=com_sef&controller=movedurls';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_TOTAL_URLS');
     $stat->value = $stats[0]->value + $stats[1]->value + $stats[2]->value + $stats[3]->value;
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = '';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_DISABLED_URLS');
     $stat->value = $this->getCount(4);
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_NOT_SEFED_URLS');
     $stat->value = $this->getCount(5);
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_LOCKED_URLS');
     $stat->value = $this->getCount(6);
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_CACHE_ENTRIES');
     if ($sefConfig->useCache) {
         $cache =& sefCache::getInstance();
         $stat->value = $cache->getCount();
     } else {
         $stat->value = JText::_('COM_SEF_CACHE_DISABLED');
     }
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = '';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = JText::_('COM_SEF_ERRORS_LOGGED');
     $stat->value = $this->getCount(7);
     $stat->link = 'index.php?option=com_sef&controller=logger';
     $stats[] = $stat;
     return $stats;
 }
Пример #3
0
/**
 * SEF component for Joomla!
 * 
 * @package   JoomSEF
 * @version   4.6.2
 * @author    ARTIO s.r.o., http://www.artio.net
 * @copyright Copyright (C) 2015 ARTIO s.r.o. 
 * @license   GNU/GPLv3 http://www.artio.net/license/gnu-general-public-license
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
$sefConfig =& SEFConfig::getConfig();
if ($sefConfig->useCache) {
    //require(JPATH_ROOT.'/components/com_sef/sef.cache.php');
    $cache =& sefCache::getInstance();
}
?>
<form action="index.php" method="post" name="adminForm" id="adminForm">

<script type="text/javascript">
<!--
function useRE(el1, el2)
{
    if( !el1 || !el2 ) {
        return;
    }
    
    if( el1.checked && el2.value.substr(0, 4) != 'reg:' ) {
        el2.value = 'reg:' + el2.value;
    }
Пример #4
0
 function getStatistics()
 {
     $sefConfig =& SEFConfig::getConfig();
     $stats = array();
     $stat = new stdClass();
     $stat->text = 'Automatic SEF URLs';
     $stat->value = $this->getCount(_COM_SEF_COUNT_AUTOMATIC);
     $stat->link = 'index.php?option=com_sef&controller=sefurls&viewmode=0';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = 'Custom SEF URLs';
     $stat->value = $this->getCount(_COM_SEF_COUNT_CUSTOM);
     $stat->link = 'index.php?option=com_sef&controller=sefurls&viewmode=2';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = 'Trashed SEF URLs';
     $stat->value = $this->getCount(_COM_SEF_COUNT_TRASHED);
     $stat->link = 'index.php?option=com_sef&controller=sefurls&viewmode=6';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = '404 URLs';
     $stat->value = $this->getCount(_COM_SEF_COUNT_404);
     $stat->link = 'index.php?option=com_sef&controller=sefurls&viewmode=1';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = 'Moved URLs';
     $stat->value = $this->getCount(_COM_SEF_COUNT_MOVED);
     $stat->link = 'index.php?option=com_sef&controller=movedurls';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = 'Total URLs';
     $stat->value = $stats[0]->value + $stats[1]->value + $stats[2]->value + $stats[3]->value + $stats[4]->value;
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = '';
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = 'Disabled URLs';
     $stat->value = $this->getCount(_COM_SEF_COUNT_DISABLED);
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = 'Not SEFed URLs';
     $stat->value = $this->getCount(_COM_SEF_COUNT_NOT_SEFED);
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = 'Locked URLs';
     $stat->value = $this->getCount(_COM_SEF_COUNT_LOCKED);
     $stats[] = $stat;
     $stat = new stdClass();
     $stat->text = 'Cache entries';
     if ($sefConfig->useCache) {
         $cache =& sefCache::getInstance();
         $stat->value = $cache->getCount();
     } else {
         $stat->value = JText::_('Cache disabled');
     }
     $stats[] = $stat;
     return $stats;
 }