29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-27 07:33:41 +00:00

# [#27117] More autoformatting fixes. Thanks Rouven.

This commit is contained in:
Rouven Weßling 2012-01-12 18:06:08 +01:00 committed by Jean-Marie Simonet
parent 8025827bf0
commit fac7b687dc
368 changed files with 1024 additions and 1027 deletions

View File

@ -96,8 +96,8 @@ class joomlaInstallerScript
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->insert('#__extensions');
$query->columns(array($db->quoteName('name'),$db->quoteName('type'),
$db->quoteName('element'),$db->quoteName('enabled'),$db->quoteName('access'),
$query->columns(array($db->quoteName('name'), $db->quoteName('type'),
$db->quoteName('element'), $db->quoteName('enabled'), $db->quoteName('access'),
$db->quoteName('protected')));
$query->values($db->quote('joomla'). ', '. $db->quote('package').', '.$db->quote('pkg_joomla') . ', 1, 1, 1');

View File

@ -23,10 +23,10 @@ jimport('joomla.language.help');
</div>
<div class="width-50 fltrt helplinks">
<ul class="helpmenu">
<li><?php echo JHtml::_('link',JHelp::createUrl('JHELP_GLOSSARY'), JText::_('COM_ADMIN_GLOSSARY'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link','http://www.gnu.org/licenses/gpl-2.0.html', JText::_('COM_ADMIN_LICENSE'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link',$this->latest_version_check, JText::_('COM_ADMIN_LATEST_VERSION_CHECK'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link',JHelp::createUrl('JHELP_START_HERE'), JText::_('COM_ADMIN_START_HERE'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_GLOSSARY'), JText::_('COM_ADMIN_GLOSSARY'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', 'http://www.gnu.org/licenses/gpl-2.0.html', JText::_('COM_ADMIN_LICENSE'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', $this->latest_version_check, JText::_('COM_ADMIN_LATEST_VERSION_CHECK'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_START_HERE'), JText::_('COM_ADMIN_START_HERE'), array('target' => 'helpFrame')) ?></li>
</ul>
</div>
<div class="clr"> </div>
@ -39,7 +39,7 @@ jimport('joomla.language.help');
<?php foreach ($this->toc as $k=>$v):?>
<li>
<?php $url = JHelp::createUrl('JHELP_'.strtoupper($k)); ?>
<?php echo JHtml::_('link',$url, $v, array('target' => 'helpFrame'));?>
<?php echo JHtml::_('link', $url, $v, array('target' => 'helpFrame'));?>
</li>
<?php endforeach;?>
</ul>

View File

@ -31,10 +31,10 @@ defined('_JEXEC') or die;
<?php foreach($this->directory as $dir=>$info):?>
<tr>
<td>
<?php echo JHtml::_('directory.message',$dir,$info['message']);?>
<?php echo JHtml::_('directory.message', $dir, $info['message']);?>
</td>
<td>
<?php echo JHtml::_('directory.writable',$info['writable']);?>
<?php echo JHtml::_('directory.writable', $info['writable']);?>
</td>
</tr>
<?php endforeach; ?>

View File

@ -66,7 +66,7 @@ defined('_JEXEC') or die;
<strong><?php echo JText::_('COM_ADMIN_WEB_SERVER'); ?></strong>
</td>
<td>
<?php echo JHtml::_('system.server',$this->info['server']); ?>
<?php echo JHtml::_('system.server', $this->info['server']); ?>
</td>
</tr>
<tr>

View File

@ -83,8 +83,8 @@ class BannersControllerTracks extends JController
$model->setState('list.start', 0);
$form = JRequest::getVar('jform');
$model->setState('basename',$form['basename']);
$model->setState('compressed',$form['compressed']);
$model->setState('basename', $form['basename']);
$model->setState('compressed', $form['compressed']);
$config = JFactory::getConfig();
$cookie_domain = $config->get('cookie_domain', '');

View File

@ -38,7 +38,7 @@ class BannersHelper
);
if ($vName=='categories') {
JToolBarHelper::title(
JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE',JText::_('com_banners')),
JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE', JText::_('com_banners')),
'banners-categories');
}
@ -116,7 +116,7 @@ class BannersHelper
$purchase_type = $row->purchase_type;
if ($purchase_type < 0 && $row->cid) {
$client = JTable::getInstance('Client','BannersTable');
$client = JTable::getInstance('Client', 'BannersTable');
$client->load($row->cid);
$purchase_type = $client->purchase_type;
}
@ -131,19 +131,19 @@ class BannersHelper
$reset = $nullDate;
break;
case 2:
$date = JFactory::getDate('+1 year '.date('Y-m-d',strtotime('now')));
$date = JFactory::getDate('+1 year '.date('Y-m-d', strtotime('now')));
$reset = $db->Quote($date->toSql());
break;
case 3:
$date = JFactory::getDate('+1 month '.date('Y-m-d',strtotime('now')));
$date = JFactory::getDate('+1 month '.date('Y-m-d', strtotime('now')));
$reset = $db->Quote($date->toSql());
break;
case 4:
$date = JFactory::getDate('+7 day '.date('Y-m-d',strtotime('now')));
$date = JFactory::getDate('+7 day '.date('Y-m-d', strtotime('now')));
$reset = $db->Quote($date->toSql());
break;
case 5:
$date = JFactory::getDate('+1 day '.date('Y-m-d',strtotime('now')));
$date = JFactory::getDate('+1 day '.date('Y-m-d', strtotime('now')));
$reset = $db->Quote($date->toSql());
break;
}
@ -167,7 +167,7 @@ class BannersHelper
return true;
}
public static function getClientOptions()
{
// Initialize variables.
@ -197,4 +197,4 @@ class BannersHelper
return $options;
}
}
}

View File

@ -30,11 +30,11 @@ class BannersModelDownload extends JModelForm
protected function populateState()
{
jimport('joomla.utilities.utility');
$basename = JRequest::getString(JApplication::getHash($this->_context.'.basename'),'__SITE__','cookie');
$this->setState('basename',$basename);
$basename = JRequest::getString(JApplication::getHash($this->_context.'.basename'), '__SITE__', 'cookie');
$this->setState('basename', $basename);
$compressed = JRequest::getInt(JApplication::getHash($this->_context.'.compressed'),1,'cookie');
$this->setState('compressed',$compressed);
$compressed = JRequest::getInt(JApplication::getHash($this->_context.'.compressed'), 1, 'cookie');
$this->setState('compressed', $compressed);
}
/**

View File

@ -102,20 +102,20 @@ class BannersModelTracks extends JModelList
$query->select(
'a.track_date as track_date,'.
'a.track_type as track_type,'.
'a.'.$db->quoteName('count'),' as '.$db->quoteName('count')
'a.'.$db->quoteName('count'), ' as '.$db->quoteName('count')
);
$query->from($db->quoteName('#__banner_tracks').' AS a');
// Join with the banners
$query->join('LEFT',$db->quoteName('#__banners').' as b ON b.id=a.banner_id');
$query->join('LEFT', $db->quoteName('#__banners').' as b ON b.id=a.banner_id');
$query->select('b.name as name');
// Join with the client
$query->join('LEFT',$db->quoteName('#__banner_clients').' as cl ON cl.id=b.cid');
$query->join('LEFT', $db->quoteName('#__banner_clients').' as cl ON cl.id=b.cid');
$query->select('cl.name as client_name');
// Join with the category
$query->join('LEFT',$db->quoteName('#__categories').' as cat ON cat.id=b.catid');
$query->join('LEFT', $db->quoteName('#__categories').' as cat ON cat.id=b.catid');
$query->select('cat.title as category_title');
// Filter by type
@ -244,62 +244,62 @@ class BannersModelTracks extends JModelList
$app = JFactory::getApplication();
$basename = $this->getState('basename');
$basename = str_replace('__SITE__',$app->getCfg('sitename'),$basename);
$basename = str_replace('__SITE__', $app->getCfg('sitename'), $basename);
$categoryId = $this->getState('filter.category_id');
if (is_numeric($categoryId)) {
if ($categoryId > 0) {
$basename = str_replace('__CATID__',$categoryId,$basename);
$basename = str_replace('__CATID__', $categoryId, $basename);
} else {
$basename = str_replace('__CATID__','',$basename);
$basename = str_replace('__CATID__', '', $basename);
}
$categoryName = $this->getCategoryName();
$basename = str_replace('__CATNAME__',$categoryName,$basename);
$basename = str_replace('__CATNAME__', $categoryName, $basename);
} else {
$basename = str_replace('__CATID__','',$basename);
$basename = str_replace('__CATNAME__','',$basename);
$basename = str_replace('__CATID__', '', $basename);
$basename = str_replace('__CATNAME__', '', $basename);
}
$clientId = $this->getState('filter.client_id');
if (is_numeric($clientId)) {
if ($clientId > 0) {
$basename = str_replace('__CLIENTID__',$clientId,$basename);
$basename = str_replace('__CLIENTID__', $clientId, $basename);
} else {
$basename = str_replace('__CLIENTID__','',$basename);
$basename = str_replace('__CLIENTID__', '', $basename);
}
$clientName = $this->getClientName();
$basename = str_replace('__CLIENTNAME__',$clientName,$basename);
$basename = str_replace('__CLIENTNAME__', $clientName, $basename);
} else {
$basename = str_replace('__CLIENTID__','',$basename);
$basename = str_replace('__CLIENTNAME__','',$basename);
$basename = str_replace('__CLIENTID__', '', $basename);
$basename = str_replace('__CLIENTNAME__', '', $basename);
}
$type = $this->getState('filter.type');
if ($type > 0) {
$basename = str_replace('__TYPE__',$type,$basename);
$basename = str_replace('__TYPE__', $type, $basename);
$typeName = JText::_('COM_BANNERS_TYPE'.$type);
$basename = str_replace('__TYPENAME__',$typeName,$basename);
$basename = str_replace('__TYPENAME__', $typeName, $basename);
} else {
$basename = str_replace('__TYPE__','',$basename);
$basename = str_replace('__TYPENAME__','',$basename);
$basename = str_replace('__TYPE__', '', $basename);
$basename = str_replace('__TYPENAME__', '', $basename);
}
$begin = $this->getState('filter.begin');
if (!empty($begin)) {
$basename = str_replace('__BEGIN__',$begin,$basename);
$basename = str_replace('__BEGIN__', $begin, $basename);
} else {
$basename = str_replace('__BEGIN__','',$basename);
$basename = str_replace('__BEGIN__', '', $basename);
}
$end = $this->getState('filter.end');
if (!empty($end)) {
$basename = str_replace('__END__',$end,$basename);
$basename = str_replace('__END__', $end, $basename);
} else {
$basename = str_replace('__END__','',$basename);
$basename = str_replace('__END__', '', $basename);
}
$this->basename = $basename;
@ -401,22 +401,22 @@ class BannersModelTracks extends JModelList
$this->content = '';
$this->content.=
'"'.str_replace('"','""',JText::_('COM_BANNERS_HEADING_NAME')).'","'.
str_replace('"','""',JText::_('COM_BANNERS_HEADING_CLIENT')).'","'.
str_replace('"','""',JText::_('JCATEGORY')).'","'.
str_replace('"','""',JText::_('COM_BANNERS_HEADING_TYPE')).'","'.
str_replace('"','""',JText::_('COM_BANNERS_HEADING_COUNT')).'","'.
str_replace('"','""',JText::_('JDATE')).'"'."\n";
'"'.str_replace('"', '""', JText::_('COM_BANNERS_HEADING_NAME')).'","'.
str_replace('"', '""', JText::_('COM_BANNERS_HEADING_CLIENT')).'","'.
str_replace('"', '""', JText::_('JCATEGORY')).'","'.
str_replace('"', '""', JText::_('COM_BANNERS_HEADING_TYPE')).'","'.
str_replace('"', '""', JText::_('COM_BANNERS_HEADING_COUNT')).'","'.
str_replace('"', '""', JText::_('JDATE')).'"'."\n";
foreach($this->getItems() as $item) {
$this->content.=
'"'.str_replace('"','""',$item->name).'","'.
str_replace('"','""',$item->client_name).'","'.
str_replace('"','""',$item->category_title).'","'.
str_replace('"','""',($item->track_type==1 ? JText::_('COM_BANNERS_IMPRESSION'): JText::_('COM_BANNERS_CLICK'))).'","'.
str_replace('"','""',$item->count).'","'.
str_replace('"','""',$item->track_date).'"'."\n";
'"'.str_replace('"', '""', $item->name).'","'.
str_replace('"', '""', $item->client_name).'","'.
str_replace('"', '""', $item->category_title).'","'.
str_replace('"', '""', ($item->track_type==1 ? JText::_('COM_BANNERS_IMPRESSION'): JText::_('COM_BANNERS_CLICK'))).'","'.
str_replace('"', '""', $item->count).'","'.
str_replace('"', '""', $item->track_date).'"'."\n";
}
if ($this->getState('compressed')) {
@ -433,7 +433,7 @@ class BannersModelTracks extends JModelList
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.archive');
$delete = JFolder::files($app->getCfg('tmp_path').'/', uniqid('banners_tracks_'),false,true);
$delete = JFolder::files($app->getCfg('tmp_path').'/', uniqid('banners_tracks_'), false, true);
if (!empty($delete)) {
if (!JFile::delete($delete)) {

View File

@ -128,7 +128,7 @@ class BannersTableBanner extends JTable
$purchase_type = $this->purchase_type;
if ($purchase_type < 0 && $this->cid)
{
$client = JTable::getInstance('Client','BannersTable');
$client = JTable::getInstance('Client', 'BannersTable');
$client->load($this->cid);
$purchase_type = $client->purchase_type;
}
@ -144,19 +144,19 @@ class BannersTableBanner extends JTable
$this->reset=$this->_db->getNullDate();
break;
case 2:
$date = JFactory::getDate('+1 year '.date('Y-m-d',strtotime('now')));
$date = JFactory::getDate('+1 year '.date('Y-m-d', strtotime('now')));
$reset = $this->_db->Quote($date->toSql());
break;
case 3:
$date = JFactory::getDate('+1 month '.date('Y-m-d',strtotime('now')));
$date = JFactory::getDate('+1 month '.date('Y-m-d', strtotime('now')));
$reset = $this->_db->Quote($date->toSql());
break;
case 4:
$date = JFactory::getDate('+7 day '.date('Y-m-d',strtotime('now')));
$date = JFactory::getDate('+7 day '.date('Y-m-d', strtotime('now')));
$reset = $this->_db->Quote($date->toSql());
break;
case 5:
$date = JFactory::getDate('+1 day '.date('Y-m-d',strtotime('now')));
$date = JFactory::getDate('+1 day '.date('Y-m-d', strtotime('now')));
$reset = $this->_db->Quote($date->toSql());
break;
}
@ -174,7 +174,7 @@ class BannersTableBanner extends JTable
// Verify that the alias is unique
$table = JTable::getInstance('Banner', 'BannersTable');
if ($table->load(array('alias'=>$this->alias,'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) {
if ($table->load(array('alias'=>$this->alias, 'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) {
$this->setError(JText::_('COM_BANNERS_ERROR_UNIQUE_ALIAS'));
return false;
}
@ -228,7 +228,7 @@ class BannersTableBanner extends JTable
}
// Get an instance of the table
$table = JTable::getInstance('Banner','BannersTable');
$table = JTable::getInstance('Banner', 'BannersTable');
// For all keys
foreach ($pks as $pk)
@ -295,7 +295,7 @@ class BannersTableBanner extends JTable
}
// Get an instance of the table
$table = JTable::getInstance('Banner','BannersTable');
$table = JTable::getInstance('Banner', 'BannersTable');
// For all keys
foreach ($pks as $pk)

View File

@ -98,9 +98,9 @@ JHtml::_('behavior.formvalidation');
</div>
<div class="width-40 fltrt">
<?php echo JHtml::_('sliders.start','banner-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.start', 'banner-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.panel',JText::_('COM_BANNERS_GROUP_LABEL_PUBLISHING_DETAILS'), 'publishing-details'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_BANNERS_GROUP_LABEL_PUBLISHING_DETAILS'), 'publishing-details'); ?>
<fieldset class="panelform">
<ul class="adminformlist">
<?php foreach($this->form->getFieldset('publish') as $field): ?>
@ -110,7 +110,7 @@ JHtml::_('behavior.formvalidation');
</ul>
</fieldset>
<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'metadata'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'metadata'); ?>
<fieldset class="panelform">
<ul class="adminformlist">
<?php foreach($this->form->getFieldset('metadata') as $field): ?>

View File

@ -176,14 +176,14 @@ $params = (isset($this->state->params)) ? $this->state->params : new JObject();
</td>
<td class="center">
<?php if ($item->purchase_type < 0):?>
<?php echo JText::sprintf('COM_BANNERS_DEFAULT',($item->client_purchase_type > 0) ? JText::_('COM_BANNERS_FIELD_VALUE_'.$item->client_purchase_type) : JText::_('COM_BANNERS_FIELD_VALUE_'.$params->get('purchase_type')));?>
<?php echo JText::sprintf('COM_BANNERS_DEFAULT', ($item->client_purchase_type > 0) ? JText::_('COM_BANNERS_FIELD_VALUE_'.$item->client_purchase_type) : JText::_('COM_BANNERS_FIELD_VALUE_'.$params->get('purchase_type')));?>
<?php else:?>
<?php echo JText::_('COM_BANNERS_FIELD_VALUE_'.$item->purchase_type);?>
<?php endif;?>
</td>
<td class="center nowrap">
<?php if ($item->language=='*'):?>
<?php echo JText::alt('JALL','language'); ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>

View File

@ -60,9 +60,9 @@ $canDo = BannersHelper::getActions();
</div>
<div class="width-40 fltrt">
<?php echo JHtml::_('sliders.start','banner-client-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.start', 'banner-client-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'metadata'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'metadata'); ?>
<fieldset class="panelform">
<ul class="adminformlist">
<?php foreach($this->form->getFieldset('metadata') as $field): ?>
@ -76,7 +76,7 @@ $canDo = BannersHelper::getActions();
</ul>
</fieldset>
<?php echo JHtml::_('sliders.panel',JText::_('COM_BANNERS_EXTRA'), 'extra'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_BANNERS_EXTRA'), 'extra'); ?>
<fieldset class="panelform">
<ul class="adminformlist">
<?php foreach($this->form->getFieldset('extra') as $field): ?>

View File

@ -111,7 +111,7 @@ $params = (isset($this->state->params)) ? $this->state->params : new JObject();
</td>
<td class="center">
<?php if ($item->purchase_type<0):?>
<?php echo JText::sprintf('COM_BANNERS_DEFAULT',JText::_('COM_BANNERS_FIELD_VALUE_'.$params->get('purchase_type')));?>
<?php echo JText::sprintf('COM_BANNERS_DEFAULT', JText::_('COM_BANNERS_FIELD_VALUE_'.$params->get('purchase_type')));?>
<?php else:?>
<?php echo JText::_('COM_BANNERS_FIELD_VALUE_'.$item->purchase_type);?>
<?php endif;?>

View File

@ -23,10 +23,10 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<fieldset id="filter-bar">
<div class="filter-search fltlft">
<label class="filter-hide-lbl" for="filter_begin"><?php echo JText::_('COM_BANNERS_BEGIN_LABEL'); ?></label>
<?php echo JHtml::_('calendar',$this->state->get('filter.begin'), 'filter_begin','filter_begin','%Y-%m-%d' , array('size'=>10,'onchange'=>"this.form.fireEvent('submit');this.form.submit()"));?>
<?php echo JHtml::_('calendar', $this->state->get('filter.begin'), 'filter_begin', 'filter_begin', '%Y-%m-%d' , array('size'=>10, 'onchange'=>"this.form.fireEvent('submit');this.form.submit()"));?>
<label class="filter-hide-lbl" for="filter_end"><?php echo JText::_('COM_BANNERS_END_LABEL'); ?></label>
<?php echo JHtml::_('calendar',$this->state->get('filter.end'), 'filter_end', 'filter_end','%Y-%m-%d' ,array('size'=>10,'onchange'=>"this.form.fireEvent('submit');this.form.submit()"));?>
<?php echo JHtml::_('calendar', $this->state->get('filter.end'), 'filter_end', 'filter_end', '%Y-%m-%d' , array('size'=>10, 'onchange'=>"this.form.fireEvent('submit');this.form.submit()"));?>
</div>
<div class="filter-select fltrt">
@ -97,7 +97,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php echo $item->count;?>
</td>
<td>
<?php echo JHtml::_('date',$item->track_date, JText::_('DATE_FORMAT_LC4').' H:i');?>
<?php echo JHtml::_('date', $item->track_date, JText::_('DATE_FORMAT_LC4').' H:i');?>
</td>
</tr>
<?php endforeach; ?>

View File

@ -56,11 +56,11 @@ class BannersViewTracks extends JView
JToolBarHelper::title(JText::_('COM_BANNERS_MANAGER_TRACKS'), 'banners-tracks.png');
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Popup', 'export', 'JTOOLBAR_EXPORT', 'index.php?option=com_banners&amp;view=download&amp;tmpl=component',600,300);
$bar->appendButton('Popup', 'export', 'JTOOLBAR_EXPORT', 'index.php?option=com_banners&amp;view=download&amp;tmpl=component', 600, 300);
$document = JFactory::getDocument();
$app = JFactory::getApplication();
if ($canDo->get('core.delete')) {
$bar->appendButton('Confirm','COM_BANNERS_DELETE_MSG', 'delete', 'COM_BANNERS_TRACKS_DELETE', 'tracks.delete',false);
$bar->appendButton('Confirm', 'COM_BANNERS_DELETE_MSG', 'delete', 'COM_BANNERS_TRACKS_DELETE', 'tracks.delete', false);
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {

View File

@ -31,7 +31,7 @@ class CategoriesHelper
return;
}
$parts = explode('.',$extension);
$parts = explode('.', $extension);
$component = $parts[0];
if (count($parts) > 1) {
@ -77,7 +77,7 @@ class CategoriesHelper
{
$user = JFactory::getUser();
$result = new JObject;
$parts = explode('.',$extension);
$parts = explode('.', $extension);
$component = $parts[0];
if (empty($categoryId)) {

View File

@ -71,7 +71,7 @@ class CategoriesModelCategories extends JModelList
$extension = $app->getUserStateFromRequest('com_categories.categories.filter.extension', 'extension', 'com_content', 'cmd');
$this->setState('filter.extension', $extension);
$parts = explode('.',$extension);
$parts = explode('.', $extension);
// extract the component name
$this->setState('filter.component', $parts[0]);
@ -211,7 +211,7 @@ class CategoriesModelCategories extends JModelList
if ($language = $this->getState('filter.language')) {
$query->where('a.language = '.$db->quote($language));
}
// Add the list ordering clause
$listOrdering = $this->getState('list.ordering', 'a.lft');
$listDirn = $db->escape($this->getState('list.direction', 'ASC'));

View File

@ -83,7 +83,7 @@ class JFormFieldCategoryParent extends JFormFieldList
$options[$i]->text = JText::_('JGLOBAL_ROOT_PARENT');
}
$options[$i]->text = str_repeat('- ',$options[$i]->level).$options[$i]->text;
$options[$i]->text = str_repeat('- ', $options[$i]->level).$options[$i]->text;
}
// Initialise variables.

View File

@ -34,4 +34,3 @@ class CategoriesTableCategory extends JTableCategory
return parent::delete($pk, $children);
}
}

View File

@ -146,7 +146,7 @@ $saveOrder = ($listOrder == 'a.lft' && $listDirn == 'asc');
</td>
<td class="center nowrap">
<?php if ($item->language=='*'):?>
<?php echo JText::alt('JALL','language'); ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>

View File

@ -107,10 +107,10 @@ class CategoriesViewCategories extends JView
}
// Load specific css component
JHtml::_('stylesheet',$component.'/administrator/categories.css', array(), true);
JHtml::_('stylesheet', $component.'/administrator/categories.css', array(), true);
// Prepare the toolbar.
JToolBarHelper::title($title, 'categories '.substr($component,4).($section?"-$section":'').'-categories');
JToolBarHelper::title($title, 'categories '.substr($component, 4).($section?"-$section":'').'-categories');
if ($canDo->get('core.create') || (count($user->getAuthorisedCategories($component, 'core.create'))) > 0 ) {
JToolBarHelper::addNew('category.add');
@ -148,7 +148,7 @@ class CategoriesViewCategories extends JView
// Compute the ref_key if it does exist in the component
if (!$lang->hasKey($ref_key = strtoupper($component.($section?"_$section":'')).'_CATEGORIES_HELP_KEY')) {
$ref_key = 'JHELP_COMPONENTS_'.strtoupper(substr($component,4).($section?"_$section":'')).'_CATEGORIES';
$ref_key = 'JHELP_COMPONENTS_'.strtoupper(substr($component, 4).($section?"_$section":'')).'_CATEGORIES';
}
// Get help for the categories view for the component by

View File

@ -77,11 +77,11 @@ JHtml::_('behavior.keepalive');
<div class="width-40 fltrt">
<?php echo JHtml::_('sliders.start','categories-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.start', 'categories-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo $this->loadTemplate('options'); ?>
<div class="clr"></div>
<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'meta-options'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'meta-options'); ?>
<fieldset class="panelform">
<?php echo $this->loadTemplate('metadata'); ?>
</fieldset>
@ -93,9 +93,9 @@ JHtml::_('behavior.keepalive');
<?php if ($this->canDo->get('core.admin')): ?>
<div class="width-100 fltlft">
<?php echo JHtml::_('sliders.start','permissions-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.start', 'permissions-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.panel',JText::_('COM_CATEGORIES_FIELDSET_RULES'), 'access-rules'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CATEGORIES_FIELDSET_RULES'), 'access-rules'); ?>
<fieldset class="panelform">
<?php echo $this->form->getLabel('rules'); ?>
<?php echo $this->form->getInput('rules'); ?>

View File

@ -9,7 +9,7 @@
// No direct access.
defined('_JEXEC') or die; ?>
<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_PUBLISHING'), 'publishing-details'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('JGLOBAL_FIELDSET_PUBLISHING'), 'publishing-details'); ?>
<fieldset class="panelform">
<ul class="adminformlist">
@ -37,7 +37,7 @@ defined('_JEXEC') or die; ?>
foreach ($fieldSets as $name => $fieldSet) :
$label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_CATEGORIES_'.$name.'_FIELDSET_LABEL';
echo JHtml::_('sliders.panel',JText::_($label), $name.'-options');
echo JHtml::_('sliders.panel', JText::_($label), $name.'-options');
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="tip">'.$this->escape(JText::_($fieldSet->description)).'</p>';
endif;

View File

@ -64,7 +64,7 @@ class CategoriesViewCategory extends JView
}
// The extension can be in the form com_foo.section
$parts = explode('.',$extension);
$parts = explode('.', $extension);
$component = $parts[0];
$section = (count($parts) > 1) ? $parts[1] : null;
@ -95,10 +95,10 @@ class CategoriesViewCategory extends JView
}
// Load specific css component
JHtml::_('stylesheet',$component.'/administrator/categories.css', array(), true);
JHtml::_('stylesheet', $component.'/administrator/categories.css', array(), true);
// Prepare the toolbar.
JToolBarHelper::title($title, 'category-'.($isNew?'add':'edit').' '.substr($component,4).($section?"-$section":'').'-category-'.($isNew?'add':'edit'));
JToolBarHelper::title($title, 'category-'.($isNew?'add':'edit').' '.substr($component, 4).($section?"-$section":'').'-category-'.($isNew?'add':'edit'));
// For new records, check the create permission.
if ($isNew && (count($user->getAuthorisedCategories($component, 'core.create')) > 0)) {
@ -132,7 +132,7 @@ class CategoriesViewCategory extends JView
// Compute the ref_key if it does exist in the component
if (!$lang->hasKey($ref_key = strtoupper($component.($section?"_$section":'')).'_CATEGORY_'.($isNew?'ADD':'EDIT').'_HELP_KEY')) {
$ref_key = 'JHELP_COMPONENTS_'.strtoupper(substr($component,4).($section?"_$section":'')).'_CATEGORY_'.($isNew?'ADD':'EDIT');
$ref_key = 'JHELP_COMPONENTS_'.strtoupper(substr($component, 4).($section?"_$section":'')).'_CATEGORY_'.($isNew?'ADD':'EDIT');
}
// Get help for the category/section view for the component by

View File

@ -37,7 +37,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php foreach ($this->items as $table => $count): $i=0;?>
<tr class="row<?php echo $i%2; ?>">
<td class="center"><?php echo JHtml::_('grid.id', $i, $table); ?></td>
<td><?php echo JText::sprintf('COM_CHECKIN_TABLE',$table); ?></td>
<td><?php echo JText::sprintf('COM_CHECKIN_TABLE', $table); ?></td>
<td width="200" class="center"><?php echo $count; ?></td>
</tr>
<?php endforeach;?>

View File

@ -51,14 +51,14 @@ class ConfigModelApplication extends JModelForm
// Get the config data.
$config = new JConfig();
$data = JArrayHelper::fromObject($config);
// Prime the asset_id for the rules.
$data['asset_id'] = 1;
// Get the text filter data
$params = JComponentHelper::getParams('com_config');
$data['filters'] = JArrayHelper::fromObject($params->get('filters'));
// If no filter data found, get from com_content (update of 1.6/1.7 site)
if (empty($data['filters'])) {
$contentParams = JComponentHelper::getParams('com_content');
@ -118,18 +118,18 @@ class ConfigModelApplication extends JModelForm
}
unset($data['rules']);
}
// Save the text filters
if (isset($data['filters']))
if (isset($data['filters']))
{
$registry = new JRegistry();
$registry->loadArray(array('filters' => $data['filters']));
$extension = JTable::getInstance('extension');
// Get extension_id
$extension_id = $extension->find(array('name' => 'com_config'));
if ($extension->load((int) $extension_id))
{
$extension->params = (string) $registry;
@ -137,7 +137,7 @@ class ConfigModelApplication extends JModelForm
JError::raiseNotice('SOME_ERROR_CODE', $extension->getError());
}
}
else
else
{
$this->setError(JText::_('COM_CONFIG_ERROR_CONFIG_EXTENSION_NOT_FOUND'));
return false;

View File

@ -120,7 +120,7 @@ class ConfigModelComponent extends JModelForm
$root->loadByName('root.1');
$asset->name = $data['option'];
$asset->title = $data['option'];
$asset->setLocation($root->id,'last-child');
$asset->setLocation($root->id, 'last-child');
}
$asset->rules = (string) $rules;

View File

@ -113,8 +113,8 @@ class JFormFieldFilters extends JFormField
$query->select('a.id AS value, a.title AS text, COUNT(DISTINCT b.id) AS level');
$query->from('#__usergroups AS a');
$query->join('LEFT', '#__usergroups AS b on a.lft > b.lft AND a.rgt < b.rgt');
$query->group('a.id, a.title, a.lft');
$query->order('a.lft ASC');
$query->group('a.id, a.title, a.lft');
$query->order('a.lft ASC');
$db->setQuery($query);
$options = $db->loadObjectList();

View File

@ -39,11 +39,11 @@ JHtml::_('behavior.formvalidation');
</fieldset>
<?php
echo JHtml::_('tabs.start','config-tabs-'.$this->component->option.'_configuration', array('useCookie'=>1));
echo JHtml::_('tabs.start', 'config-tabs-'.$this->component->option.'_configuration', array('useCookie'=>1));
$fieldSets = $this->form->getFieldsets();
foreach ($fieldSets as $name => $fieldSet) :
$label = empty($fieldSet->label) ? 'COM_CONFIG_'.$name.'_FIELDSET_LABEL' : $fieldSet->label;
echo JHtml::_('tabs.panel',JText::_($label), 'publishing-details');
echo JHtml::_('tabs.panel', JText::_($label), 'publishing-details');
if (isset($fieldSet->description) && !empty($fieldSet->description)) :
echo '<p class="tab-description">'.JText::_($fieldSet->description).'</p>';
endif;

View File

@ -39,7 +39,7 @@ class ContactHelper
if ($vName=='categories') {
JToolBarHelper::title(
JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE',JText::_('com_contact')),
JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE', JText::_('com_contact')),
'contact-categories');
}
}

View File

@ -31,7 +31,7 @@ abstract class JHtmlContact
1 => array('featured.png', 'contacts.unfeatured', 'JFEATURED', 'COM_CONTACT_TOGGLE_TO_UNFEATURE'),
);
$state = JArrayHelper::getValue($states, (int) $value, $states[1]);
$html = JHtml::_('image','admin/'.$state[0], JText::_($state[2]), NULL, true);
$html = JHtml::_('image', 'admin/'.$state[0], JText::_($state[2]), NULL, true);
if ($canChange) {
$html = '<a href="#" onclick="return listItemTask(\'cb'.$i.'\',\''.$state[1].'\')" title="'.JText::_($state[3]).'">'
. $html .'</a>';

View File

@ -85,7 +85,7 @@ class ContactTableContact extends JTable
}
// Verify that the alias is unique
$table = JTable::getInstance('Contact', 'ContactTable');
if ($table->load(array('alias'=>$this->alias,'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) {
if ($table->load(array('alias'=>$this->alias, 'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) {
$this->setError(JText::_('COM_CONTACT_ERROR_UNIQUE_ALIAS'));
return false;
}
@ -138,7 +138,7 @@ class ContactTableContact extends JTable
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-','',$this->alias)) == '') {
if (trim(str_replace('-', '', $this->alias)) == '') {
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
/** check for valid category */

View File

@ -71,7 +71,7 @@ JHtml::_('behavior.formvalidation');
<div class="width-40 fltrt">
<?php echo JHtml::_('sliders.start', 'contact-slider'); ?>
<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_PUBLISHING'), 'publishing-details'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('JGLOBAL_FIELDSET_PUBLISHING'), 'publishing-details'); ?>
<fieldset class="panelform">
<ul class="adminformlist">
@ -101,7 +101,7 @@ JHtml::_('behavior.formvalidation');
</ul>
</fieldset>
<?php echo JHtml::_('sliders.panel',JText::_('COM_CONTACT_CONTACT_DETAILS'), 'basic-options'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_CONTACT_DETAILS'), 'basic-options'); ?>
<fieldset class="panelform">

View File

@ -11,7 +11,7 @@ defined('_JEXEC') or die;
$fieldSets = $this->form->getFieldsets('metadata');
foreach ($fieldSets as $name => $fieldSet) :
echo JHtml::_('sliders.panel',JText::_($fieldSet->label), $name.'-options');
echo JHtml::_('sliders.panel', JText::_($fieldSet->label), $name.'-options');
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="tip">'.$this->escape(JText::_($fieldSet->description)).'</p>';
endif;

View File

@ -11,7 +11,7 @@ defined('_JEXEC') or die;
$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
echo JHtml::_('sliders.panel',JText::_($fieldSet->label), $name.'-params');
echo JHtml::_('sliders.panel', JText::_($fieldSet->label), $name.'-params');
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="tip">'.$this->escape(JText::_($fieldSet->description)).'</p>';
endif;

View File

@ -148,10 +148,10 @@ $saveOrder = $listOrder == 'a.ordering';
<?php if ($canChange) : ?>
<?php if ($saveOrder) :?>
<?php if ($listDirn == 'asc') : ?>
<span><?php echo $this->pagination->orderUpIcon($i, ($item->catid == @$this->items[$i-1]->catid),'contacts.orderup', 'JLIB_HTML_MOVE_UP', $ordering); ?></span>
<span><?php echo $this->pagination->orderUpIcon($i, ($item->catid == @$this->items[$i-1]->catid), 'contacts.orderup', 'JLIB_HTML_MOVE_UP', $ordering); ?></span>
<span><?php echo $this->pagination->orderDownIcon($i, $n, ($item->catid == @$this->items[$i+1]->catid), 'contacts.orderdown', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span>
<?php elseif ($listDirn == 'desc') : ?>
<span><?php echo $this->pagination->orderUpIcon($i, ($item->catid == @$this->items[$i-1]->catid),'contacts.orderdown', 'JLIB_HTML_MOVE_UP', $ordering); ?></span>
<span><?php echo $this->pagination->orderUpIcon($i, ($item->catid == @$this->items[$i-1]->catid), 'contacts.orderdown', 'JLIB_HTML_MOVE_UP', $ordering); ?></span>
<span><?php echo $this->pagination->orderDownIcon($i, $n, ($item->catid == @$this->items[$i+1]->catid), 'contacts.orderup', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span>
<?php endif; ?>
<?php endif; ?>
@ -166,7 +166,7 @@ $saveOrder = $listOrder == 'a.ordering';
</td>
<td class="center">
<?php if ($item->language=='*'):?>
<?php echo JText::alt('JALL','language'); ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>

View File

@ -100,7 +100,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
</td>
<td class="center">
<?php if ($item->language=='*'):?>
<?php echo JText::alt('JALL','language'); ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>

View File

@ -95,7 +95,7 @@ class ContentHelper
$blackListTags = array();
$blackListAttributes = array();
$customListTags = array();
$customListAttributes = array();
@ -194,7 +194,7 @@ class ContentHelper
// Custom blacklist precedes Default blacklist
if ($customList) {
$filter = JFilterInput::getInstance(array(), array(), 1, 1);
// Override filter's default blacklist tags and attributes
if ($customListTags) {
$filter->tagBlacklist = $customListTags;
@ -220,7 +220,7 @@ class ContentHelper
if ($whiteListAttributes) {
$filter->attrBlacklist = array_diff($filter->attrBlacklist);
}
}
// White lists take fourth precedence.
elseif ($whiteList) {
@ -230,7 +230,7 @@ class ContentHelper
else {
$filter = JFilterInput::getInstance();
}
$text = $filter->clean($text, 'html');
}

View File

@ -25,7 +25,7 @@ abstract class JHtmlContentAdministrator
1 => array('featured.png', 'articles.unfeatured', 'COM_CONTENT_FEATURED', 'COM_CONTENT_TOGGLE_TO_UNFEATURE'),
);
$state = JArrayHelper::getValue($states, (int) $value, $states[1]);
$html = JHtml::_('image','admin/'.$state[0], JText::_($state[2]), NULL, true);
$html = JHtml::_('image', 'admin/'.$state[0], JText::_($state[2]), NULL, true);
if ($canChange) {
$html = '<a href="#" onclick="return listItemTask(\'cb'.$i.'\',\''.$state[1].'\')" title="'.JText::_($state[3]).'">'
. $html.'</a>';

View File

@ -276,7 +276,7 @@ class ContentModelArticle extends JModelAdmin
$registry->loadString($item->urls);
$item->urls = $registry->toArray();
$item->articletext = trim($item->fulltext) != '' ? $item->introtext . "<hr id=\"system-readmore\" />" . $item->fulltext : $item->introtext;
}
@ -383,7 +383,7 @@ class ContentModelArticle extends JModelAdmin
}
// Alter the title for save as copy
if (JRequest::getVar('task') == 'save2copy') {
list($title,$alias) = $this->generateNewTitle($data['catid'], $data['alias'], $data['title']);
list($title, $alias) = $this->generateNewTitle($data['catid'], $data['alias'], $data['title']);
$data['title'] = $title;
$data['alias'] = $alias;
}
@ -394,7 +394,7 @@ class ContentModelArticle extends JModelAdmin
$this->featured($this->getState($this->getName().'.id'), $data['featured']);
}
return true;
}

View File

@ -85,7 +85,7 @@ class ContentModelArticles extends JModelList
$categoryId = $this->getUserStateFromRequest($this->context.'.filter.category_id', 'filter_category_id');
$this->setState('filter.category_id', $categoryId);
$level = $this->getUserStateFromRequest($this->context.'.filter.level', 'filter_level', 0, 'int');
$this->setState('filter.level', $level);
@ -204,7 +204,7 @@ class ContentModelArticles extends JModelList
$categoryId = implode(',', $categoryId);
$query->where('a.catid IN ('.$categoryId.')');
}
// Filter on the level.
if ($level = $this->getState('filter.level')) {
$query->where('c.level <= '.((int) $level + (int) $baselevel - 1));

View File

@ -104,10 +104,10 @@ endif;
</div>
<div class="width-40 fltrt">
<?php echo JHtml::_('sliders.start','content-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.start', 'content-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php // Do not show the publishing options if the edit form is configured not to. ?>
<?php if ($params['show_publishing_options'] || ( $params['show_publishing_options'] = '' && !empty($editoroptions)) ): ?>
<?php echo JHtml::_('sliders.panel',JText::_('COM_CONTENT_FIELDSET_PUBLISHING'), 'publishing-details'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTENT_FIELDSET_PUBLISHING'), 'publishing-details'); ?>
<fieldset class="panelform">
<ul class="adminformlist">
<li><?php echo $this->form->getLabel('created_by'); ?>
@ -155,7 +155,7 @@ endif;
// handled separately below. ?>
<?php if ($name != 'editorConfig' && $name != 'basic-limited') : ?>
<?php echo JHtml::_('sliders.panel',JText::_($fieldSet->label), $name.'-options'); ?>
<?php echo JHtml::_('sliders.panel', JText::_($fieldSet->label), $name.'-options'); ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="tip"><?php echo $this->escape(JText::_($fieldSet->description));?></p>
<?php endif; ?>
@ -179,7 +179,7 @@ endif;
<?php // We need to make a separate space for the configuration
// so that those fields always show to those wih permissions ?>
<?php if ( $this->canDo->get('core.admin') ): ?>
<?php echo JHtml::_('sliders.panel',JText::_('COM_CONTENT_SLIDER_EDITOR_CONFIG'), 'configure-sliders'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTENT_SLIDER_EDITOR_CONFIG'), 'configure-sliders'); ?>
<fieldset class="panelform" >
<ul class="adminformlist">
<?php foreach ($this->form->getFieldset('editorConfig') as $field) : ?>
@ -193,7 +193,7 @@ endif;
<?php // The url and images fields only show if the configuration is set to allow them. ?>
<?php // This is for legacy reasons. ?>
<?php if ($params['show_urls_images_backend']): ?>
<?php echo JHtml::_('sliders.panel',JText::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES'), 'urls_and_images-options'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES'), 'urls_and_images-options'); ?>
<fieldset class="panelform">
<ul class="adminformlist">
<li>
@ -219,7 +219,7 @@ endif;
</ul>
</fieldset>
<?php endif; ?>
<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'meta-options'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'meta-options'); ?>
<fieldset class="panelform">
<?php echo $this->loadTemplate('metadata'); ?>
@ -229,9 +229,9 @@ endif;
<div class="clr"></div>
<?php if ($this->canDo->get('core.admin')): ?>
<div class="width-100 fltlft">
<?php echo JHtml::_('sliders.start','permissions-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.start', 'permissions-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.panel',JText::_('COM_CONTENT_FIELDSET_RULES'), 'access-rules'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTENT_FIELDSET_RULES'), 'access-rules'); ?>
<fieldset class="panelform">
<?php echo $this->form->getLabel('rules'); ?>
<?php echo $this->form->getInput('rules'); ?>

View File

@ -43,7 +43,7 @@ $saveOrder = $listOrder == 'a.ordering';
<option value=""><?php echo JText::_('JOPTION_SELECT_MAX_LEVELS');?></option>
<?php echo JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level'));?>
</select>
<select name="filter_access" class="inputbox" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOPTION_SELECT_ACCESS');?></option>
<?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));?>
@ -173,14 +173,14 @@ $saveOrder = $listOrder == 'a.ordering';
<?php echo $this->escape($item->author_name); ?>
</td>
<td class="center nowrap">
<?php echo JHtml::_('date',$item->created, JText::_('DATE_FORMAT_LC4')); ?>
<?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')); ?>
</td>
<td class="center">
<?php echo (int) $item->hits; ?>
</td>
<td class="center">
<?php if ($item->language=='*'):?>
<?php echo JText::alt('JALL','language'); ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>

View File

@ -98,13 +98,13 @@ $listDirn = $this->escape($this->state->get('list.direction'));
</td>
<td class="center">
<?php if ($item->language=='*'):?>
<?php echo JText::alt('JALL','language'); ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>
</td>
<td class="center nowrap">
<?php echo JHtml::_('date',$item->created, JText::_('DATE_FORMAT_LC4')); ?>
<?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')); ?>
</td>
<td class="center">
<?php echo (int) $item->id; ?>

View File

@ -41,7 +41,7 @@ class ContentViewArticles extends JView
JError::raiseError(500, implode("\n", $errors));
return false;
}
// Levels filter.
$options = array();
$options[] = JHtml::_('select.option', '1', JText::_('J1'));
@ -95,7 +95,7 @@ class ContentViewArticles extends JView
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'articles.delete','JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
}
elseif ($canDo->get('core.edit.state')) {

View File

@ -152,14 +152,14 @@ $saveOrder = $listOrder == 'fp.ordering';
<?php echo $this->escape($item->author_name); ?>
</td>
<td class="center nowrap">
<?php echo JHtml::_('date',$item->created, JText::_('DATE_FORMAT_LC4')); ?>
<?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')); ?>
</td>
<td class="center">
<?php echo (int) $item->hits; ?>
</td>
<td class="center">
<?php if ($item->language=='*'):?>
<?php echo JText::alt('JALL','language'); ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>

View File

@ -64,7 +64,7 @@ class ContentViewFeatured extends JView
JToolBarHelper::divider();
JToolBarHelper::archiveList('articles.archive');
JToolBarHelper::checkin('articles.checkin');
JToolBarHelper::custom('featured.delete','remove.png','remove_f2.png','JTOOLBAR_REMOVE', true);
JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
}
if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {

View File

@ -11,17 +11,17 @@ defined('_JEXEC') or die;
?>
<?php
echo JHtml::_('sliders.start','panel-sliders',array('useCookie'=>'1'));
echo JHtml::_('sliders.start', 'panel-sliders', array('useCookie'=>'1'));
foreach ($this->modules as $module) {
$output = JModuleHelper::renderModule($module);
$params = new JRegistry;
$params->loadString($module->params);
if ($params->get('automatic_title','0')=='0') {
if ($params->get('automatic_title', '0')=='0') {
echo JHtml::_('sliders.panel', $module->title, 'cpanel-panel-'.$module->name);
}
elseif (method_exists('mod'.$module->name.'Helper','getTitle')) {
echo JHtml::_('sliders.panel', call_user_func_array(array('mod'.$module->name.'Helper','getTitle'), array($params)), 'cpanel-panel-'.$module->name);
elseif (method_exists('mod'.$module->name.'Helper', 'getTitle')) {
echo JHtml::_('sliders.panel', call_user_func_array(array('mod'.$module->name.'Helper', 'getTitle'), array($params)), 'cpanel-panel-'.$module->name);
}
else {
echo JHtml::_('sliders.panel', JText::_('MOD_'.$module->name.'_TITLE'), 'cpanel-panel-'.$module->name);

View File

@ -94,13 +94,13 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
if (substr($word, -1) == 's')
{
self::_replace($word, 'sses', 'ss')
OR self::_replace($word, 'ies', 'i')
OR self::_replace($word, 'ss', 'ss')
OR self::_replace($word, 's', '');
or self::_replace($word, 'ies', 'i')
or self::_replace($word, 'ss', 'ss')
or self::_replace($word, 's', '');
}
// Part b
if (substr($word, -2, 1) != 'e' OR !self::_replace($word, 'eed', 'ee', 0))
if (substr($word, -2, 1) != 'e' or !self::_replace($word, 'eed', 'ee', 0))
{
// First rule
$v = self::$_regex_vowel;
@ -108,17 +108,17 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
// ing and ed
// Note use of && and OR, for precedence reasons
if (preg_match("#$v+#", substr($word, 0, -3)) && self::_replace($word, 'ing', '')
OR preg_match("#$v+#", substr($word, 0, -2)) && self::_replace($word, 'ed', ''))
or preg_match("#$v+#", substr($word, 0, -2)) && self::_replace($word, 'ed', ''))
{
// If one of above two test successful
if (!self::_replace($word, 'at', 'ate') AND !self::_replace($word, 'bl', 'ble') AND !self::_replace($word, 'iz', 'ize'))
if (!self::_replace($word, 'at', 'ate') and !self::_replace($word, 'bl', 'ble') and !self::_replace($word, 'iz', 'ize'))
{
// Double consonant ending
if (self::_doubleConsonant($word) AND substr($word, -2) != 'll' AND substr($word, -2) != 'ss' AND substr($word, -2) != 'zz')
if (self::_doubleConsonant($word) and substr($word, -2) != 'll' and substr($word, -2) != 'ss' and substr($word, -2) != 'zz')
{
$word = substr($word, 0, -1);
}
elseif (self::_m($word) == 1 AND self::_cvc($word))
elseif (self::_m($word) == 1 and self::_cvc($word))
{
$word .= 'e';
}
@ -165,11 +165,11 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
{
case 'a':
self::_replace($word, 'ational', 'ate', 0)
OR self::_replace($word, 'tional', 'tion', 0);
or self::_replace($word, 'tional', 'tion', 0);
break;
case 'c':
self::_replace($word, 'enci', 'ence', 0)
OR self::_replace($word, 'anci', 'ance', 0);
or self::_replace($word, 'anci', 'ance', 0);
break;
case 'e':
self::_replace($word, 'izer', 'ize', 0);
@ -179,26 +179,26 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
break;
case 'l':
self::_replace($word, 'entli', 'ent', 0)
OR self::_replace($word, 'ousli', 'ous', 0)
OR self::_replace($word, 'alli', 'al', 0)
OR self::_replace($word, 'bli', 'ble', 0)
OR self::_replace($word, 'eli', 'e', 0);
or self::_replace($word, 'ousli', 'ous', 0)
or self::_replace($word, 'alli', 'al', 0)
or self::_replace($word, 'bli', 'ble', 0)
or self::_replace($word, 'eli', 'e', 0);
break;
case 'o':
self::_replace($word, 'ization', 'ize', 0)
OR self::_replace($word, 'ation', 'ate', 0)
OR self::_replace($word, 'ator', 'ate', 0);
or self::_replace($word, 'ation', 'ate', 0)
or self::_replace($word, 'ator', 'ate', 0);
break;
case 's':
self::_replace($word, 'iveness', 'ive', 0)
OR self::_replace($word, 'fulness', 'ful', 0)
OR self::_replace($word, 'ousness', 'ous', 0)
OR self::_replace($word, 'alism', 'al', 0);
or self::_replace($word, 'fulness', 'ful', 0)
or self::_replace($word, 'ousness', 'ous', 0)
or self::_replace($word, 'alism', 'al', 0);
break;
case 't':
self::_replace($word, 'biliti', 'ble', 0)
OR self::_replace($word, 'aliti', 'al', 0)
OR self::_replace($word, 'iviti', 'ive', 0);
or self::_replace($word, 'aliti', 'al', 0)
or self::_replace($word, 'iviti', 'ive', 0);
break;
}
@ -226,7 +226,7 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
break;
case 't':
self::_replace($word, 'icate', 'ic', 0)
OR self::_replace($word, 'iciti', 'ic', 0);
or self::_replace($word, 'iciti', 'ic', 0);
break;
case 'u':
self::_replace($word, 'ful', '', 0);
@ -260,7 +260,7 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
break;
case 'c':
self::_replace($word, 'ance', '', 1)
OR self::_replace($word, 'ence', '', 1);
or self::_replace($word, 'ence', '', 1);
break;
case 'e':
self::_replace($word, 'er', '', 1);
@ -270,16 +270,16 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
break;
case 'l':
self::_replace($word, 'able', '', 1)
OR self::_replace($word, 'ible', '', 1);
or self::_replace($word, 'ible', '', 1);
break;
case 'n':
self::_replace($word, 'ant', '', 1)
OR self::_replace($word, 'ement', '', 1)
OR self::_replace($word, 'ment', '', 1)
OR self::_replace($word, 'ent', '', 1);
or self::_replace($word, 'ement', '', 1)
or self::_replace($word, 'ment', '', 1)
or self::_replace($word, 'ent', '', 1);
break;
case 'o':
if (substr($word, -4) == 'tion' OR substr($word, -4) == 'sion')
if (substr($word, -4) == 'tion' or substr($word, -4) == 'sion')
{
self::_replace($word, 'ion', '', 1);
}
@ -293,7 +293,7 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
break;
case 't':
self::_replace($word, 'ate', '', 1)
OR self::_replace($word, 'iti', '', 1);
or self::_replace($word, 'iti', '', 1);
break;
case 'u':
self::_replace($word, 'ous', '', 1);
@ -337,7 +337,7 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
}
// Part b
if (self::_m($word) > 1 AND self::_doubleConsonant($word) AND substr($word, -1) == 'l')
if (self::_m($word) > 1 and self::_doubleConsonant($word) and substr($word, -1) == 'l')
{
$word = substr($word, 0, -1);
}
@ -367,7 +367,7 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
if (substr($str, $len) == $check)
{
$substr = substr($str, 0, $len);
if (is_null($m) OR self::_m($substr) > $m)
if (is_null($m) or self::_m($substr) > $m)
{
$str = $substr . $repl;
}
@ -419,7 +419,7 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
{
$c = self::$_regex_consonant;
return preg_match("#$c{2}$#", $str, $matches) AND $matches[0]{0} == $matches[0]{1};
return preg_match("#$c{2}$#", $str, $matches) and $matches[0]{0} == $matches[0]{1};
}
/**
@ -436,6 +436,6 @@ class FinderIndexerStemmerPorter_En extends FinderIndexerStemmer
$c = self::$_regex_consonant;
$v = self::$_regex_vowel;
return preg_match("#($c$v$c)$#", $str, $matches) AND strlen($matches[1]) == 3 AND $matches[1]{2} != 'w' AND $matches[1]{2} != 'x' AND $matches[1]{2} != 'y';
return preg_match("#($c$v$c)$#", $str, $matches) and strlen($matches[1]) == 3 and $matches[1]{2} != 'w' and $matches[1]{2} != 'x' and $matches[1]{2} != 'y';
}
}

View File

@ -148,4 +148,4 @@ class FinderHelperLanguage
}
}
}
}

View File

@ -116,7 +116,7 @@ Joomla.submitbutton = function(pressbutton) {
<?php echo JHtml::_('grid.id', $i, $item->link_id); ?>
</td>
<td>
<?php if (intval($item->publish_start_date) OR intval($item->publish_end_date) OR intval($item->start_date) OR intval($item->end_date)) : ?>
<?php if (intval($item->publish_start_date) or intval($item->publish_end_date) or intval($item->start_date) or intval($item->end_date)) : ?>
<img src="<?php echo JURI::root();?>/media/com_finder/images/calendar.png" style="border:1px;float:right" class="hasTip" title="<?php echo JText::sprintf('COM_FINDER_INDEX_DATE_INFO', $item->publish_start_date, $item->publish_end_date, $item->start_date, $item->end_date);?>" />
<?php endif; ?>
<?php echo $this->escape($item->title); ?>

View File

@ -24,4 +24,4 @@ JHtml::_('behavior.keepalive');
<div id="finder-progress-container"></div>
<input id="finder-indexer-token" type="hidden" name="<?php echo JFactory::getSession()->getFormToken(); ?>" value="1" />
</div>
</div>

View File

@ -33,7 +33,7 @@ defined('_JEXEC') or die;
</tr>
</thead>
<tbody>
<?php foreach ($this->data->type_list AS $type) :?>
<?php foreach ($this->data->type_list as $type) :?>
<tr>
<td>
<?php echo $type->type_title;?>

View File

@ -25,6 +25,6 @@ class InstallerControllerDatabase extends JController
{
$model = $this->getModel('database');
$model->fix();
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=database',false));
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=database', false));
}
}

View File

@ -24,7 +24,7 @@ class InstallerControllerDiscover extends JController
{
$model = $this->getModel('discover');
$model->discover();
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=discover',false));
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=discover', false));
}
/**
@ -36,7 +36,7 @@ class InstallerControllerDiscover extends JController
{
$model = $this->getModel('discover');
$model->discover_install();
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=discover',false));
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=discover', false));
}
/**
@ -48,6 +48,6 @@ class InstallerControllerDiscover extends JController
{
$model = $this->getModel('discover');
$model->purge();
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=discover',false), $model->_message);
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=discover', false), $model->_message);
}
}

View File

@ -36,7 +36,7 @@ class InstallerControllerInstall extends JController
$app = JFactory::getApplication();
$redirect_url = $app->getUserState('com_installer.redirect_url');
if(empty($redirect_url)) {
$redirect_url = JRoute::_('index.php?option=com_installer&view=install',false);
$redirect_url = JRoute::_('index.php?option=com_installer&view=install', false);
} else
{
// wipe out the user state when we're going to redirect

View File

@ -66,7 +66,7 @@ class InstallerControllerManage extends JController
}
}
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=manage',false));
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=manage', false));
}
/**
@ -85,7 +85,7 @@ class InstallerControllerManage extends JController
JArrayHelper::toInteger($eid, array());
$result = $model->remove($eid);
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=manage',false));
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=manage', false));
}
/**
@ -105,6 +105,6 @@ class InstallerControllerManage extends JController
JArrayHelper::toInteger($uid, array());
$result = $model->refresh($uid);
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=manage',false));
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=manage', false));
}
}

View File

@ -37,7 +37,7 @@ class InstallerControllerUpdate extends JController {
$app = JFactory::getApplication();
$redirect_url = $app->getUserState('com_installer.redirect_url');
if(empty($redirect_url)) {
$redirect_url = JRoute::_('index.php?option=com_installer&view=update',false);
$redirect_url = JRoute::_('index.php?option=com_installer&view=update', false);
} else
{
// wipe out the user state when we're going to redirect
@ -66,7 +66,7 @@ class InstallerControllerUpdate extends JController {
// Find updates
$model = $this->getModel('update');
$result = $model->findUpdates(0, $cache_timeout);
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=update',false));
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=update', false));
//$view->display();
}
@ -83,9 +83,9 @@ class InstallerControllerUpdate extends JController {
$model = $this->getModel('update');
$model->purge();
$model->enableSites();
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=update',false), $model->_message);
$this->setRedirect(JRoute::_('index.php?option=com_installer&view=update', false), $model->_message);
}
/**
* Fetch and report updates in JSON format, for AJAX requests
*
@ -98,10 +98,10 @@ class InstallerControllerUpdate extends JController {
// Note: we don't do a token check as we're fetching information
// asynchronously. This means that between requests the token might
// change, making it impossible for AJAX to work.
$eid = JRequest::getInt('eid', 0);
$skip = JRequest::getVar('skip', array(), 'default', 'array');
$cache_timeout = JRequest::getInt('cache_timeout', 0);
if($cache_timeout == 0) {
jimport('joomla.application.component.helper');
@ -110,7 +110,7 @@ class InstallerControllerUpdate extends JController {
$cache_timeout = $params->get('cachetimeout', 6, 'int');
$cache_timeout = 3600 * $cache_timeout;
}
$model = $this->getModel('update');
$result = $model->findUpdates($eid, $cache_timeout);
@ -120,18 +120,18 @@ class InstallerControllerUpdate extends JController {
$model->setState('filter.extension_id', $eid);
}
$updates = $model->getItems();
if(!empty($skip)) {
$unfiltered_updates = $updates;
$updates = array();
foreach($unfiltered_updates as $update) {
if(!in_array($update->extension_id, $skip)) $updates[] = $update;
}
}
echo json_encode($updates);
JFactory::getApplication()->close();
}
}

View File

@ -33,11 +33,11 @@ class InstallerModelDatabase extends InstallerModel
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
$this->setState('message',$app->getUserState('com_installer.message'));
$this->setState('extension_message',$app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message','');
$app->setUserState('com_installer.extension_message','');
parent::populateState('name','asc');
$this->setState('message', $app->getUserState('com_installer.message'));
$this->setState('extension_message', $app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message', '');
$app->setUserState('com_installer.extension_message', '');
parent::populateState('name', 'asc');
}
public function fix()

View File

@ -33,11 +33,11 @@ class InstallerModelDiscover extends InstallerModel
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
$this->setState('message',$app->getUserState('com_installer.message'));
$this->setState('extension_message',$app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message','');
$app->setUserState('com_installer.extension_message','');
parent::populateState('name','asc');
$this->setState('message', $app->getUserState('com_installer.message'));
$this->setState('extension_message', $app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message', '');
$app->setUserState('com_installer.extension_message', '');
parent::populateState('name', 'asc');
}
/**
@ -102,7 +102,7 @@ class InstallerModelDiscover extends InstallerModel
{
$app = JFactory::getApplication();
$installer = JInstaller::getInstance();
$eid = JRequest::getVar('cid',0);
$eid = JRequest::getVar('cid', 0);
if (is_array($eid) || $eid) {
if (!is_array($eid)) {
$eid = array($eid);

View File

@ -51,10 +51,10 @@ class InstallerModelInstall extends JModel
// Initialise variables.
$app = JFactory::getApplication('administrator');
$this->setState('message',$app->getUserState('com_installer.message'));
$this->setState('extension_message',$app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message','');
$app->setUserState('com_installer.extension_message','');
$this->setState('message', $app->getUserState('com_installer.message'));
$this->setState('extension_message', $app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message', '');
$app->setUserState('com_installer.extension_message', '');
// Recall the 'Install from Directory' path.
$path = $app->getUserStateFromRequest($this->_context.'.install_directory', 'install_directory', $app->getCfg('tmp_path'));

View File

@ -64,10 +64,10 @@ class InstallerModelManage extends InstallerModel
$app->setUserState($this->context.'.data', array('filters'=>$filters));
}
$this->setState('message',$app->getUserState('com_installer.message'));
$this->setState('extension_message',$app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message','');
$app->setUserState('com_installer.extension_message','');
$this->setState('message', $app->getUserState('com_installer.message'));
$this->setState('extension_message', $app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message', '');
$app->setUserState('com_installer.extension_message', '');
$this->setState('filter.search', isset($filters['search']) ? $filters['search'] : '');
$this->setState('filter.hideprotected', isset($filters['hideprotected']) ? $filters['hideprotected'] : 0);

View File

@ -54,10 +54,10 @@ class InstallerModelUpdate extends JModelList
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication('administrator');
$this->setState('message',$app->getUserState('com_installer.message'));
$this->setState('extension_message',$app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message','');
$app->setUserState('com_installer.extension_message','');
$this->setState('message', $app->getUserState('com_installer.message'));
$this->setState('extension_message', $app->getUserState('com_installer.extension_message'));
$app->setUserState('com_installer.message', '');
$app->setUserState('com_installer.extension_message', '');
parent::populateState('name', 'asc');
}
@ -74,7 +74,7 @@ class InstallerModelUpdate extends JModelList
// grab updates ignoring new installs
$query->select('*')->from('#__updates')->where('extension_id != 0');
$query->order($this->getState('list.ordering').' '.$this->getState('list.direction'));
// Filter by extension_id
if ($eid = $this->getState('filter.extension_id')) {
$query->where($db->nq('extension_id') . ' = ' . $db->q((int) $eid));
@ -116,7 +116,7 @@ class InstallerModelUpdate extends JModelList
$query->set($db->nq('last_check_timestamp').' = '.$db->q(0));
$db->setQuery($query);
$db->query();
$this->_message = JText::_('COM_INSTALLER_PURGED_UPDATES');
return true;
} else {

View File

@ -13,21 +13,21 @@ defined('_JEXEC') or die;
?>
<form action="<?php echo JRoute::_('index.php?option=com_installer&view=warnings');?>" method="post" name="adminForm" id="adminForm">
<?php
$errors = count($this->errors);
if (!strncmp($this->schemaVersion, JVERSION, 5) === 0) :
$errors++;
endif;
<?php
$errors = count($this->errors);
if (!strncmp($this->schemaVersion, JVERSION, 5) === 0) :
$errors++;
endif;
?>
<?php if ($errors === 0) : ?>
<p class="nowarning"><?php echo JText::_('COM_INSTALLER_MSG_DATABASE_OK'); ?></p>
<?php echo JHtml::_('sliders.start', 'database-sliders', array('useCookie'=>1)); ?>
<?php else : ?>
<p class="warning"><?php echo JText::_('COM_INSTALLER_MSG_DATABASE_ERRORS'); ?></p>
<?php echo JHtml::_('sliders.start', 'database-sliders', array('useCookie'=>1)); ?>
<?php $panelName = JText::plural('COM_INSTALLER_MSG_N_DATABASE_ERROR_PANEL', $errors); ?>
<?php echo JHtml::_('sliders.panel', $panelName, 'error-panel'); ?>
<fieldset class="panelform">
@ -35,7 +35,7 @@ defined('_JEXEC') or die;
<?php if (!strncmp($this->schemaVersion, JVERSION, 5) === 0) : ?>
<li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_ERROR', $this->schemaVersion, JVERSION); ?></li>
<?php endif; ?>
<?php foreach($this->errors as $line => $error) : ?>
<?php $key = 'COM_INSTALLER_MSG_DATABASE_' . $error->queryType;
$msgs = $error->msgElements;
@ -49,7 +49,7 @@ defined('_JEXEC') or die;
</fieldset>
<?php endif; ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_INSTALLER_MSG_DATABASE_INFO'),'furtherinfo-pane'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_INSTALLER_MSG_DATABASE_INFO'), 'furtherinfo-pane'); ?>
<fieldset class="panelform">
<ul>
<li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_VERSION', $this->schemaVersion); ?></li>

View File

@ -48,7 +48,7 @@ class InstallerViewDatabase extends InstallerViewDefault
/*
* Set toolbar items for the page
*/
JToolBarHelper::custom('database.fix', 'refresh', 'refresh','COM_INSTALLER_TOOLBAR_DATABASE_FIX',false, false);
JToolBarHelper::custom('database.fix', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_DATABASE_FIX', false, false);
JToolBarHelper::divider();
parent::addToolbar();
JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_DATABASE');

View File

@ -24,7 +24,7 @@ defined('_JEXEC') or die;
<?php if (!$this->item->element) : ?>
<strong>X</strong>
<?php else : ?>
<a href="index.php?option=com_installer&amp;type=manage&amp;task=<?php echo $this->item->task; ?>&amp;eid[]=<?php echo $this->item->extension_id; ?>&amp;limitstart=<?php echo $this->pagination->limitstart; ?>&amp;<?php echo JSession::getFormToken();?>=1"><?php echo JHtml::_('image','images/'.$this->item->img, $this->item->alt, array('title' => $this->item->action)); ?></a>
<a href="index.php?option=com_installer&amp;type=manage&amp;task=<?php echo $this->item->task; ?>&amp;eid[]=<?php echo $this->item->extension_id; ?>&amp;limitstart=<?php echo $this->pagination->limitstart; ?>&amp;<?php echo JSession::getFormToken();?>=1"><?php echo JHtml::_('image', 'images/'.$this->item->img, $this->item->alt, array('title' => $this->item->action)); ?></a>
<?php endif; ?>
</td>
<td class="center"><?php echo @$this->item->folder != '' ? $this->item->folder : 'N/A'; ?></td>

View File

@ -45,8 +45,8 @@ class InstallerViewDiscover extends InstallerViewDefault
* Set toolbar items for the page
*/
JToolBarHelper::custom('discover.install', 'upload', 'upload', 'JTOOLBAR_INSTALL', true, false);
JToolBarHelper::custom('discover.refresh', 'refresh', 'refresh','COM_INSTALLER_TOOLBAR_DISCOVER',false,false);
JToolBarHelper::custom('discover.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false,false);
JToolBarHelper::custom('discover.refresh', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_DISCOVER', false, false);
JToolBarHelper::custom('discover.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false);
JToolBarHelper::divider();
parent::addToolbar();
JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_DISCOVER');

View File

@ -67,7 +67,7 @@ class InstallerViewManage extends InstallerViewDefault
JToolBarHelper::unpublish('manage.unpublish', 'JTOOLBAR_DISABLE', true);
JToolBarHelper::divider();
}
JToolBarHelper::custom('manage.refresh', 'refresh', 'refresh', 'JTOOLBAR_REFRESH_CACHE',true);
JToolBarHelper::custom('manage.refresh', 'refresh', 'refresh', 'JTOOLBAR_REFRESH_CACHE', true);
JToolBarHelper::divider();
if ($canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'manage.remove', 'JTOOLBAR_UNINSTALL');

View File

@ -46,8 +46,8 @@ class InstallerViewUpdate extends InstallerViewDefault
$canDo = InstallerHelper::getActions();
JToolBarHelper::custom('update.update', 'upload', 'upload', 'COM_INSTALLER_TOOLBAR_UPDATE', true, false);
JToolBarHelper::custom('update.find', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_FIND_UPDATES',false,false);
JToolBarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false,false);
JToolBarHelper::custom('update.find', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_FIND_UPDATES', false, false);
JToolBarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false);
JToolBarHelper::divider();
parent::addToolbar();
JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATE');

View File

@ -18,10 +18,10 @@ if (!count($this->messages)) {
} else {
echo JHtml::_('sliders.start', 'warning-sliders', array('useCookie'=>1));
foreach($this->messages as $message) {
echo JHtml::_('sliders.panel', $message['message'], str_replace(' ','', $message['message']));
echo JHtml::_('sliders.panel', $message['message'], str_replace(' ', '', $message['message']));
echo '<div style="padding: 5px;" >'.$message['description'].'</div>';
}
echo JHtml::_('sliders.panel', JText::_('COM_INSTALLER_MSG_WARNINGFURTHERINFO'),'furtherinfo-pane');
echo JHtml::_('sliders.panel', JText::_('COM_INSTALLER_MSG_WARNINGFURTHERINFO'), 'furtherinfo-pane');
echo '<div style="padding: 5px;" >'. JText::_('COM_INSTALLER_MSG_WARNINGFURTHERINFODESC') .'</div>';
echo JHtml::_('sliders.end');
}

View File

@ -37,6 +37,6 @@ class LanguagesControllerInstalled extends JController
}
$client = $model->getClient();
$clientId = $model->getState('filter.client_id');
$this->setredirect('index.php?option=com_languages&view=installed&client='.$clientId,$msg,$type);
$this->setredirect('index.php?option=com_languages&view=installed&client='.$clientId, $msg, $type);
}
}

View File

@ -191,4 +191,4 @@ class LanguagesControllerOverride extends JControllerForm
$app->setUserState($context.'.data', null);
$this->setRedirect(JRoute::_('index.php?option='.$this->option.'&view='.$this->view_list.$this->getRedirectToListAppend(), false));
}
}
}

View File

@ -65,4 +65,4 @@ class LanguagesControllerOverrides extends JControllerAdmin
$this->setRedirect(JRoute::_('index.php?option='.$this->option.'&view='.$this->view_list, false));
}
}
}

View File

@ -59,4 +59,4 @@ class LanguagesControllerStrings extends JControllerAdmin
{
echo new JJsonResponse($this->getModel('strings')->search());
}
}
}

View File

@ -25,7 +25,7 @@ abstract class JHtmlLanguages {
public static function published($published)
{
if ($published) {
return JHtml::_('image','menu/icon-16-default.png', JText::_('COM_LANGUAGES_HEADING_DEFAULT'), NULL, true);
return JHtml::_('image', 'menu/icon-16-default.png', JText::_('COM_LANGUAGES_HEADING_DEFAULT'), NULL, true);
}
else {
return '&#160;';
@ -40,7 +40,7 @@ abstract class JHtmlLanguages {
*
* @return string html code
*/
public static function id($rowNum,$language)
public static function id($rowNum, $language)
{
return '<input type="radio" id="cb'.$rowNum.'" name="cid" value="'.htmlspecialchars($language).'" onclick="isChecked(this.checked);" title="'.($rowNum+1).'"/>';
}

View File

@ -123,4 +123,4 @@ class JJsonResponse
{
return json_encode($this);
}
}
}

View File

@ -156,4 +156,4 @@ class LanguagesHelper
return str_replace('"', '"_QQ_"', $filter->clean($value));
}
}
}

View File

@ -191,7 +191,7 @@ class LanguagesModelInstalled extends JModelList
$row->checked_out = 0;
$data[] = $row;
}
usort($data,array($this,'compareLanguages'));
usort($data, array($this, 'compareLanguages'));
// Prepare data
$limit = $this->getState('list.limit');
@ -333,7 +333,7 @@ class LanguagesModelInstalled extends JModelList
if (is_null($this->folders)) {
$path = $this->getPath();
jimport('joomla.filesystem.folder');
$this->folders = JFolder::folders($path, '.', false, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'pdf_fonts','overrides'));
$this->folders = JFolder::folders($path, '.', false, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'pdf_fonts', 'overrides'));
}
return $this->folders;
@ -364,8 +364,8 @@ class LanguagesModelInstalled extends JModelList
* @return integer
* @since 1.6
*/
protected function compareLanguages($lang1,$lang2)
protected function compareLanguages($lang1, $lang2)
{
return strcmp($lang1->name,$lang2->name);
return strcmp($lang1->name, $lang2->name);
}
}

View File

@ -37,7 +37,7 @@ class LanguagesModelLanguages extends JModelList
'image', 'a.image',
'published', 'a.published',
'ordering', 'a.ordering',
'home','l.home',
'home', 'l.home',
);
}

View File

@ -178,4 +178,4 @@ class LanguagesModelOverride extends JModelAdmin
$language = $app->getUserStateFromRequest('com_languages.overrides.filter.language', 'filter_language', 'en-GB', 'cmd');
$this->setState('filter.language', $language);
}
}
}

View File

@ -260,4 +260,4 @@ class LanguagesModelOverrides extends JModelList
return count($cids);
}
}
}

View File

@ -99,7 +99,7 @@ class LanguagesModelStrings extends JModel
try
{
$this->_db->setQuery($query.' (constant, string, file) VALUES '.implode(',',$values));
$this->_db->setQuery($query.' (constant, string, file) VALUES '.implode(',', $values));
if (!$this->_db->query())
{
return new Exception($this->_db->getErrorMsg());
@ -170,4 +170,4 @@ class LanguagesModelStrings extends JModel
return $results;
}
}
}

View File

@ -74,7 +74,7 @@ $clientId = $this->state->get('filter.client_id', 0);
<?php echo $this->pagination->getRowOffset($i); ?>
</td>
<td width="20">
<?php echo JHtml::_('languages.id',$i,$row->language);?>
<?php echo JHtml::_('languages.id', $i, $row->language);?>
</td>
<td width="25%">
<?php echo $this->escape($row->name); ?>

View File

@ -62,9 +62,9 @@ $canDo = LanguagesHelper::getActions();
</fieldset>
</div>
<div class="width-40 fltrt">
<?php echo JHtml::_('sliders.start','language-sliders-'.$this->item->lang_code, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.start', 'language-sliders-'.$this->item->lang_code, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'metadata'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'metadata'); ?>
<fieldset class="adminform">
<?php foreach($this->form->getFieldset('metadata') as $field): ?>
<?php if (!$field->hidden): ?>
@ -74,7 +74,7 @@ $canDo = LanguagesHelper::getActions();
<?php endforeach; ?>
</fieldset>
<?php echo JHtml::_('sliders.panel',JText::_('COM_LANGUAGES_FIELDSET_SITE_NAME_LABEL'), 'site_name'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_LANGUAGES_FIELDSET_SITE_NAME_LABEL'), 'site_name'); ?>
<fieldset class="adminform">
<?php foreach($this->form->getFieldset('site_name') as $field): ?>
<?php if (!$field->hidden): ?>

View File

@ -70,7 +70,7 @@ class LanguagesViewLanguages extends JView
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'languages.delete','JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolBarHelper::trash('languages.trash');

View File

@ -26,7 +26,7 @@ $notice_switchers = !$this->switchers && ($this->homes > 1 || $this->language_fi
<?php if ($notice_homes) : ?>
<tr>
<td>
<?php echo JHtml::_('image','menu/icon-16-alert.png', JText::_('WARNING'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-alert.png', JText::_('WARNING'), NULL, true); ?>
</td>
<td>
<?php echo JText::_('COM_LANGUAGES_MULTILANGSTATUS_HOMES_MISSING'); ?>
@ -36,7 +36,7 @@ $notice_switchers = !$this->switchers && ($this->homes > 1 || $this->language_fi
<?php if ($notice_disabled) : ?>
<tr>
<td>
<?php echo JHtml::_('image','menu/icon-16-alert.png', JText::_('WARNING'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-alert.png', JText::_('WARNING'), NULL, true); ?>
</td>
<td>
<?php echo JText::_('COM_LANGUAGES_MULTILANGSTATUS_LANGUAGEFILTER_DISABLED'); ?>
@ -46,7 +46,7 @@ $notice_switchers = !$this->switchers && ($this->homes > 1 || $this->language_fi
<?php if ($notice_switchers) : ?>
<tr>
<td>
<?php echo JHtml::_('image','menu/icon-16-alert.png', JText::_('WARNING'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-alert.png', JText::_('WARNING'), NULL, true); ?>
</td>
<td>
<?php echo JText::_('COM_LANGUAGES_MULTILANGSTATUS_LANGSWITCHER_UNPUBLISHED'); ?>
@ -57,7 +57,7 @@ $notice_switchers = !$this->switchers && ($this->homes > 1 || $this->language_fi
<?php if (array_key_exists($contentlang->lang_code, $this->homepages) && (!array_key_exists($contentlang->lang_code, $this->site_langs) || !$contentlang->published)) : ?>
<tr>
<td>
<?php echo JHtml::_('image','menu/icon-16-alert.png', JText::_('WARNING'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-alert.png', JText::_('WARNING'), NULL, true); ?>
</td>
<td>
<?php echo JText::sprintf('COM_LANGUAGES_MULTILANGSTATUS_ERROR_CONTENT_LANGUAGE', $contentlang->lang_code); ?>
@ -68,7 +68,7 @@ $notice_switchers = !$this->switchers && ($this->homes > 1 || $this->language_fi
<?php if ($this->listUsersError) : ?>
<tr>
<td>
<?php echo JHtml::_('image','menu/icon-16-notice.png', JText::_('NOTICE'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-notice.png', JText::_('NOTICE'), NULL, true); ?>
</td>
<td>
<?php echo JText::_('COM_LANGUAGES_MULTILANGSTATUS_CONTACTS_ERROR_TIP'); ?>
@ -161,12 +161,12 @@ $notice_switchers = !$this->switchers && ($this->homes > 1 || $this->language_fi
<?php if ($status->element) : ?>
<tr>
<td>
<?php echo ($status->element); ?>
<?php echo $status->element; ?>
</td>
<?php endif; ?>
<?php if ($status->element) : // Published Site languages ?>
<td class="center">
<?php echo JHtml::_('image','admin/tick.png', JText::_('JON'), NULL, true); ?>
<?php echo JHtml::_('image', 'admin/tick.png', JText::_('JON'), NULL, true); ?>
</td>
<?php else : ?>
<td class="center">
@ -175,20 +175,20 @@ $notice_switchers = !$this->switchers && ($this->homes > 1 || $this->language_fi
<?php endif; ?>
<?php if ($status->lang_code && $status->published) : // Published Content languages ?>
<td class="center">
<?php echo JHtml::_('image','admin/tick.png', JText::_('JON'), NULL, true); ?>
<?php echo JHtml::_('image', 'admin/tick.png', JText::_('JON'), NULL, true); ?>
</td>
<?php else : ?>
<td class="center">
<?php echo JHtml::_('image','menu/icon-16-notice.png', JText::_('JON'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-notice.png', JText::_('JON'), NULL, true); ?>
</td>
<?php endif; ?>
<?php if ($status->home_language) : // Published Home pages ?>
<td class="center">
<?php echo JHtml::_('image','admin/tick.png', JText::_('JON'), NULL, true); ?>
<?php echo JHtml::_('image', 'admin/tick.png', JText::_('JON'), NULL, true); ?>
</td>
<?php else : ?>
<td class="center">
<?php echo JHtml::_('image','menu/icon-16-deny.png', JText::_('WARNING'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-deny.png', JText::_('WARNING'), NULL, true); ?>
</td>
<?php endif; ?>
</tr>
@ -200,22 +200,22 @@ $notice_switchers = !$this->switchers && ($this->homes > 1 || $this->language_fi
<?php echo $contentlang->lang_code; ?>
</td>
<td class="center">
<?php echo JHtml::_('image','menu/icon-16-notice.png', JText::_('NOTICE'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-notice.png', JText::_('NOTICE'), NULL, true); ?>
</td>
<td class="center">
<?php if ($contentlang->published) : ?>
<?php echo JHtml::_('image','admin/tick.png', JText::_('JON'), NULL, true); ?>
<?php echo JHtml::_('image', 'admin/tick.png', JText::_('JON'), NULL, true); ?>
<?php elseif (!$contentlang->published && array_key_exists($contentlang->lang_code, $this->homepages)) : ?>
<?php echo JHtml::_('image','menu/icon-16-deny.png', JText::_('WARNING'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-deny.png', JText::_('WARNING'), NULL, true); ?>
<?php elseif (!$contentlang->published) : ?>
<?php echo JHtml::_('image','menu/icon-16-notice.png', JText::_('NOTICE'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-notice.png', JText::_('NOTICE'), NULL, true); ?>
<?php endif; ?>
</td>
<td class="center">
<?php if (!array_key_exists($contentlang->lang_code, $this->homepages)) : ?>
<?php echo JHtml::_('image','menu/icon-16-notice.png', JText::_('NOTICE'), NULL, true); ?>
<?php echo JHtml::_('image', 'menu/icon-16-notice.png', JText::_('NOTICE'), NULL, true); ?>
<?php else : ?>
<?php echo JHtml::_('image','admin/tick.png', JText::_('JON'), NULL, true); ?>
<?php echo JHtml::_('image', 'admin/tick.png', JText::_('JON'), NULL, true); ?>
<?php endif; ?>
</td>
<?php endif; ?>

View File

@ -85,4 +85,4 @@ JHtml::_('behavior.keepalive');
<?php echo JHtml::_('form.token'); ?>
</div>
<div class="clr"></div>
</form>
</form>

View File

@ -126,4 +126,4 @@ class LanguagesViewOverride extends JView
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES_EDIT');
}
}
}

View File

@ -101,4 +101,4 @@ $listDirn = $this->escape($this->state->get('list.direction')); ?>
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
</form>

View File

@ -111,4 +111,4 @@ class LanguagesViewOverrides extends JView
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES');
}
}
}

View File

@ -131,7 +131,7 @@ class LoginModelLogin extends JModel
$query->from('#__modules AS m');
$query->where('m.module =' . $db->Quote('mod_login') .' AND m.client_id = 1');
$query->join('LEFT','#__extensions AS e ON e.element = m.module AND e.client_id = m.client_id');
$query->join('LEFT', '#__extensions AS e ON e.element = m.module AND e.client_id = m.client_id');
$query->where('e.enabled = 1');
// Filter by language

View File

@ -97,7 +97,7 @@ class MediaControllerFile extends JController
else
{
// Trigger the onContentAfterSave event.
$dispatcher->trigger('onContentAfterSave', array('com_media.file', &$object_file,true));
$dispatcher->trigger('onContentAfterSave', array('com_media.file', &$object_file, true));
$this->setMessage(JText::sprintf('COM_MEDIA_UPLOAD_COMPLETE', substr($file['filepath'], strlen(COM_MEDIA_BASE))));
return true;
}
@ -133,7 +133,7 @@ class MediaControllerFile extends JController
$this->setRedirect('index.php?option=com_media&folder='.$folder);
}
if (!$user->authorise('core.delete','com_media'))
if (!$user->authorise('core.delete', 'com_media'))
{
// User is not authorised to delete
JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'));
@ -181,7 +181,7 @@ class MediaControllerFile extends JController
}
elseif (is_dir($fullPath))
{
if (count(JFolder::files($fullPath, '.', true, false, array('.svn', 'CVS','.DS_Store','__MACOSX'), array('index.html', '^\..*','.*~'))) == 0)
if (count(JFolder::files($fullPath, '.', true, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array('index.html', '^\..*', '.*~'))) == 0)
{
// Trigger the onContentBeforeDelete event.
$result = $dispatcher->trigger('onContentBeforeDelete', array('com_media.folder', &$object_file));
@ -200,7 +200,7 @@ class MediaControllerFile extends JController
else
{
//This makes no sense...
JError::raiseWarning(100, JText::sprintf('COM_MEDIA_ERROR_UNABLE_TO_DELETE_FOLDER_NOT_EMPTY',substr($fullPath, strlen(COM_MEDIA_BASE))));
JError::raiseWarning(100, JText::sprintf('COM_MEDIA_ERROR_UNABLE_TO_DELETE_FOLDER_NOT_EMPTY', substr($fullPath, strlen(COM_MEDIA_BASE))));
}
}
}

View File

@ -44,7 +44,7 @@ class MediaControllerFolder extends JController
$this->setRedirect('index.php?option=com_media&folder='.$folder);
}
if (!$user->authorise('core.delete','com_media'))
if (!$user->authorise('core.delete', 'com_media'))
{
// User is not authorised to delete
JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'));
@ -88,7 +88,7 @@ class MediaControllerFolder extends JController
}
elseif (is_dir($fullPath))
{
if (count(JFolder::files($fullPath, '.', true, false, array('.svn', 'CVS','.DS_Store','__MACOSX'), array('index.html', '^\..*','.*~'))) == 0)
if (count(JFolder::files($fullPath, '.', true, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array('index.html', '^\..*', '.*~'))) == 0)
{
// Trigger the onContentBeforeDelete event.
$result = $dispatcher->trigger('onContentBeforeDelete', array('com_media.folder', &$object_file));
@ -107,7 +107,7 @@ class MediaControllerFolder extends JController
else
{
//This makes no sense...
JError::raiseWarning(100, JText::sprintf('COM_MEDIA_ERROR_UNABLE_TO_DELETE_FOLDER_NOT_EMPTY',substr($fullPath, strlen(COM_MEDIA_BASE))));
JError::raiseWarning(100, JText::sprintf('COM_MEDIA_ERROR_UNABLE_TO_DELETE_FOLDER_NOT_EMPTY', substr($fullPath, strlen(COM_MEDIA_BASE))));
}
}
}
@ -137,7 +137,7 @@ class MediaControllerFolder extends JController
if (strlen($folder) > 0)
{
if (!$user->authorise('core.create','com_media'))
if (!$user->authorise('core.create', 'com_media'))
{
// User is not authorised to delete
JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_CREATE_NOT_PERMITTED'));

View File

@ -20,7 +20,7 @@ abstract class MediaHelper
public static function isImage($fileName)
{
static $imageTypes = 'xcf|odg|gif|jpg|png|bmp';
return preg_match("/\.(?:$imageTypes)$/i",$fileName);
return preg_match("/\.(?:$imageTypes)$/i", $fileName);
}
/**
@ -60,7 +60,7 @@ abstract class MediaHelper
$allowable = explode(',', $params->get('upload_extensions'));
$ignored = explode(',', $params->get('ignore_extensions'));
if (!in_array($format, $allowable) && !in_array($format,$ignored))
if (!in_array($format, $allowable) && !in_array($format, $ignored))
{
$err = 'COM_MEDIA_ERROR_WARNFILETYPE';
return false;
@ -75,7 +75,7 @@ abstract class MediaHelper
$user = JFactory::getUser();
$imginfo = null;
if ($params->get('restrict_uploads',1)) {
if ($params->get('restrict_uploads', 1)) {
$images = explode(',', $params->get('image_extensions'));
if (in_array($format, $images)) { // if its an image run it through getimagesize
// if tmp_name is empty, then the file was bigger than the PHP limit
@ -92,7 +92,7 @@ abstract class MediaHelper
// if its not an image...and we're not ignoring it
$allowed_mime = explode(',', $params->get('upload_mime'));
$illegal_mime = explode(',', $params->get('upload_mime_illegal'));
if (function_exists('finfo_open') && $params->get('check_mime',1)) {
if (function_exists('finfo_open') && $params->get('check_mime', 1)) {
// We have fileinfo
$finfo = finfo_open(FILEINFO_MIME);
$type = finfo_file($finfo, $file['tmp_name']);
@ -101,7 +101,7 @@ abstract class MediaHelper
return false;
}
finfo_close($finfo);
} elseif (function_exists('mime_content_type') && $params->get('check_mime',1)) {
} elseif (function_exists('mime_content_type') && $params->get('check_mime', 1)) {
// we have mime magic
$type = mime_content_type($file['tmp_name']);
if (strlen($type) && !in_array($type, $allowed_mime) && in_array($type, $illegal_mime)) {
@ -115,8 +115,8 @@ abstract class MediaHelper
}
}
$xss_check = JFile::read($file['tmp_name'],false,256);
$html_tags = array('abbr','acronym','address','applet','area','audioscope','base','basefont','bdo','bgsound','big','blackface','blink','blockquote','body','bq','br','button','caption','center','cite','code','col','colgroup','comment','custom','dd','del','dfn','dir','div','dl','dt','em','embed','fieldset','fn','font','form','frame','frameset','h1','h2','h3','h4','h5','h6','head','hr','html','iframe','ilayer','img','input','ins','isindex','keygen','kbd','label','layer','legend','li','limittext','link','listing','map','marquee','menu','meta','multicol','nobr','noembed','noframes','noscript','nosmartquotes','object','ol','optgroup','option','param','plaintext','pre','rt','ruby','s','samp','script','select','server','shadow','sidebar','small','spacer','span','strike','strong','style','sub','sup','table','tbody','td','textarea','tfoot','th','thead','title','tr','tt','ul','var','wbr','xml','xmp','!DOCTYPE', '!--');
$xss_check = JFile::read($file['tmp_name'], false, 256);
$html_tags = array('abbr', 'acronym', 'address', 'applet', 'area', 'audioscope', 'base', 'basefont', 'bdo', 'bgsound', 'big', 'blackface', 'blink', 'blockquote', 'body', 'bq', 'br', 'button', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'comment', 'custom', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'fn', 'font', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'keygen', 'kbd', 'label', 'layer', 'legend', 'li', 'limittext', 'link', 'listing', 'map', 'marquee', 'menu', 'meta', 'multicol', 'nobr', 'noembed', 'noframes', 'noscript', 'nosmartquotes', 'object', 'ol', 'optgroup', 'option', 'param', 'plaintext', 'pre', 'rt', 'ruby', 's', 'samp', 'script', 'select', 'server', 'shadow', 'sidebar', 'small', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'tt', 'ul', 'var', 'wbr', 'xml', 'xmp', '!DOCTYPE', '!--');
foreach($html_tags as $tag) {
// A tag is '<tagname ', so we need to add < and a space or '<tagname>'
if (stristr($xss_check, '<'.$tag.' ') || stristr($xss_check, '<'.$tag.'>')) {

View File

@ -31,11 +31,11 @@ $params = JComponentHelper::getParams('com_media');
require_once JPATH_COMPONENT.'/helpers/media.php';
// Set the path definitions
$popup_upload = JRequest::getCmd('pop_up',null);
$popup_upload = JRequest::getCmd('pop_up', null);
$path = "file_path";
$view = JRequest::getCmd('view');
if (substr(strtolower($view),0,6) == "images" || $popup_upload == 1) {
if (substr(strtolower($view), 0, 6) == "images" || $popup_upload == 1) {
$path = "image_path";
}

View File

@ -63,7 +63,7 @@ class MediaModelManager extends JModel
$document->setTitle(JText::_('COM_MEDIA_INSERT_IMAGE'));
// Build the array of select options for the folder list
$options[] = JHtml::_('select.option', "","/");
$options[] = JHtml::_('select.option', "", "/");
foreach ($folders as $folder)
{
@ -114,7 +114,7 @@ class MediaModelManager extends JModel
$node = (object) array('name' => $name, 'relative' => $relative, 'absolute' => $absolute);
$tmp = &$tree;
for ($i=0,$n=count($path); $i<$n; $i++)
for ($i=0, $n=count($path); $i<$n; $i++)
{
if (!isset($tmp['children'])) {
$tmp['children'] = array();

View File

@ -16,7 +16,7 @@ echo $params->get('image_path', 'images');?>/';
</script>
<form action="index.php?option=com_media&amp;asset=<?php echo JRequest::getCmd('asset');?>&amp;author=<?php echo JRequest::getCmd('author');?>" id="imageForm" method="post" enctype="multipart/form-data">
<div id="messages" style="display: none;">
<span id="message"></span><?php echo JHtml::_('image','media/dots.gif', '...', array('width' =>22, 'height' => 12), true)?>
<span id="message"></span><?php echo JHtml::_('image', 'media/dots.gif', '...', array('width' =>22, 'height' => 12), true)?>
</div>
<fieldset>
<div class="fltlft">
@ -94,10 +94,10 @@ echo $params->get('image_path', 'images');?>/';
</ul>
<div class="clr"> </div>
<p class="overall-title"></p>
<?php echo JHtml::_('image','media/bar.gif', JText::_('COM_MEDIA_OVERALL_PROGRESS'), array('class' => 'progress overall-progress'), true); ?>
<?php echo JHtml::_('image', 'media/bar.gif', JText::_('COM_MEDIA_OVERALL_PROGRESS'), array('class' => 'progress overall-progress'), true); ?>
<div class="clr"> </div>
<p class="current-title"></p>
<?php echo JHtml::_('image','media/bar.gif', JText::_('COM_MEDIA_CURRENT_PROGRESS'), array('class' => 'progress current-progress'), true); ?>
<?php echo JHtml::_('image', 'media/bar.gif', JText::_('COM_MEDIA_CURRENT_PROGRESS'), array('class' => 'progress current-progress'), true); ?>
<p class="current-text"></p>
</div>
<ul class="upload-queue" id="upload-queue">

View File

@ -26,11 +26,11 @@ class MediaViewImages extends JView
$append = '';
JHtml::_('behavior.framework', true);
JHtml::_('script','media/popup-imagemanager.js', true, true);
JHtml::_('stylesheet','media/popup-imagemanager.css', array(), true);
JHtml::_('script', 'media/popup-imagemanager.js', true, true);
JHtml::_('stylesheet', 'media/popup-imagemanager.css', array(), true);
if ($lang->isRTL()) {
JHtml::_('stylesheet','media/popup-imagemanager_rtl.css', array(), true);
JHtml::_('stylesheet', 'media/popup-imagemanager_rtl.css', array(), true);
}
if ($config->get('enable_flash', 1)) {
@ -54,7 +54,7 @@ class MediaViewImages extends JView
$filterTypes .= '*.'.$type;
}
$typeString = '{ \''.JText::_('COM_MEDIA_FILES','true').' ('.$displayTypes.')\': \''.$filterTypes.'\' }';
$typeString = '{ \''.JText::_('COM_MEDIA_FILES', 'true').' ('.$displayTypes.')\': \''.$filterTypes.'\' }';
JHtml::_('behavior.uploader', 'upload-flash',
array(
@ -62,7 +62,7 @@ class MediaViewImages extends JView
'onComplete' => 'function(){ window.frames[\'imageframe\'].location.href = window.frames[\'imageframe\'].location.href; }',
'targetURL' => '\\document.id(\'uploadForm\').action',
'typeFilter' => $typeString,
'fileSizeMax' => (int) ($config->get('upload_maxsize',0) * 1024 * 1024),
'fileSizeMax' => (int) ($config->get('upload_maxsize', 0) * 1024 * 1024),
)
);
}

View File

@ -12,12 +12,12 @@ defined('_JEXEC') or die;
<?php if (count($this->images) > 0 || count($this->folders) > 0) { ?>
<div class="manager">
<?php for ($i=0,$n=count($this->folders); $i<$n; $i++) :
<?php for ($i=0, $n=count($this->folders); $i<$n; $i++) :
$this->setFolder($i);
echo $this->loadTemplate('folder');
endfor; ?>
<?php for ($i=0,$n=count($this->images); $i<$n; $i++) :
<?php for ($i=0, $n=count($this->images); $i<$n; $i++) :
$this->setImage($i);
echo $this->loadTemplate('image');
endfor; ?>

View File

@ -11,6 +11,6 @@ defined('_JEXEC') or die;
?>
<div class="item">
<a href="index.php?option=com_media&amp;view=imagesList&amp;tmpl=component&amp;folder=<?php echo $this->_tmp_folder->path_relative; ?>&amp;asset=<?php echo JRequest::getCmd('asset');?>&amp;author=<?php echo JRequest::getCmd('author');?>">
<?php echo JHtml::_('image','media/folder.gif', $this->_tmp_folder->name, array('height' => 80, 'width' => 80), true); ?>
<?php echo JHtml::_('image', 'media/folder.gif', $this->_tmp_folder->name, array('height' => 80, 'width' => 80), true); ?>
<span><?php echo $this->_tmp_folder->name; ?></span></a>
</div>

Some files were not shown because too many files have changed in this diff Show More