[zi-cvs] packages/com.zzoss.zic packages.php,1.11,1.12
Sandro Zic <[email protected]> Sat, 03 Apr 2004 16:42:38 +0000
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32675/com.zzoss.zic
Modified Files:
packages.php
Log Message:
don't show plugins manager in prod mode, if there are no plugins
Index: packages.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** packages.php 3 Apr 2004 16:15:48 -0000 1.11
--- packages.php 3 Apr 2004 16:42:36 -0000 1.12
***************
*** 88,91 ****
--- 88,92 ----
***************************************************************************/
+ ob_start();
include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
//print_r($_REQUEST);
***************
*** 136,140 ****
$portlet_pkg = new ZZOSS_PortletPackage;
$portlet_pkg->setRegistry($zi_registry);
! $portlet_pkg->showList($pkg_type);
}
?>
--- 137,156 ----
$portlet_pkg = new ZZOSS_PortletPackage;
$portlet_pkg->setRegistry($zi_registry);
! if(!$portlet_pkg->showList($pkg_type) && $pkg_type == 'plugin'){
! // There are no plugins
! if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev'){
! // in dev mode, we show the message
! ob_end_flush();
! echo '<div class="warning">No '.$pkg_type.'s available.</div>';
! } else {
! ob_end_clean();
! // in prod mode, we redirect
! $_REQUEST['type'] = 'package';
! header('Location: packages_reset.php'.zi_form_querystr());
! exit;
! }
! } else {
! ob_end_flush();
! }
}
?>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click