Permalink
Browse files

Merge branch 'master' into template9

Conflicts:
	administrator/components/com_config/views/component/tmpl/default.php
	administrator/components/com_content/views/article/tmpl/edit.php
	administrator/components/com_media/views/media/tmpl/default.php
	administrator/modules/mod_status/tmpl/default.php
	installation/controllers/setup.json.php
	libraries/cms/html/bootstrap.php
  • Loading branch information...
2 parents b210111 + 4266920 commit 6c805d1d6ee074371000bae8b38f401c417184cb @realityking realityking committed Aug 16, 2012
Showing with 265 additions and 155 deletions.
  1. +68 −28 administrator/components/com_admin/models/sysinfo.php
  2. +4 −3 administrator/components/com_banners/controllers/banner.php
  3. +2 −1 administrator/components/com_config/views/component/tmpl/default.php
  4. +4 −3 administrator/components/com_contact/views/contacts/tmpl/modal.php
  5. +4 −3 administrator/components/com_content/views/article/tmpl/edit.php
  6. +7 −4 administrator/components/com_content/views/articles/tmpl/modal.php
  7. +3 −1 administrator/components/com_cpanel/views/cpanel/view.html.php
  8. +6 −5 administrator/components/com_media/views/images/tmpl/default.php
  9. +2 −1 administrator/components/com_media/views/imageslist/tmpl/default_folder.php
  10. +2 −1 administrator/components/com_media/views/media/tmpl/default.php
  11. +2 −1 administrator/components/com_menus/views/item/view.html.php
  12. +8 −7 administrator/components/com_menus/views/menu/view.html.php
  13. +8 −8 administrator/components/com_modules/views/positions/tmpl/modal.php
  14. +3 −3 administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php
  15. +8 −7 administrator/components/com_templates/views/prevuuw/view.html.php
  16. +3 −2 administrator/components/com_templates/views/template/tmpl/default.php
  17. +4 −4 administrator/components/com_users/views/users/tmpl/modal.php
  18. +1 −1 administrator/modules/mod_submenu/tmpl/default.php
  19. +3 −1 administrator/templates/hathor/html/com_categories/category/edit.php
  20. +3 −3 administrator/templates/hathor/html/com_contact/contacts/modal.php
  21. +5 −4 administrator/templates/hathor/html/com_content/article/edit.php
  22. +7 −4 administrator/templates/hathor/html/com_content/articles/modal.php
  23. +8 −8 administrator/templates/hathor/html/com_modules/positions/modal.php
  24. +3 −3 administrator/templates/hathor/html/com_newsfeeds/newsfeeds/modal.php
  25. +4 −4 administrator/templates/hathor/html/com_users/users/modal.php
  26. +1 −1 components/com_contact/views/category/view.feed.php
  27. +10 −10 components/com_mailto/controller.php
  28. +10 −10 components/com_mailto/views/mailto/view.html.php
  29. +4 −0 installation/CHANGELOG
  30. +5 −5 installation/controllers/setup.json.php
  31. +2 −2 libraries/joomla/archive/zip.php
  32. +3 −3 libraries/joomla/database/driver.php
  33. +1 −1 libraries/joomla/database/driver/pdo.php
  34. +6 −7 libraries/joomla/database/factory.php
  35. +32 −0 libraries/joomla/http/http.php
  36. +14 −1 libraries/joomla/input/input.php
  37. +5 −5 modules/mod_articles_category/helper.php
@@ -168,62 +168,102 @@ public function getDirectory()
$this->directories = array();
$registry = JFactory::getConfig();
- jimport('joomla.filesystem.folder');
$cparams = JComponentHelper::getParams('com_media');
- $this->_addDirectory('administrator/components', JPATH_ADMINISTRATOR.'/components');
- $this->_addDirectory('administrator/language', JPATH_ADMINISTRATOR.'/language');
+ $this->_addDirectory('administrator/components', JPATH_ADMINISTRATOR . '/components');
+ $this->_addDirectory('administrator/language', JPATH_ADMINISTRATOR . '/language');
// List all admin languages
- $admin_langs = JFolder::folders(JPATH_ADMINISTRATOR.'/language');
- foreach($admin_langs as $alang) {
- $this->_addDirectory('administrator/language/' . $alang, JPATH_ADMINISTRATOR.'/language/'.$alang);
+ $admin_langs = new DirectoryIterator(JPATH_ADMINISTRATOR . '/language');
+ foreach ($admin_langs as $alang)
+ {
+ if (!$alang->isDir() || $alang->isDot())
+ {
+ continue;
+ }
+
+ $name = $alang->getFilename();
+
+ $this->_addDirectory('administrator/language/' . $name, JPATH_ADMINISTRATOR . '/language/' . $name);
}
// List all manifests folders
- $manifests = JFolder::folders(JPATH_ADMINISTRATOR.'/manifests');
- foreach($manifests as $_manifest) {
- $this->_addDirectory('administrator/manifests/' . $_manifest, JPATH_ADMINISTRATOR.'/manifests/'.$_manifest);
+ $manifests = new DirectoryIterator(JPATH_ADMINISTRATOR . '/manifests');
+ foreach ($manifests as $manifest)
+ {
+ if (!$manifest->isDir() || $manifest->isDot())
+ {
+ continue;
+ }
+
+ $name = $manifest->getFilename();
+
+ $this->_addDirectory('administrator/manifests/' . $name, JPATH_ADMINISTRATOR . '/manifests/' . $name);
}
- $this->_addDirectory('administrator/modules', JPATH_ADMINISTRATOR.'/modules');
+ $this->_addDirectory('administrator/modules', JPATH_ADMINISTRATOR . '/modules');
$this->_addDirectory('administrator/templates', JPATH_THEMES);
- $this->_addDirectory('components', JPATH_SITE.'/components');
+ $this->_addDirectory('components', JPATH_SITE . '/components');
- $this->_addDirectory($cparams->get('image_path'), JPATH_SITE.'/'.$cparams->get('image_path'));
+ $this->_addDirectory($cparams->get('image_path'), JPATH_SITE . '/' . $cparams->get('image_path'));
- $image_folders = JFolder::folders(JPATH_SITE.'/'.$cparams->get('image_path'));
// List all images folders
- foreach ($image_folders as $folder) {
- $this->_addDirectory('images/' . $folder, JPATH_SITE.'/'.$cparams->get('image_path').'/'.$folder);
+ $image_folders = new DirectoryIterator(JPATH_SITE . '/' . $cparams->get('image_path'));
+ foreach ($image_folders as $folder)
+ {
+ if (!$folder->isDir() || $folder->isDot())
+ {
+ continue;
+ }
+
+ $name = $manifest->getFilename();
+
+ $this->_addDirectory('images/' . $name, JPATH_SITE . '/' . $cparams->get('image_path') . '/' . $name);
}
- $this->_addDirectory('language', JPATH_SITE.'/language');
+ $this->_addDirectory('language', JPATH_SITE . '/language');
+
// List all site languages
- $site_langs = JFolder::folders(JPATH_SITE . '/language');
- foreach ($site_langs as $slang) {
- $this->_addDirectory('language/' . $slang, JPATH_SITE.'/language/'.$slang);
+ $site_langs = new DirectoryIterator(JPATH_SITE . '/language');
+ foreach ($site_langs as $alang)
+ {
+ if (!$alang->isDir() || $alang->isDot())
+ {
+ continue;
+ }
+
+ $name = $alang->getFilename();
+
+ $this->_addDirectory('language/' . $name, JPATH_SITE . '/language/' . $name);
}
$this->_addDirectory('libraries', JPATH_LIBRARIES);
- $this->_addDirectory('media', JPATH_SITE.'/media');
- $this->_addDirectory('modules', JPATH_SITE.'/modules');
+ $this->_addDirectory('media', JPATH_SITE . '/media');
+ $this->_addDirectory('modules', JPATH_SITE . '/modules');
$this->_addDirectory('plugins', JPATH_PLUGINS);
- $plugin_groups = JFolder::folders(JPATH_PLUGINS);
- foreach ($plugin_groups as $folder) {
- $this->_addDirectory('plugins/' . $folder, JPATH_PLUGINS.'/'.$folder);
+ $plugin_groups = new DirectoryIterator(JPATH_SITE . '/language');
+ foreach ($plugin_groups as $folder)
+ {
+ if (!$alang->isDir() || $alang->isDot())
+ {
+ continue;
+ }
+
+ $name = $alang->getFilename();
+
+ $this->_addDirectory('plugins/' . $name, JPATH_PLUGINS . '/' . $name);
}
- $this->_addDirectory('templates', JPATH_SITE.'/templates');
- $this->_addDirectory('configuration.php', JPATH_CONFIGURATION.'/configuration.php');
+ $this->_addDirectory('templates', JPATH_SITE . '/templates');
+ $this->_addDirectory('configuration.php', JPATH_CONFIGURATION . '/configuration.php');
$this->_addDirectory('cache', JPATH_SITE.'/cache', 'COM_ADMIN_CACHE_DIRECTORY');
$this->_addDirectory('administrator/cache', JPATH_CACHE, 'COM_ADMIN_CACHE_DIRECTORY');
- $this->_addDirectory($registry->get('log_path', JPATH_ROOT . '/log'), $registry->get('log_path', JPATH_ROOT.'/log'), 'COM_ADMIN_LOG_DIRECTORY');
- $this->_addDirectory($registry->get('tmp_path', JPATH_ROOT . '/tmp'), $registry->get('tmp_path', JPATH_ROOT.'/tmp'), 'COM_ADMIN_TEMP_DIRECTORY');
+ $this->_addDirectory($registry->get('log_path', JPATH_ROOT . '/log'), $registry->get('log_path', JPATH_ROOT . '/log'), 'COM_ADMIN_LOG_DIRECTORY');
+ $this->_addDirectory($registry->get('tmp_path', JPATH_ROOT . '/tmp'), $registry->get('tmp_path', JPATH_ROOT . '/tmp'), 'COM_ADMIN_TEMP_DIRECTORY');
}
return $this->directories;
}
@@ -36,9 +36,10 @@ class BannersControllerBanner extends JControllerForm
protected function allowAdd($data = array())
{
// Initialise variables.
- $user = JFactory::getUser();
- $categoryId = JArrayHelper::getValue($data, 'catid', JRequest::getInt('filter_category_id'), 'int');
- $allow = null;
+ $user = JFactory::getUser();
+ $filter = $this->input->getInt('filter_category_id');
+ $categoryId = JArrayHelper::getValue($data, 'catid', $filter, 'int');
+ $allow = null;
if ($categoryId)
{
@@ -9,7 +9,8 @@
defined('_JEXEC') or die;
-$template = JFactory::getApplication()->getTemplate();
+$app = JFactory::getApplication();
+$template = $app->getTemplate();
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
@@ -12,9 +12,10 @@
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
-$function = JRequest::getCmd('function', 'jSelectContact');
-$listOrder = $this->escape($this->state->get('list.ordering'));
-$listDirn = $this->escape($this->state->get('list.direction'));
+$input = JFactory::getApplication()->input;
+$function = $input->getCmd('function', 'jSelectContact');
+$listOrder = $this->escape($this->state->get('list.ordering'));
+$listDirn = $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_contact&view=contacts&layout=modal&tmpl=component');?>" method="post" name="adminForm" id="adminForm" class="form-inline">
<fieldset class="filter clearfix">
@@ -18,13 +18,14 @@
JHtml::_('behavior.keepalive');
// Create shortcut to parameters.
- $params = $this->state->get('params');
-
- $params = $params->toArray();
+$params = $this->state->get('params');
+$params = $params->toArray();
// This checks if the config options have ever been saved. If they haven't they will fall back to the original settings.
$editoroptions = isset($params['show_publishing_options']);
+$input = JFactory::getApplication()->input;
+
if (!$editoroptions):
$params['show_publishing_options'] = '1';
$params['show_article_options'] = '1';
@@ -9,7 +9,10 @@
defined('_JEXEC') or die;
-if (JFactory::getApplication()->isSite()) {
+$app = JFactory::getApplication();
+
+if ($app->isSite())
+{
JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN'));
}
@@ -18,9 +21,9 @@
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
-$function = JRequest::getCmd('function', 'jSelectArticle');
-$listOrder = $this->escape($this->state->get('list.ordering'));
-$listDirn = $this->escape($this->state->get('list.direction'));
+$function = $app->input->getCmd('function', 'jSelectArticle');
+$listOrder = $this->escape($this->state->get('list.ordering'));
+$listDirn = $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_content&view=articles&layout=modal&tmpl=component&function='.$function.'&'.JSession::getFormToken().'=1');?>" method="post" name="adminForm" id="adminForm" class="form-inline">
<fieldset class="filter clearfix">
@@ -26,11 +26,13 @@ public function display($tpl = null)
JToolbarHelper::title(JText::_('COM_CPANEL'), 'cpanel.png');
JToolbarHelper::help('screen.cpanel');
+ $input = JFactory::getApplication()->input;
+
/*
* Set the template - this will display cpanel.php
* from the selected admin template.
*/
- JRequest::setVar('tmpl', 'cpanel');
+ $input->set('tmpl', 'cpanel');
// Display the cpanel modules
$this->modules = JModuleHelper::getModules('cpanel');
@@ -9,13 +9,14 @@
defined('_JEXEC') or die;
-$user = JFactory::getUser();
+$user = JFactory::getUser();
+$input = JFactory::getApplication()->input;
?>
<script type='text/javascript'>
var image_base_path = '<?php $params = JComponentHelper::getParams('com_media');
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">
+<form action="index.php?option=com_media&amp;asset=<?php echo $input->getCmd('asset');?>&amp;author=<?php echo $input->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)?>
</div>
@@ -31,7 +32,7 @@
</div>
</fieldset>
- <iframe id="imageframe" name="imageframe" src="index.php?option=com_media&amp;view=imagesList&amp;tmpl=component&amp;folder=<?php echo $this->state->folder?>&amp;asset=<?php echo JRequest::getCmd('asset');?>&amp;author=<?php echo JRequest::getCmd('author');?>"></iframe>
+ <iframe id="imageframe" name="imageframe" src="index.php?option=com_media&amp;view=imagesList&amp;tmpl=component&amp;folder=<?php echo $this->state->folder?>&amp;asset=<?php echo $input->getCmd('asset');?>&amp;author=<?php echo $input->getCmd('author');?>"></iframe>
<fieldset>
<table class="properties">
@@ -78,7 +79,7 @@
</form>
<?php if ($user->authorise('core.create', 'com_media')): ?>
- <form action="<?php echo JURI::base(); ?>index.php?option=com_media&amp;task=file.upload&amp;tmpl=component&amp;<?php echo $this->session->getName() . '=' . $this->session->getId(); ?>&amp;<?php echo JSession::getFormToken();?>=1&amp;asset=<?php echo JRequest::getCmd('asset');?>&amp;author=<?php echo JRequest::getCmd('author');?>&amp;format=<?php echo $this->config->get('enable_flash') == '1' ? 'json' : '' ?>&amp;view=images" id="uploadForm" name="uploadForm" method="post" enctype="multipart/form-data">
+ <form action="<?php echo JURI::base(); ?>index.php?option=com_media&amp;task=file.upload&amp;tmpl=component&amp;<?php echo $this->session->getName() . '=' . $this->session->getId(); ?>&amp;<?php echo JSession::getFormToken();?>=1&amp;asset=<?php echo $input->getCmd('asset');?>&amp;author=<?php echo $input->getCmd('author');?>&amp;format=<?php echo $this->config->get('enable_flash') == '1' ? 'json' : '' ?>&amp;view=images" id="uploadForm" name="uploadForm" method="post" enctype="multipart/form-data">
<fieldset id="uploadform">
<legend><?php echo $this->config->get('upload_maxsize') == '0' ? JText::_('COM_MEDIA_UPLOAD_FILES_NOLIMIT') : JText::sprintf('COM_MEDIA_UPLOAD_FILES', $this->config->get('upload_maxsize')); ?></legend>
<fieldset id="upload-noflash" class="actions">
@@ -104,7 +105,7 @@
<ul class="upload-queue" id="upload-queue">
<li style="display: none"></li>
</ul>
- <input type="hidden" name="return-url" value="<?php echo base64_encode('index.php?option=com_media&view=images&tmpl=component&fieldid='.JRequest::getCmd('fieldid', '').'&e_name='.JRequest::getCmd('e_name').'&asset='.JRequest::getCmd('asset').'&author='.JRequest::getCmd('author')); ?>" />
+ <input type="hidden" name="return-url" value="<?php echo base64_encode('index.php?option=com_media&view=images&tmpl=component&fieldid=' . $input->getCmd('fieldid', '') . '&e_name=' . $input->getCmd('e_name') . '&asset=' . JRequest::getCmd('asset') . '&author=' . $input->getCmd('author')); ?>" />
</fieldset>
</form>
<?php endif; ?>
@@ -9,9 +9,10 @@
defined('_JEXEC') or die;
+$input = JFactory::getApplication()->input;
?>
<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');?>">
+ <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 $input->getCmd('asset');?>&amp;author=<?php echo $input->getCmd('author');?>">
<?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>
@@ -9,7 +9,8 @@
defined('_JEXEC') or die;
-$user = JFactory::getUser();
+$user = JFactory::getUser();
+$input = JFactory::getApplication()->input;
?>
<div class="row-fluid">
<!-- Begin Sidebar -->
@@ -53,7 +53,8 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
- JRequest::setVar('hidemainmenu', true);
+ $input = JFactory::getApplication()->input;
+ $input->set('hidemainmenu', true);
$user = JFactory::getUser();
$isNew = ($this->item->id == 0);
@@ -29,9 +29,9 @@ class MenusViewMenu extends JViewLegacy
*/
public function display($tpl = null)
{
- $this->form = $this->get('Form');
- $this->item = $this->get('Item');
- $this->state = $this->get('State');
+ $this->form = $this->get('Form');
+ $this->item = $this->get('Item');
+ $this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
@@ -50,11 +50,12 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
- JRequest::setVar('hidemainmenu', true);
+ $input = JFactory::getApplication()->input;
+ $input->set('hidemainmenu', true);
- $user = JFactory::getUser();
- $isNew = ($this->item->id == 0);
- $canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
+ $user = JFactory::getUser();
+ $isNew = ($this->item->id == 0);
+ $canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
JToolbarHelper::title(JText::_($isNew ? 'COM_MENUS_VIEW_NEW_MENU_TITLE' : 'COM_MENUS_VIEW_EDIT_MENU_TITLE'), 'menu.png');
@@ -12,14 +12,14 @@
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
-$function = JRequest::getCmd('function', 'jSelectPosition');
-$lang = JFactory::getLanguage();
-$ordering = $this->escape($this->state->get('list.ordering'));
-$direction = $this->escape($this->state->get('list.direction'));
-$clientId = $this->state->get('filter.client_id');
-$state = $this->state->get('filter.state');
-$template = $this->state->get('filter.template');
-$type = $this->state->get('filter.type');
+$function = JFactory::getApplication()->input->getCmd('function', 'jSelectPosition');
+$lang = JFactory::getLanguage();
+$ordering = $this->escape($this->state->get('list.ordering'));
+$direction = $this->escape($this->state->get('list.direction'));
+$clientId = $this->state->get('filter.client_id');
+$state = $this->state->get('filter.state');
+$template = $this->state->get('filter.template');
+$type = $this->state->get('filter.type');
?>
<form action="<?php echo JRoute::_('index.php?option=com_modules&view=positions&layout=modal&tmpl=component&function='.$function.'&client_id=' .$clientId);?>" method="post" name="adminForm" id="adminForm">
<fieldset class="filter clearfix">
@@ -12,9 +12,9 @@
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
-$function = JRequest::getCmd('function', 'jSelectNewsfeed');
-$listOrder = $this->escape($this->state->get('list.ordering'));
-$listDirn = $this->escape($this->state->get('list.direction'));
+$function = JFactory::getApplication()->input->getCmd('function', 'jSelectNewsfeed');
+$listOrder = $this->escape($this->state->get('list.ordering'));
+$listDirn = $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component');?>" method="post" name="adminForm" id="adminForm" class="form-inline">
<fieldset class="filter clearfix">
@@ -35,16 +35,17 @@ class TemplatesViewPrevuuw extends JViewLegacy
*/
public function display($tpl = null)
{
-
require_once JPATH_COMPONENT.'/helpers/templates.php';
+ $input = JFactory::getApplication()->input;
+
// Initialise some variables
- $this->client = JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int'));
- $this->id = JRequest::getVar('id', '', 'method', 'int');
- $this->option = JRequest::getCmd('option');
- $this->template = TemplatesHelper::getTemplateName($this->id);
- $this->tp = true;
- $this->url = $client->id ? JURI::base() : JURI::root();
+ $this->client = JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int'));
+ $this->id = JRequest::getVar('id', '', 'method', 'int');
+ $this->option = $input->getCmd('option');
+ $this->template = TemplatesHelper::getTemplateName($this->id);
+ $this->tp = true;
+ $this->url = $client->id ? JURI::base() : JURI::root();
if (!$this->template) {
return JError::raiseWarning(500, JText::_('COM_TEMPLATES_TEMPLATE_NOT_SPECIFIED'));
Oops, something went wrong.

0 comments on commit 6c805d1

Please sign in to comment.