Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Clean white space

git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@3692 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
  • Loading branch information...
commit a60b287c781c56087742f01fc8c02fe1f7ead24b 1 parent c6cc8af
@eddieajau eddieajau authored
Showing with 1,206 additions and 1,207 deletions.
  1. +7 −7 CHANGELOG.php
  2. +1 −1  administrator/components/com_banners/admin.banners.html.php
  3. +6 −6 administrator/components/com_categories/admin.categories.html.php
  4. +1 −1  administrator/components/com_categories/admin.categories.php
  5. +4 −4 administrator/components/com_config/controllers/ctl_component.php
  6. +13 −13 administrator/components/com_config/controllers/ctl_global.php
  7. +1 −1  administrator/components/com_config/models/mdl_component.php
  8. +1 −1  administrator/components/com_config/tmpl/config_content2.html
  9. +5 −5 administrator/components/com_config/views/vw_global.php
  10. +4 −4 administrator/components/com_contact/admin.contact.html.php
  11. +1 −1  administrator/components/com_contact/admin.contact.php
  12. +4 −4 administrator/components/com_content/admin.content.html.php
  13. +9 −9 administrator/components/com_content/admin.content.php
  14. +4 −4 administrator/components/com_frontpage/admin.frontpage.html.php
  15. +5 −5 administrator/components/com_frontpage/admin.frontpage.php
  16. +2 −2 administrator/components/com_installer/admin.installer.html.php
  17. +2 −2 administrator/components/com_installer/tmpl/component.php
  18. +39 −39 administrator/components/com_media/admin.media.html.php
  19. +15 −15 administrator/components/com_media/admin.media.php
  20. +17 −17 administrator/components/com_media/admin.media.popup.php
  21. +1 −1  administrator/components/com_media/includes/medialist-details.css
  22. +1 −1  administrator/components/com_media/includes/medialist-thumbs.css
  23. +4 −5 administrator/components/com_media/includes/mediamanager.css
  24. +8 −8 administrator/components/com_media/includes/popup-imagelist.css
  25. +3 −3 administrator/components/com_media/includes/popup-imageupload.css
  26. +9 −9 administrator/components/com_media/media.helper.php
  27. +56 −56 administrator/components/com_menumanager/controller.php
  28. +3 −3 administrator/components/com_menumanager/model.php
  29. +2 −2 administrator/components/com_menumanager/views.php
  30. +17 −17 administrator/components/com_menus/admin.menus.php
  31. +1 −1  administrator/components/com_menus/component_item_link/component_item_link.menu.html.php
  32. +2 −2 administrator/components/com_menus/components/parameters/controller.php
  33. +2 −2 administrator/components/com_menus/components/parameters/view.php
  34. +1 −1  administrator/components/com_menus/controller.php
  35. +5 −5 administrator/components/com_menus/helper.php
  36. +6 −6 administrator/components/com_menus/model.php
  37. +10 −10 administrator/components/com_menus/views.php
  38. +15 −15 administrator/components/com_modules/admin.modules.html.php
  39. +4 −4 administrator/components/com_newsfeeds/admin.newsfeeds.html.php
  40. +3 −3 administrator/components/com_plugins/admin.plugins.html.php
  41. +4 −4 administrator/components/com_poll/admin.poll.html.php
  42. +5 −5 administrator/components/com_sections/admin.sections.html.php
  43. +4 −4 administrator/components/com_statistics/admin.statistics.html.php
  44. +1 −1  administrator/components/com_templates/admin.templates.html.php
  45. +7 −7 administrator/components/com_templates/admin.templates.php
  46. +3 −3 administrator/components/com_trash/admin.trash.html.php
  47. +10 −10 administrator/components/com_trash/admin.trash.php
  48. +4 −4 administrator/components/com_users/admin.users.html.php
  49. +11 −11 administrator/components/com_users/admin.users.php
  50. +3 −3 administrator/components/com_weblinks/admin.weblinks.html.php
  51. +146 −146 administrator/help/en-GB/css/docbook.css
  52. +4 −4 administrator/help/en-GB/css/help.css
  53. +2 −2 administrator/includes/application.php
  54. +1 −1  administrator/index.php
  55. +1 −1  administrator/modules/mod_cssmenu/menu.php
  56. +2 −2 administrator/modules/mod_status/mod_status.php
  57. +1 −1  administrator/templates/_system/css/error.css
  58. +2 −2 administrator/templates/khepri/component.html
  59. +5 −5 administrator/templates/khepri/cpanel.php
  60. +16 −16 administrator/templates/khepri/css/component.css
  61. +16 −16 administrator/templates/khepri/css/component_rtl.css
  62. +18 −18 administrator/templates/khepri/css/general.css
  63. +18 −18 administrator/templates/khepri/css/general_rtl.css
  64. +7 −7 administrator/templates/khepri/css/login.css
  65. +2 −2 administrator/templates/khepri/css/menu.css
  66. +2 −2 administrator/templates/khepri/css/menu_rtl.css
  67. +4 −4 administrator/templates/khepri/css/template.css
  68. +4 −4 administrator/templates/khepri/css/template_rtl.css
  69. +4 −4 administrator/templates/khepri/index.php
  70. +18 −18 components/com_contact/contact.html.php
  71. +7 −7 components/com_contact/contact.php
  72. +2 −2 components/com_content/view/blog/blog.php
  73. +2 −2 components/com_content/view/category/category.php
  74. +2 −2 components/com_content/view/section/section.php
  75. +1 −1  components/com_frontpage/frontpage.html.php
  76. +1 −1  components/com_frontpage/view/blog/blog.feed.php
  77. +1 −1  components/com_login/login.html.php
  78. +9 −9 components/com_login/login.php
  79. +4 −4 components/com_search/search.php
  80. +3 −3 components/com_user/user.php
  81. +2 −2 components/com_weblinks/weblinks.html.php
  82. +4 −4 components/com_weblinks/weblinks.php
  83. +2 −2 includes/application.php
  84. +1 −1  includes/js/joomla/popup.css
  85. +1 −1  includes/js/tabs/tabpane.css
  86. +1 −1  includes/js/tabs/tabpane_rtl.css
  87. +2 −2 index.php
  88. +2 −2 installation/includes/application.php
  89. +65 −65 installation/includes/classes.php
  90. +1 −1  installation/includes/jajax.php
  91. +2 −2 installation/template/css/template.css
  92. +3 −3 installation/template/css/template_rtl.css
  93. +6 −6 installation/template/tmpl/mainconfig.html
  94. +49 −49 libraries/bitfolge/feedcreator.php
  95. +4 −4 libraries/joomla/application/extension/component.php
  96. +1 −1  libraries/joomla/application/menu.php
  97. +1 −1  libraries/joomla/application/model.php
  98. +1 −1  libraries/joomla/cache/adapters/page.php
  99. +3 −3 libraries/joomla/common/base/object.php
  100. +1 −1  libraries/joomla/database/table/menutypes.php
  101. +4 −4 libraries/joomla/database/table/user.php
  102. +22 −22 libraries/joomla/document/document.php
  103. +166 −166 libraries/joomla/document/feed/feed.php
  104. +10 −10 libraries/joomla/document/feed/renderer/atom.php
  105. +9 −9 libraries/joomla/document/feed/renderer/rss.php
  106. +4 −4 libraries/joomla/document/html/function/Empty.php
  107. +4 −4 libraries/joomla/document/html/function/Include.php
  108. +48 −48 libraries/joomla/document/html/html.php
  109. +8 −8 libraries/joomla/document/html/renderer/component.php
  110. +2 −2 libraries/joomla/document/html/renderer/head.php
  111. +1 −1  libraries/joomla/document/html/renderer/module.php
  112. +2 −2 libraries/joomla/document/pdf/pdf.php
  113. +3 −3 libraries/joomla/document/raw/raw.php
  114. +1 −1  libraries/joomla/document/renderer.php
  115. +1 −1  libraries/joomla/factory.php
  116. +4 −4 libraries/joomla/installer/installer.php
  117. +13 −13 libraries/joomla/presentation/html.php
  118. +28 −28 libraries/joomla/presentation/pagination.php
  119. +9 −9 libraries/joomla/presentation/parameter/parameter.php
  120. +4 −4 libraries/joomla/presentation/toolbar/button/popup.php
  121. +2 −2 libraries/joomla/registry/format.php
  122. +12 −12 libraries/joomla/utilities/date.php
  123. +1 −1  libraries/joomla/utilities/profiler.php
  124. +2 −2 libraries/pattemplate/patTemplate.php
  125. +1 −1  modules/mod_mainmenu/legacy.php
  126. +5 −5 modules/mod_mainmenu/menu.php
  127. +3 −3 modules/mod_mainmenu/mod_mainmenu.php
  128. +6 −6 modules/mod_syndicate/mod_syndicate.php
  129. +2 −2 plugins/content/sef.php
  130. +6 −6 plugins/editors-xtd/image.php
  131. +1 −1  plugins/editors/none.php
  132. +1 −1  plugins/editors/tinymce/jscripts/tiny_mce/plugins/style/css/props.css
  133. +1 −1  plugins/editors/tinymce/jscripts/tiny_mce/plugins/table/css/row.css
  134. +1 −1  plugins/editors/tinymce/jscripts/tiny_mce/themes/simple/css/editor_content.css
  135. +3 −3 plugins/system/joomla.sefurlbot.php
  136. +1 −1  templates/_system/css/error.css
  137. +2 −2 templates/_system/css/general.css
  138. +1 −1  templates/_system/css/offline.css
  139. +1 −1  templates/_system/css/toolbar.css
  140. +1 −1  templates/rhuk_milkyway/css/ieonly.css
  141. +5 −5 templates/rhuk_milkyway/css/template.css
  142. +1 −1  templates/rhuk_milkyway/css/template_rtl.css
  143. +1 −1  templates/rhuk_milkyway/index.php
View
14 CHANGELOG.php
@@ -78,11 +78,11 @@
^ Delete menu uses new popup technique
19-May-2006 David Gal
- + Added automated content migration facility in installation
+ + Added automated content migration facility in installation
18-May-2006 Johan Janssens
# Fixed [[artf4497]] : moofx sliders leave controls visible (Mac OS)
- - Removed image add/edit functionality from content edit page
+ - Removed image add/edit functionality from content edit page
+ Implemented modal image manager for easy inserting of images into the editor
^ Implemented modal popup for previewing content items
@@ -104,9 +104,9 @@
^ Updated German installation language
12-May-2006 David Gal
- + Added confirm for no sample data in installation.
+ + Added confirm for no sample data in installation.
-11-May-2006 Johan Janssens
+11-May-2006 Johan Janssens
^ Refactored JDocumentHTML class to use an adapter pattern and added buffering improvements
+ Added template and page caching configuration settings
@@ -146,11 +146,11 @@
# Fixed [artf4405] : [patch] Print, PDF and email buttons aren't accessible
01-May-2006 David Gal
- ^ Changed the syntax of sql queries tags in component installer xml file
+ ^ Changed the syntax of sql queries tags in component installer xml file
01-May-2006 Arno Zijlstra
^ Changed back buttons to cancel in template css and html editor
-
+
01-May-2006 Andrew Eddie
+ Added Relative image url suppot to TinyMCE
@@ -173,7 +173,7 @@
^ Refactored JDocumentRSS class to use an adapter pattern
26-Apr-2006 David Gal
- + Added RTL display option for newsfeeds component.
+ + Added RTL display option for newsfeeds component.
Can display RTL feed in LTR site and vice versa
^ Changed name of search ignore file to [langTag].ignore.php and move it to language folder
# Fixed com_search to remove words to ignore from multiple word search terms of type 'all'
View
2  administrator/components/com_banners/admin.banners.html.php
@@ -153,7 +153,7 @@ function showBanners( &$rows, &$pageNav, $option, &$lists )
<?php
}
- function bannerForm( &$row, &$lists, $_option )
+ function bannerForm( &$row, &$lists, $_option )
{
mosMakeHtmlSafe( $row, ENT_QUOTES, 'custombannercode' );
?>
View
12 administrator/components/com_categories/admin.categories.html.php
@@ -19,7 +19,7 @@
* @package Joomla
* @subpackage Categories
*/
-class categories_html
+class categories_html
{
/**
@@ -27,13 +27,13 @@ class categories_html
* @param array An array of category objects
* @param string The name of the category section
*/
- function show( &$rows, $section, $section_name, &$page, &$lists, $type )
+ function show( &$rows, $section, $section_name, &$page, &$lists, $type )
{
global $mainframe;
$limitstart = JRequest::getVar('limitstart', '0', '', 'int');
$user =& $mainframe->getUser();
-
+
//Ordering allowed ?
$ordering = ($lists['order'] == 'c.ordering');
@@ -80,7 +80,7 @@ function show( &$rows, $section, $section_name, &$page, &$lists, $type )
<th width="80" nowrap="nowrap">
<a href="javascript:tableOrdering('c.ordering','ASC');" title="<?php echo JText::_( 'Order by' ); ?> <?php echo JText::_( 'Order' ); ?>">
<?php echo JText::_( 'Order' );?>
- </a>
+ </a>
</th>
<th width="1%">
<?php mosCommonHTML::saveorderButton( $rows ); ?>
@@ -124,11 +124,11 @@ function show( &$rows, $section, $section_name, &$page, &$lists, $type )
$k = 0;
for ($i=0, $n=count( $rows ); $i < $n; $i++) {
$row = &$rows[$i];
-
+
$row->sect_link = ampReplace( 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id='. $row->section );
$link = 'index2.php?option=com_categories&section='. $section .'&task=editA&hidemainmenu=1&id='. $row->id;
-
+
$access = mosCommonHTML::AccessProcessing( $row, $i );
$checked = mosCommonHTML::CheckedOutProcessing( $row, $i );
$published = mosCommonHTML::PublishedProcessing( $row, $i );
View
2  administrator/components/com_categories/admin.categories.php
@@ -336,7 +336,7 @@ function editCategory( $uid=0, $section='' )
$and = '';
$link = '';
break;
- }
+ }
if ( $row->section > 0 )
{
View
8 administrator/components/com_config/controllers/ctl_component.php
@@ -19,7 +19,7 @@
* @package Joomla
* @subpackage Config
*/
-class JConfigComponentController extends JController
+class JConfigComponentController extends JController
{
var $_name = 'component';
@@ -47,7 +47,7 @@ function edit()
JError::raiseWarning( 500, 'Not a valid component' );
return false;
}
-
+
$model = &JModel::getInstance( 'JConfigComponentModel' );
$table = &$model->getTable();
if (!$table->loadByOption( $component ))
@@ -66,7 +66,7 @@ function edit()
function save() {
$model = &JModel::getInstance( 'JConfigComponentModel' );
$table = &$model->getTable();
-
+
$table->bind( $_POST );
// reset the option
$table->option = null;
@@ -76,7 +76,7 @@ function save() {
JError::raiseWarning( 500, $row->getError() );
return false;
}
-
+
// save the changes
if (!$table->store()) {
JError::raiseWarning( 500, $row->getError() );
View
26 administrator/components/com_config/controllers/ctl_global.php
@@ -18,7 +18,7 @@
* @package Joomla
* @subpackage Config
*/
-class JConfigGlobalController extends JController
+class JConfigGlobalController extends JController
{
/**
* Custom Constructor
@@ -175,9 +175,9 @@ function showConfig()
// CACHE SETTINGS
$lists['caching'] = mosHTML::yesnoRadioList('caching', 'class="inputbox"', $row->caching);
-
+
$lists['caching_tmpl'] = mosHTML::yesnoRadioList('caching_tmpl', 'class="inputbox"', $row->caching_tmpl);
-
+
$lists['caching_page'] = mosHTML::yesnoRadioList('caching_page', 'class="inputbox"', $row->caching_page);
// USER SETTINGS
@@ -264,35 +264,35 @@ function saveConfig() {
*/
$server_time = date('O') / 100;
$offset = JRequest::getVar( 'offset_user', 0, 'post', 'int' ) - $server_time;
- $mainframe->_registry->setValue('config.offset', $offset);
+ $mainframe->_registry->setValue('config.offset', $offset);
//override any possible database password change
$mainframe->_registry->setValue('config.password', $mosConfig_password);
-
+
// handling of special characters
$sitename = htmlspecialchars( JRequest::getVar( 'sitename', '', 'post' ) );
$mainframe->_registry->setValue('config.sitename', $sitename);
-
+
$MetaDesc = htmlspecialchars( JRequest::getVar( 'MetaDesc', '', 'post' ) );
$mainframe->_registry->setValue('config.MetaDesc', $MetaDesc);
-
+
$MetaKeys = htmlspecialchars( JRequest::getVar( 'MetaKeys', '', 'post' ) );
$mainframe->_registry->setValue('config.MetaKeys', $MetaKeys);
// handling of quotes (double and single) and amp characters
// htmlspecialchars not used to preserve ability to insert other html characters
$offline_message = JRequest::getVar( 'offline_message', '', 'post' );
- $offline_message = ampReplace( $offline_message );
- $offline_message = str_replace( '"', '&quot;', $offline_message );
- $offline_message = str_replace( "'", '&#039;', $offline_message );
+ $offline_message = ampReplace( $offline_message );
+ $offline_message = str_replace( '"', '&quot;', $offline_message );
+ $offline_message = str_replace( "'", '&#039;', $offline_message );
$mainframe->_registry->setValue('config.offline_message', $offline_message);
// handling of quotes (double and single) and amp characters
// htmlspecialchars not used to preserve ability to insert other html characters
$error_message = JRequest::getVar( 'error_message', '', 'post' );
- $error_message = ampReplace( $error_message );
- $error_message = str_replace( '"', '&quot;', $error_message );
- $error_message = str_replace( "'", '&#039;', $error_message );
+ $error_message = ampReplace( $error_message );
+ $error_message = str_replace( '"', '&quot;', $error_message );
+ $error_message = str_replace( "'", '&#039;', $error_message );
$mainframe->_registry->setValue('config.error_message', $error_message);
// Get the path of the configuration file
View
2  administrator/components/com_config/models/mdl_component.php
@@ -18,7 +18,7 @@
* @package Joomla
* @subpackage Config
*/
-class JConfigComponentModel extends JModel
+class JConfigComponentModel extends JModel
{
/** @var object JTable object */
var $_table = null;
View
2  administrator/components/com_config/tmpl/config_content2.html
@@ -67,5 +67,5 @@
-
+
</fieldset>
View
10 administrator/components/com_config/views/vw_global.php
@@ -27,13 +27,13 @@ function showConfig( &$row, &$lists )
$document =& $mainframe->getDocument();
$document->addScript($mainframe->getBaseURL().'components/com_config/js/switcher.js');
-
+
$contents = '';
ob_start();
require_once(JPATH_COM_CONFIG.DS.'tmpl'.DS.'navigation.html');
$contents = ob_get_contents();
ob_end_clean();
-
+
$document->set('module', 'submenu', $contents);
require_once(JPATH_COM_CONFIG.DS.'tmpl'.DS.'writeable.html');
mosCommonHTML::loadOverlib();
@@ -67,7 +67,7 @@ function showConfig( &$row, &$lists )
</td>
</tr>
</table>
-
+
</div>
<div id="page-content">
@@ -95,11 +95,11 @@ function showConfig( &$row, &$lists )
</td>
<td width="40%">
<?php require_once(JPATH_COM_CONFIG.DS.'tmpl'.DS.'config_database.html'); ?>
-
+
<?php require_once(JPATH_COM_CONFIG.DS.'tmpl'.DS.'config_mail.html'); ?>
</td>
</tr>
- </table>
+ </table>
</div>
</div>
<div class="clr"></div>
View
8 administrator/components/com_contact/admin.contact.html.php
@@ -19,12 +19,12 @@
* @package Joomla
* @subpackage Contact
*/
-class HTML_contact
+class HTML_contact
{
- function showContacts( &$rows, &$pageNav, $option, &$lists )
+ function showContacts( &$rows, &$pageNav, $option, &$lists )
{
global $my;
-
+
//Ordering allowed ?
$ordering = ($lists['order'] == 'cd.ordering');
@@ -66,7 +66,7 @@ function showContacts( &$rows, &$pageNav, $option, &$lists )
<th nowrap="nowrap" width="80">
<a href="javascript:tableOrdering('cd.ordering','ASC');" title="<?php echo JText::_( 'Order by' ); ?> <?php echo JText::_( 'Order' ); ?>">
<?php echo JText::_( 'Order' );?>
- </a>
+ </a>
</th>
<th width="1%">
<?php mosCommonHTML::saveorderButton( $rows ); ?>
View
2  administrator/components/com_contact/admin.contact.php
@@ -102,7 +102,7 @@
* List the records
* @param string The current GET/POST option
*/
-function showContacts( $option )
+function showContacts( $option )
{
global $database, $mainframe;
View
8 administrator/components/com_content/admin.content.html.php
@@ -36,7 +36,7 @@ function showContent( &$rows, &$lists, $page, $redirect )
// Initialize variables
$limitstart = JRequest::getVar('limitstart', '0', '', 'int');
$user = & $mainframe->getUser();
-
+
//Ordering allowed ?
$ordering = ($lists['order'] == 'section_name' && $lists['order_Dir'] == 'ASC');
@@ -84,7 +84,7 @@ function showContent( &$rows, &$lists, $page, $redirect )
<th width="80">
<a href="javascript:tableOrdering('section_name','DESC');" title="<?php echo JText::_( 'Order by' ); ?> <?php echo JText::_( 'Order' ); ?>">
<?php echo JText::_( 'Order' ); ?>
- </a>
+ </a>
</th>
<th width="1%">
<?php mosCommonHTML::saveorderButton( $rows ); ?>
@@ -468,7 +468,7 @@ function submitbutton(pressbutton) {
submitform( pressbutton );
return;
}
-
+
// do field validation
if (form.title.value == ""){
alert( "<?php echo JText::_( 'Content item must have a title', true ); ?>" );
@@ -513,7 +513,7 @@ function submitbutton(pressbutton) {
$pane->startPanel( $title, "detail-page" );
ContentView::_paneDetails( $row, $lists, $params );
-
+
$title = JText::_( 'PARAMADVANCED' );
$pane->endPanel();
$pane->startPanel( $title, "params-page" );
View
18 administrator/components/com_content/admin.content.php
@@ -632,7 +632,7 @@ function editContent() {
// build list of users
$active = (intval($row->created_by) ? intval($row->created_by) : $user->get('id'));
$lists['created_by'] = mosAdminMenus::UserSelect('created_by', $active);
-
+
// build the html select list for the group access
$lists['access'] = mosAdminMenus::Access($row);
@@ -806,7 +806,7 @@ function saveContent()
$cache = & JFactory::getCache('com_content');
$cache->cleanCache();
-
+
switch ($task)
{
case 'go2menu' :
@@ -905,7 +905,7 @@ function changeContent( $state = 0 )
}
break;
}
-
+
$cache = & JFactory::getCache('com_content');
$cache->cleanCache();
@@ -972,7 +972,7 @@ function toggleFrontPage()
}
$fp->reorder();
}
-
+
$cache = & JFactory::getCache('com_content');
$cache->cleanCache();
@@ -1021,7 +1021,7 @@ function removeContent()
JError::raiseError( 500, $db->getErrorMsg() );
return false;
}
-
+
$cache = & JFactory::getCache('com_content');
$cache->cleanCache();
@@ -1066,7 +1066,7 @@ function orderContent($direction)
$row = & JTable::getInstance('content', $db);
$row->load($cid[0]);
$row->move($direction, "catid = $row->catid AND state >= 0");
-
+
$cache = & JFactory::getCache('com_content');
$cache->cleanCache();
@@ -1376,7 +1376,7 @@ function accessMenu($access)
JError::raiseError( 500, $row->getError() );
return false;
}
-
+
$cache = & JFactory::getCache('com_content');
$cache->cleanCache();
@@ -1458,7 +1458,7 @@ function previewContent()
$db = & $mainframe->getDBO();
$id = JRequest::getVar( 'id', 0, '', 'int' );
$option = JRequest::getVar( 'option' );
-
+
// Get the current default template
$query = "SELECT template" .
"\n FROM #__templates_menu" .
@@ -1478,7 +1478,7 @@ function previewContent()
}
}
-class JContentHelper
+class JContentHelper
{
function saveContentPrep( &$row )
{
View
8 administrator/components/com_frontpage/admin.frontpage.html.php
@@ -24,7 +24,7 @@ class HTML_content {
* Writes a list of the content items
* @param array An array of content objects
*/
- function showList( &$rows, $page, $option, $lists )
+ function showList( &$rows, $page, $option, $lists )
{
global $mainframe;
@@ -32,10 +32,10 @@ function showList( &$rows, $page, $option, $lists )
$user =& $mainframe->getUser();
$db = & $mainframe->getDBO();
$nullDate = $db->getNullDate();
-
+
//Ordering allowed ?
$ordering = (($lists['order'] == 'fpordering'));
-
+
mosCommonHTML::loadOverlib();
?>
<form action="index2.php?option=com_frontpage" method="post" name="adminForm">
@@ -77,7 +77,7 @@ function showList( &$rows, $page, $option, $lists )
<th width="80" nowrap="nowrap">
<a href="javascript:tableOrdering('fpordering','ASC');" title="<?php echo JText::_( 'Order by' ); ?> <?php echo JText::_( 'Order' ); ?>">
<?php echo JText::_( 'Order' ); ?>
- </a>
+ </a>
</th>
<th width="1%">
<?php mosCommonHTML::saveorderButton( $rows ); ?>
View
10 administrator/components/com_frontpage/admin.frontpage.php
@@ -235,7 +235,7 @@ function changeFrontPage( $cid=null, $state=0, $option ) {
if (count( $cid ) == 1) {
$row =& JTable::getInstance('content', $database );
- $row->checkin( $cid[0] );
+ $row->checkin( $cid[0] );
}
$cache = & JFactory::getCache('com_content');
@@ -264,7 +264,7 @@ function removeFrontPage( &$cid, $option ) {
echo "<script> alert('".$fp->getError()."'); </script>\n";
exit();
}
- }
+ }
$fp->reorder();
$cache = & JFactory::getCache('com_content');
@@ -281,7 +281,7 @@ function orderFrontPage( $uid, $inc, $option ) {
global $database;
$fp = new JTableFrontPage( $database );
- $fp->load( $uid );
+ $fp->load( $uid );
$fp->move( $inc );
$cache = & JFactory::getCache('com_content');
@@ -306,7 +306,7 @@ function accessMenu( $uid, $access ) {
return $row->getError();
}
if ( !$row->store() ) {
- return $row->getError();
+ return $row->getError();
}
$cache = & JFactory::getCache('com_content');
@@ -334,7 +334,7 @@ function saveOrder( &$cid ) {
// update ordering
$row = new JTableFrontPage( $database );
$row->load( $cid[$i] );
- $row->reorder();
+ $row->reorder();
}
$cache = & JFactory::getCache('com_content');
View
4 administrator/components/com_installer/admin.installer.html.php
@@ -48,7 +48,7 @@ function submitbutton4(pressbutton) {
}
</script>
-
+
<form enctype="multipart/form-data" action="index2.php" method="post" name="filename">
<table class="adminform">
@@ -73,7 +73,7 @@ function submitbutton4(pressbutton) {
<input type="hidden" name="task" value="uploadpackage" />
<input type="hidden" name="option" value="com_installer" />
</form>
-
+
<form enctype="multipart/form-data" action="index2.php" method="post" name="adminForm_dir">
<table class="adminform">
<tr>
View
4 administrator/components/com_installer/tmpl/component.php
@@ -97,7 +97,7 @@ class JInstallerScreens_component {
* @param array An array of records
* @param string The URL option
*/
- function showInstalled(&$rows, &$page)
+ function showInstalled(&$rows, &$page)
{
mosCommonHTML::loadOverlib();
?>
@@ -187,7 +187,7 @@ function showInstalled(&$rows, &$page)
echo JText::_( 'There are no custom components installed' );
}
?>
-
+
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="option" value="com_installer" />
View
78 administrator/components/com_media/admin.media.html.php
@@ -30,7 +30,7 @@ class JMediaViews
* @param string $listdir The current working directory
* @since 1.0
*/
- function showMedia($tree)
+ function showMedia($tree)
{
global $mainframe;
@@ -47,7 +47,7 @@ function showMedia($tree)
";
$document =& $mainframe->getDocument();
- $document->set('module', 'submenu', $listStyle);
+ $document->set('module', 'submenu', $listStyle);
$document->addScript('components/com_media/includes/mediamanager.js');
$document->addStyleSheet('components/com_media/includes/mediamanager.css');
@@ -66,7 +66,7 @@ function showMedia($tree)
<fieldset id="folderview">
<legend><?php echo JText::_( 'Files' ); ?></legend>
<div class="path">
- <input class="inputbox" type="text" id="folderpath" readonly="readonly" />
+ <input class="inputbox" type="text" id="folderpath" readonly="readonly" />
<input class="inputbox" type="text" id="foldername" name="foldername" />
<button type="button" onclick="document.mediamanager.oncreatefolder()" /><?php echo JText::_( 'Create' ); ?></button>
</div>
@@ -82,13 +82,13 @@ function showMedia($tree)
<button onclick="jsAddFile();return false">
+ Add more files
</button>
- [ <?php echo JText::_( 'Max' ); ?>&nbsp;<?php echo ini_get( 'post_max_size' );?> ]
+ [ <?php echo JText::_( 'Max' ); ?>&nbsp;<?php echo ini_get( 'post_max_size' );?> ]
<div id="uploads">
<div style="padding: 4px;">
<input class="inputbox" name="uploads[]" type="file" size="60" />
</div>
</div>
-
+
<button onclick="document.mediamanager.onuploadfiles()" /><?php echo JText::_( 'Upload Files' ); ?></button>
</fieldset>
@@ -110,7 +110,7 @@ function showMedia($tree)
* @param array $images Array of images in the current working folder
* @since 1.5
*/
- function listMedia($current, $folders, $docs, $images)
+ function listMedia($current, $folders, $docs, $images)
{
global $mainframe;
@@ -122,7 +122,7 @@ function listMedia($current, $folders, $docs, $images)
$style = ucfirst($style);
JMediaViews::imageStyle($current);
- if (count($images) > 0 || count($folders) > 0 || count($docs) > 0)
+ if (count($images) > 0 || count($folders) > 0 || count($docs) > 0)
{
//now sort the folders and images by name.
ksort($images);
@@ -131,7 +131,7 @@ function listMedia($current, $folders, $docs, $images)
$method = 'draw'.$style.'Header';
JMediaViews::$method();
-
+
$method = 'showUp'.$style;
JMediaViews::$method($current);
@@ -167,7 +167,7 @@ function listMedia($current, $folders, $docs, $images)
}
}
- function drawNoResults()
+ function drawNoResults()
{
?>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
@@ -182,21 +182,21 @@ function drawNoResults()
<?php
}
- function drawThumbsHeader()
+ function drawThumbsHeader()
{
?>
<div class="manager">
<?php
}
- function drawThumbsFooter()
+ function drawThumbsFooter()
{
?>
</div>
<?php
}
- function drawDetailsHeader()
+ function drawDetailsHeader()
{
?>
<div class="manager">
@@ -214,7 +214,7 @@ function drawDetailsHeader()
<?php
}
- function drawDetailsFooter()
+ function drawDetailsFooter()
{
?>
</tbody>
@@ -223,7 +223,7 @@ function drawDetailsFooter()
<?php
}
- function showImgThumbs($img, $file, $info, $size, $listdir)
+ function showImgThumbs($img, $file, $info, $size, $listdir)
{
$img_file = basename($img);
$img_url = COM_MEDIA_BASEURL.$listdir.'/'.rawurlencode($img_file);
@@ -257,8 +257,8 @@ function showImgThumbs($img, $file, $info, $size, $listdir)
</div>
<?php
}
-
- function showFolderThumbs($path, $dir, $listdir)
+
+ function showFolderThumbs($path, $dir, $listdir)
{
$count = JMediaHelper::countFiles(COM_MEDIA_BASE.$listdir.$path);
$num_files = $count[0];
@@ -290,8 +290,8 @@ function showFolderThumbs($path, $dir, $listdir)
</div>
<?php
}
-
- function showUpThumbs($path)
+
+ function showUpThumbs($path)
{
$count = JMediaHelper::countFiles(COM_MEDIA_BASE.$path);
$num_files = $count[0];
@@ -300,7 +300,7 @@ function showUpThumbs($path)
if ($path == '/') {
$path = '';
}
-
+
$folder = str_replace("\\", "/", dirname($path));
$link = 'index.php?option=com_media&amp;task=list&amp;tmpl=component.html&amp;cFolder='.$folder;
@@ -321,7 +321,7 @@ function showUpThumbs($path)
<?php
}
- function showDocThumbs($doc, $size, $listdir, $icon)
+ function showDocThumbs($doc, $size, $listdir, $icon)
{
global $mainframe;
@@ -356,7 +356,7 @@ function showDocThumbs($doc, $size, $listdir, $icon)
<?php
}
- function showImgDetails($img, $file, $info, $size, $listdir)
+ function showImgDetails($img, $file, $info, $size, $listdir)
{
$img_file = basename($img);
$img_url = COM_MEDIA_BASEURL.$listdir.'/'.rawurlencode($img_file);
@@ -391,7 +391,7 @@ function showImgDetails($img, $file, $info, $size, $listdir)
<?php
}
- function showFolderDetails($path, $dir, $listdir)
+ function showFolderDetails($path, $dir, $listdir)
{
$count = JMediaHelper::countFiles(COM_MEDIA_BASE.$listdir.$path);
$num_files = $count[0];
@@ -426,19 +426,19 @@ function showFolderDetails($path, $dir, $listdir)
</tr>
<?php
}
-
- function showUpDetails($path)
+
+ function showUpDetails($path)
{
$count = JMediaHelper::countFiles(COM_MEDIA_BASE.$path);
$num_files = $count[0];
$num_dir = $count[1];
-
+
if ($path == '/') {
$path = '';
}
-
+
$folder = str_replace("\\", "/", dirname($path));
-
+
$link = 'index.php?option=com_media&amp;task=list&amp;tmpl=component.html&amp;cFolder='.$folder;
?>
<tr>
@@ -457,7 +457,7 @@ function showUpDetails($path)
<?php
}
- function showDocDetails($doc, $size, $listdir, $icon)
+ function showDocDetails($doc, $size, $listdir, $icon)
{
global $mainframe;
@@ -495,21 +495,21 @@ function showDocDetails($doc, $size, $listdir, $icon)
<?php
}
- function imageStyle($listdir)
+ function imageStyle($listdir)
{
if ($listdir == '') {
$listdir = '/';
}
?>
<script language="javascript" type="text/javascript">
- function confirmDeleteImage(file)
+ function confirmDeleteImage(file)
{
if(confirm("<?php echo JText::_( 'Delete file' ); ?> \""+file+"\"?"))
return true;
return false;
}
- function confirmDeleteFolder(folder, numFiles)
+ function confirmDeleteFolder(folder, numFiles)
{
if(numFiles > 0) {
alert("<?php echo JText::_( 'There are', true ); ?> "+numFiles+" <?php echo JText::_( 'files/folders in' ); ?> \""+folder+"\".\n\n<?php echo JText::_( 'Please delete all files/folder in' ); ?> \""+folder+"\" <?php echo JText::_( 'first.' ); ?>");
@@ -531,7 +531,7 @@ function confirmDeleteFolder(folder, numFiles)
*
* since 1.5
*/
- function listError()
+ function listError()
{
global $BASE_DIR, $BASE_ROOT;
?>
@@ -569,34 +569,34 @@ function _buildFolderTree($tree)
}
function _loadJS()
- {
+ {
global $mainframe;
$style = $mainframe->getUserStateFromRequest('media.list.style', 'listStyle', 'thumbs');
$base = str_replace("\\","/",JPATH_ROOT);
- $js = "
+ $js = "
var basepath = '".$base.'/images'."';
var cStyle = '".$style."';
-
+
function jsAddFile() {
div = document.getElementById( 'uploads' );
-
+
div.appendChild( writeUploadField() );
return false;
}
-
+
function writeUploadField() {
// <input class=\"inputbox\" name=\"upload\" type=\"file\" size=\"70\" />
div = document.createElement( 'div' );
div.setAttribute( 'style', 'padding: 4px' );
-
+
tag = document.createElement( 'input' );
tag.setAttribute( 'type', 'file' );
tag.setAttribute( 'name', 'uploads[]' );
tag.setAttribute( 'size', '60' );
tag.setAttribute( 'class', 'inputbox' );
div.appendChild( tag );
-
+
return div;
}
" ;
View
30 administrator/components/com_media/admin.media.php
@@ -204,7 +204,7 @@ function listMedia()
JMediaViews::listError();
}
}
-
+
/**
* Upload popup
*
@@ -213,20 +213,20 @@ function listMedia()
function showUpload($msg = '')
{
global $mainframe;
-
+
$dirPath = JRequest::getVar( 'dirPath', '/' );
-
+
// Load the admin popup view
require_once (dirname(__FILE__).DS.'admin.media.popup.php');
-
+
//attach stylesheet to document
$doc = & $mainframe->getDocument();
$doc->addStyleSheet('components/com_media/includes/popup-imageupload.css');
$doc->addScript('components/com_media/includes/popup-imageupload.js');
-
+
JMediaViews::popupUpload($dirPath, $msg);
}
-
+
/**
* Upload popup
*
@@ -235,10 +235,10 @@ function showUpload($msg = '')
function showFolder()
{
global $mainframe;
-
+
// Load the admin popup view
require_once (dirname(__FILE__).DS.'admin.media.popup.php');
-
+
JMediaViews::popupDirectory(COM_MEDIA_BASEURL);
}
@@ -251,7 +251,7 @@ function showFolder()
function imgManager($listFolder)
{
global $mainframe;
-
+
$mainframe->setPageTitle(JText::_('Insert Image'));
// Load the admin popup view
@@ -279,7 +279,7 @@ function imgManager($listFolder)
//attach stylesheet to document
$url = $mainframe->isAdmin() ? $mainframe->getSiteURL() : $mainframe->getBaseURL();
-
+
$doc = & $mainframe->getDocument();
$doc->addStyleSheet('components/com_media/includes/popup-imagemanager.css');
$doc->addScript('components/com_media/includes/popup-imagemanager.js');
@@ -292,7 +292,7 @@ function imgManager($listFolder)
function imgManagerList($listFolder)
{
global $mainframe;
-
+
// Load the admin popup view
require_once (dirname(__FILE__).DS.'admin.media.popup.php');
@@ -334,7 +334,7 @@ function imgManagerList($listFolder)
$folders[$folder] = $folder;
}
}
-
+
//attach stylesheet to document
$doc = & $mainframe->getDocument();
$doc->addStyleSheet('components/com_media/includes/popup-imagelist.css');
@@ -379,7 +379,7 @@ function upload()
if (!JFile::upload($file['tmp_name'], $destDir.strtolower($file['name']))) {
JMediaController::showUpload(JText::_('Upload FAILED'));
return;
-
+
} else {
JMediaController::showUpload(JText::_('Upload complete'));
return;
@@ -403,7 +403,7 @@ function batchUpload()
for ($i=0;$i<count($files['name']);$i++) {
$dirPathPost = $dirPath;
$destDir = COM_MEDIA_BASE.$dirPathPost.DS;
-
+
if (file_exists($destDir.$files['name'][$i])) {
return false;
}
@@ -492,7 +492,7 @@ function deleteFolder($listdir)
} else {
echo '<font color="red">'.JText::_('Unable to delete: not empty!').'</font>';
}
- return $ret;
+ return $ret;
}
function _buildFolderTree($list)
View
34 administrator/components/com_media/admin.media.popup.php
@@ -21,12 +21,12 @@
* @subpackage Media
* @since 1.5
*/
-class JMediaViews
+class JMediaViews
{
- function imgManager($dirPath, $listFolder)
+ function imgManager($dirPath, $listFolder)
{
global $mainframe;
-
+
?>
<form action="index.php" id="uploadForm" method="post" enctype="multipart/form-data">
<div id="messages" style="display: none;"><span id="message"></span><img src="img/dots.gif" width="22" height="12" alt="..." /></div>
@@ -66,7 +66,7 @@ function imgManager($dirPath, $listFolder)
<option value="top" >Top</option>
</select>
</td>
- </tr>
+ </tr>
<tr>
<td>
<label for="f_alt">Image Description</label>
@@ -79,7 +79,7 @@ function imgManager($dirPath, $listFolder)
</fieldset>
<div id="uploadpanel">
<h3 id="uploadtoggler" class="toggler title"><span>Upload</span></h3>
- <div id="uploadpane" class="content">
+ <div id="uploadpane" class="content">
<iframe src="index.php?option=com_media&amp;task=popupUpload&amp;tmpl=component.html" id="uploadview" name="uploadview" onload="document.imagemanager.setFolder(window.frames['uploadview'].document.adminForm.dirPath.value, true);"></iframe>
</div>
</div>
@@ -89,10 +89,10 @@ function imgManager($dirPath, $listFolder)
</form>
<?php
}
-
- function imgManagerList($listFolder, $folders, $images)
+
+ function imgManagerList($listFolder, $folders, $images)
{
- if (count($images) > 0 || count($folders) > 0)
+ if (count($images) > 0 || count($folders) > 0)
{
//now sort the folders and images by name.
ksort($images);
@@ -115,8 +115,8 @@ function imgManagerList($listFolder, $folders, $images)
}
?></div><?php
- }
- else
+ }
+ else
{
?>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
@@ -155,7 +155,7 @@ function renderImage($img, $file, $info, $size, $listdir)
<?php
}
- function renderFolder($path, $dir, $listdir)
+ function renderFolder($path, $dir, $listdir)
{
$count = JMediaHelper::countFiles(COM_MEDIA_BASE.$listdir.$path);
$num_files = $count[0];
@@ -176,13 +176,13 @@ function renderFolder($path, $dir, $listdir)
</div>
<?php
}
-
+
/**
* Method to display an error message if the working directory is not valid
*
* since 1.5
*/
- function listError()
+ function listError()
{
global $BASE_DIR, $BASE_ROOT;
?>
@@ -197,8 +197,8 @@ function listError()
</table>
<?php
}
-
- function popupUpload($dirPath, $msg)
+
+ function popupUpload($dirPath, $msg)
{
?>
<form method="post" action="index.php" enctype="multipart/form-data" name="adminForm">
@@ -213,7 +213,7 @@ function popupUpload($dirPath, $msg)
</td>
</tr>
</table>
-
+
<input type="hidden" name="tmpl" value="component.html" />
<input type="hidden" name="dirPath" value="<?php echo $dirPath ?>" />
<input type="hidden" name="option" value="com_media" />
@@ -222,7 +222,7 @@ function popupUpload($dirPath, $msg)
<?php
}
- function popupDirectory($basePath)
+ function popupDirectory($basePath)
{
$imgFiles = mosFS::listFolders($basePath, '.', true, true);
$folders = array ();
View
2  administrator/components/com_media/includes/medialist-details.css
@@ -36,4 +36,4 @@
background: #F0F0F0;
padding: 4px;
color: #666;
-}
+}
View
2  administrator/components/com_media/includes/medialist-thumbs.css
@@ -15,7 +15,7 @@
border-right: 1px dashed #e0e0e0;
border-bottom: 1px solid #e0e0e0;
}
-
+
div.imgTotal {
}
View
9 administrator/components/com_media/includes/mediamanager.css
@@ -17,15 +17,14 @@
* @since 1.5
* @version 1.0
*/
-
+
#treeview { padding: 10px; width:140px; overflow: auto; height: 390px; }
-
+
#folderview { }
#folderview .path { margin-bottom: 10px; }
#folderview .view { display: block; margin: 0; padding: 0; height: 360px; }
-
+
#folderview input#folderpath { width: 70%; background-color: #EEE; }
#folderview input#foldername { width: 20%; }
#folderview iframe#folderframe { height: 100%; }
-
-
+
View
16 administrator/components/com_media/includes/popup-imagelist.css
@@ -17,25 +17,25 @@
* @since 1.5
* @version 1.0
*/
-
+
html, body { margin: 0; padding: 0; font: 10px Tahoma, Verdana, sans-serif; }
.item { float: left; border: 1px solid #ccc; margin: 3px; position: relative; }
-.item a {
- display: table-cell; _display: block;
+.item a {
+ display: table-cell; _display: block;
width: 80px; height: 80px;
- vertical-align:middle; text-align: center;
+ vertical-align:middle; text-align: center;
text-decoration: none;
color: black;
}
.item a:hover { background-color: white; }
.item img { border: 0 none; margin-top: expression(( 80 - this.height ) / 2); }
-.item span {
- display: block; width: 76px;
- position: absolute; bottom: 0; padding: 2px;
- background-color: #ddd;
+.item span {
+ display: block; width: 76px;
+ position: absolute; bottom: 0; padding: 2px;
+ background-color: #ddd;
filter:alpha(opacity=70);
-moz-opacity: 0.70;
opacity: 0.70;
View
6 administrator/components/com_media/includes/popup-imageupload.css
@@ -17,16 +17,16 @@
* @since 1.5
* @version 1.0
*/
-
+
html, body { margin: 0; padding: 0; font: 11px Tahoma, Verdana, sans-serif; }
-
+
form { padding: 0px; margin: 0; width: 530px; padding: 5px; position: relative; }
fieldset { margin-top: 0.5em; border: 1px solid #CCCCCC; padding-top: 10px; }
select,input,button { font: 11px Tahoma, Verdana, sans-serif; }
#message {
- position: absolute; top: 11px; left: 67px;
+ position: absolute; top: 11px; left: 67px;
}
.uploading { background: url(progress.gif) repeat-x; }
View
18 administrator/components/com_media/media.helper.php
@@ -123,7 +123,7 @@ function getTypeIcon( $fileName )
default:
$icon = 'unknown';
break;
- }
+ }
return $icon;
}
@@ -144,23 +144,23 @@ function canUpload( $file, &$err )
if (!in_array($format, $allowable))
{
- $err = 'This file type is not supported';
+ $err = 'This file type is not supported';
return false;
}
$maxSize = (int) $params->get( 'upload_maxsize', 0 );
if ($maxSize > 0 && (int) $file['size'] > $maxSize)
{
- $err = 'This file is too large to upload';
+ $err = 'This file is too large to upload';
return false;
}
return true;
}
- function parseSize($size)
+ function parseSize($size)
{
if ($size < 1024) {
return $size . ' bytes';
- }
+ }
else
{
if ($size >= 1024 && $size < 1024 * 1024) {
@@ -170,8 +170,8 @@ function parseSize($size)
}
}
}
-
- function imageResize($width, $height, $target)
+
+ function imageResize($width, $height, $target)
{
//takes the larger size of the width and height and applies the
//formula accordingly...this is so this script will work
@@ -190,8 +190,8 @@ function imageResize($width, $height, $target)
//can plug this function inside an image tag and just get the
return "width=\"$width\" height=\"$height\"";
}
-
- function countFiles( $dir )
+
+ function countFiles( $dir )
{
$total_file = 0;
$total_dir = 0;
View
112 administrator/components/com_menumanager/controller.php
@@ -31,16 +31,16 @@ function listItems()
{
// TODO: following line will eventually be jimport( 'application.model.menu' ); or similar
require_once( JPATH_ADMINISTRATOR . '/components/com_menus/model.php' );
-
+
$database = &$this->getDBO();
$mainframe = &$this->getApplication();
-
+
$menus = array();
$limit = $mainframe->getUserStateFromRequest( 'limit', 'limit', $mainframe->getCfg('list_limit') );
$limitstart = $mainframe->getUserStateFromRequest( $this->_option . '.limitstart', 'limitstart', 0 );
-
+
// Preselect some aggregate data
-
+
// Query to get published menu item counts
$query = "SELECT a.menutype, COUNT( a.menutype ) AS num"
. "\n FROM #__menu AS a"
@@ -49,7 +49,7 @@ function listItems()
;
$database->setQuery( $query );
$published = $database->loadObjectList( 'menutype' );
-
+
// Query to get unpublished menu item counts
$query = "SELECT a.menutype, COUNT( a.menutype ) AS num"
. "\n FROM #__menu AS a"
@@ -58,7 +58,7 @@ function listItems()
;
$database->setQuery( $query );
$unpublished = $database->loadObjectList( 'menutype' );
-
+
// Query to get trash menu item counts
$query = "SELECT a.menutype, COUNT( a.menutype ) AS num"
. "\n FROM #__menu AS a"
@@ -67,15 +67,15 @@ function listItems()
;
$database->setQuery( $query );
$trash = $database->loadObjectList( 'menutype' );
-
+
$model = &JModel::getInstance( 'JModelMenu' );
$menuTypes = $model->getMenuTypeList();
-
+
$total = count( $menuTypes );
$i = 0;
for ($i = 0; $i < $total; $i++) {
$row = &$menuTypes[$i];
-
+
// query to get number of modules for menutype
$query = "SELECT count( id )"
. "\n FROM #__modules"
@@ -84,7 +84,7 @@ function listItems()
;
$database->setQuery( $query );
$modules = $database->loadResult();
-
+
if ( !$modules ) {
$modules = '-';
}
@@ -93,28 +93,28 @@ function listItems()
$row->unpublished = @$unpublished[$row->menutype]->num ? $unpublished[$row->menutype]->num : '-';
$row->trash = @$trash[$row->menutype]->num ? $trash[$row->menutype]->num : '-';
}
-
+
jimport('joomla.presentation.pagination');
$pageNav = new JPagination( $total, $limitstart, $limit );
$view = new JMenuManagerListView( $this );
$view->display( $menuTypes, $pageNav );
}
-
-
+
+
/**
* Controller for view to create or edit a menu type
*/
function edit() {
global $database, $task;
-
+
$id = (int) JRequest::getVar( 'id', 0 );
-
+
if ($this->getTask() == 'new')
{
$id = 0;
}
-
+
$model = &$this->getModel( 'JModelMenuType' );
$table = &$model->getTable();
@@ -124,43 +124,43 @@ function edit() {
$view->setModel( $model, true );
$view->display();
}
-
+
/**
* Controller for saving a menu type
*/
function saveMenu() {
global $database;
-
+
$id = (int) JRequest::getVar( 'id', 0 );
-
+
$oldType = new JTableMenuTypes( $database );
$oldType->load( $id );
-
+
$menuType = new JTableMenuTypes( $database );
$menuType->bind( $_POST );
-
+
$isNew = ($menuType->id == 0);
$isChanged = ($oldType->menutype != $menuType->menutype);
-
+
// block to stop renaming of 'mainmenu' menutype
if ($oldType->menutype == 'mainmenu' && $isChanged) {
josErrorAlert( JText::_( 'WARNMAINMENU', true ) );
}
-
+
if (!$menuType->check()) {
josErrorAlert( $menuType->getError() );
exit;
}
-
+
if (!$menuType->store())
{
josErrorAlert( $menuType->getError() );
exit;
}
-
+
if ($isNew) {
$title = JRequest::getVar( 'module_title', $menuType->menutype, 'post' );
-
+
$module =& JTable::getInstance( 'module', $database );
$module->title = $title;
$module->position = 'left';
@@ -168,7 +168,7 @@ function saveMenu() {
$module->published = 0;
$module->iscore = 0;
$module->params = 'menutype='. $menuType->menutype;
-
+
// check then store data in db
if (!$module->check()) {
josErrorAlert( $module->getError() );
@@ -180,7 +180,7 @@ function saveMenu() {
}
$module->checkin();
$module->reorder( "position='". $module->position ."'" );
-
+
// module assigned to show on All pages by default
// ToDO: Changed to become a Joomla! db-object
$query = "INSERT INTO #__modules_menu VALUES ( $module->id, 0 )";
@@ -189,14 +189,14 @@ function saveMenu() {
josErrorAlert( $database->getErrorMsg() );
exit();
}
-
+
$msg = sprintf( JText::_( 'New Menu created' ), $menuType->menutype );
}
else if ($isChanged)
{
$oldTerm = 'menutype=' . $oldType->menutype;
$newTerm = 'menutype=' . $menuType->menutype;
-
+
// change menutype being of all mod_mainmenu modules calling old menutype
$query = "SELECT id"
. "\n FROM #__modules"
@@ -205,13 +205,13 @@ function saveMenu() {
;
$database->setQuery( $query );
$modules = $database->loadResultArray();
-
+
foreach ($modules as $id) {
$row =& JTable::getInstance('module', $database );
$row->load( $id );
-
+
$row->params = str_replace( $oldTerm, $newTerm, $row->params );
-
+
// check then store data in db
if ( !$row->check() ) {
josErrorAlert( $row->getError() );
@@ -223,7 +223,7 @@ function saveMenu() {
}
$row->checkin();
}
-
+
// change menutype of all menuitems using old menutype
$query = "UPDATE #__menu"
. "\n SET menutype = '$menutype'"
@@ -231,13 +231,13 @@ function saveMenu() {
;
$database->setQuery( $query );
$database->query();
-
+
$msg = JText::_( 'Menu Items & Modules updated' );
}
-
+
$this->setRedirect( 'index2.php?option=com_menumanager', $msg );
}
-
+
/**
* Controller for a view to confirm the deletion of a menu type
*/
@@ -258,12 +258,12 @@ function delete() {
JError::raiseError( 500, $table->getError() );
return false;
}
-
+
if (!$model->canDelete()) {
JError::raiseError( 500, $model->getError() );
return false;
}
-
+
if ($this->getTask() == 'delete')
{
$err = '';
@@ -272,29 +272,29 @@ function delete() {
{
$err = $model->getError();
}
-
+
$this->setRedirect( 'index2.php?option=' . $this->_option, $err );
}
else
{
// list of menu items to delete
$menuItems = $model->getMenuItems();
-
+
// list of modules to delete
$modules = $model->getModules();
-
+
$view = new JMenuManagerConfirmDeleteView( $this );
$view->setModel( $model, true );
$view->display();
}
}
-
+
/**
* Compiles a list of the items you have selected to Copy
*/
function copyConfirm( $option, $type ) {
global $database;
-
+
// Content Items query
$query = "SELECT a.name, a.id"
. "\n FROM #__menu AS a"
@@ -303,21 +303,21 @@ function copyConfirm( $option, $type ) {
;
$database->setQuery( $query );
$items = $database->loadObjectList();
-
+
$view = new JMenuManagerConfirmCopyView( $this );
$view->display( $type, $items );
}
-
-
+
+
/**
* Copies a complete menu, all its items and creates a new module, using the name speified
*/
function copyMenu( $option, $cid, $type ) {
global $database;
-
+
$menu_name = JRequest::getVar( 'menu_name', 'New Menu', 'post' );
$module_name = JRequest::getVar( 'module_name', 'New Module', 'post' );
-
+
// check for unique menutype for new menu copy
$query = "SELECT params"
. "\n FROM #__modules"
@@ -332,7 +332,7 @@ function copyMenu( $option, $cid, $type ) {
exit;
}
}
-
+
// copy the menu items
$mids = JRequest::getVar( 'mids', array(), 'post', 'array' );
$total = count( $mids );
@@ -340,14 +340,14 @@ function copyMenu( $option, $cid, $type ) {
$original =& JTable::getInstance('menu', $database );
sort( $mids );
$a_ids = array();
-
+
foreach( $mids as $mid ) {
$original->load( $mid );
$copy = $original;
$copy->id = NULL;
$copy->parent = $a_ids[$original->parent];
$copy->menutype = $menu_name;
-
+
if ( !$copy->check() ) {
josErrorAlert( $copy->getError() );
exit();
@@ -358,7 +358,7 @@ function copyMenu( $option, $cid, $type ) {
}
$a_ids[$original->id] = $copy->id;
}
-
+
// create the module copy
$row =& JTable::getInstance('module', $database );
$row->load( 0 );
@@ -368,7 +368,7 @@ function copyMenu( $option, $cid, $type ) {
$row->position = 'left';