| 97 |
$i++; |
$i++; |
| 98 |
} |
} |
| 99 |
|
|
| 100 |
// Query to get published menu item counts |
$menuhandler = mosMenuHandler::getInstance(); |
|
$query = "SELECT a.menutype, count( a.menutype ) as num" |
|
|
. "\n FROM #__menu AS a" |
|
|
. "\n WHERE a.published = 1" |
|
|
. "\n GROUP BY a.menutype" |
|
|
. "\n ORDER BY a.menutype" |
|
|
; |
|
|
$database->setQuery( $query ); |
|
|
$published = $database->loadObjectList(); |
|
|
|
|
|
// Query to get unpublished menu item counts |
|
|
$query = "SELECT a.menutype, count( a.menutype ) as num" |
|
|
. "\n FROM #__menu AS a" |
|
|
. "\n WHERE a.published = 0" |
|
|
. "\n GROUP BY a.menutype" |
|
|
. "\n ORDER BY a.menutype" |
|
|
; |
|
|
$database->setQuery( $query ); |
|
|
$unpublished = $database->loadObjectList(); |
|
|
|
|
|
// Query to get trash menu item counts |
|
|
$query = "SELECT a.menutype, count( a.menutype ) as num" |
|
|
. "\n FROM #__menu AS a" |
|
|
. "\n WHERE a.published = -2" |
|
|
. "\n GROUP BY a.menutype" |
|
|
. "\n ORDER BY a.menutype" |
|
|
; |
|
|
$database->setQuery( $query ); |
|
|
$trash = $database->loadObjectList(); |
|
| 101 |
|
|
| 102 |
for( $i = 0; $i < $total; $i++ ) { |
for( $i = 0; $i < $total; $i++ ) { |
| 103 |
// adds published count |
$count = $menuhandler->getMenuCount($menus[$i]->type, 1); |
| 104 |
foreach ( $published as $count ) { |
$menus[$i]->published = $count ? $count : '-'; |
| 105 |
if ( $menus[$i]->type == $count->menutype ) { |
$count = $menuhandler->getMenuCount($menus[$i]->type, 0); |
| 106 |
$menus[$i]->published = $count->num; |
$menus[$i]->unpublished = $count ? $count : '-'; |
| 107 |
} |
$count = $menuhandler->getMenuCount($menus[$i]->type, -2); |
| 108 |
} |
$menus[$i]->trash = $count ? $count : '-'; |
|
if ( @!$menus[$i]->published ) { |
|
|
$menus[$i]->published = '-'; |
|
|
} |
|
|
// adds unpublished count |
|
|
foreach ( $unpublished as $count ) { |
|
|
if ( $menus[$i]->type == $count->menutype ) { |
|
|
$menus[$i]->unpublished = $count->num; |
|
|
} |
|
|
} |
|
|
if ( @!$menus[$i]->unpublished ) { |
|
|
$menus[$i]->unpublished = '-'; |
|
|
} |
|
|
// adds trash count |
|
|
foreach ( $trash as $count ) { |
|
|
if ( $menus[$i]->type == $count->menutype ) { |
|
|
$menus[$i]->trash = $count->num; |
|
|
} |
|
|
} |
|
|
if ( @!$menus[$i]->trash ) { |
|
|
$menus[$i]->trash = '-'; |
|
|
} |
|
| 109 |
} |
} |
| 110 |
|
|
| 111 |
require_once( $GLOBALS['mosConfig_absolute_path'] . '/administrator/includes/pageNavigation.php' ); |
require_once( $GLOBALS['mosConfig_absolute_path'] . '/administrator/includes/pageNavigation.php' ); |
| 275 |
} |
} |
| 276 |
|
|
| 277 |
// list of menu items to delete |
// list of menu items to delete |
| 278 |
$query = "SELECT a.name, a.id" |
$menuhandler = mosMenuHandler::getInstance(); |
| 279 |
. "\n FROM #__menu AS a" |
$items =& $menuhandler->getMenusByType($type); |
|
. "\n WHERE ( a.menutype IN ( '$type' ) )" |
|
|
. "\n ORDER BY a.name" |
|
|
; |
|
|
$database->setQuery( $query ); |
|
|
$items = $database->loadObjectList(); |
|
| 280 |
|
|
| 281 |
// list of modules to delete |
// list of modules to delete |
| 282 |
$query = "SELECT id" |
$query = "SELECT id" |
| 374 |
global $database; |
global $database; |
| 375 |
|
|
| 376 |
// Content Items query |
// Content Items query |
| 377 |
$query = "SELECT a.name, a.id" |
$menuhandler = mosMenuHandler::getInstance(); |
| 378 |
. "\n FROM #__menu AS a" |
$items =& $menuhandler->getMenusByType($type); |
|
. "\n WHERE ( a.menutype IN ( '". $type ."' ) )" |
|
|
. "\n ORDER BY a.name" |
|
|
; |
|
|
$database->setQuery( $query ); |
|
|
$items = $database->loadObjectList(); |
|
| 379 |
|
|
| 380 |
HTML_menumanager::showCopy( $option, $type, $items ); |
HTML_menumanager::showCopy( $option, $type, $items ); |
| 381 |
} |
} |