[Fusionforge-commits] r10523 - trunk/src/www/frs/admin

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Thu Sep 16 21:46:29 CEST 2010


Author: aljeux
Date: 2010-09-16 21:46:29 +0200 (Thu, 16 Sep 2010)
New Revision: 10523

Modified:
   trunk/src/www/frs/admin/deletepackage.php
   trunk/src/www/frs/admin/deleterelease.php
   trunk/src/www/frs/admin/editrelease.php
   trunk/src/www/frs/admin/index.php
   trunk/src/www/frs/admin/qrs.php
   trunk/src/www/frs/admin/showreleases.php
Log:
Use exit_no_group() when possible.

Modified: trunk/src/www/frs/admin/deletepackage.php
===================================================================
--- trunk/src/www/frs/admin/deletepackage.php	2010-09-16 19:37:18 UTC (rev 10522)
+++ trunk/src/www/frs/admin/deletepackage.php	2010-09-16 19:46:29 UTC (rev 10523)
@@ -36,7 +36,9 @@
 }
 
 $project =& group_get_object($group_id);
-if (!$project || $project->isError()) {
+if (!$project || !is_object($project)) {
+    exit_no_group();
+} elseif ($project->isError()) {
 	exit_error('Error',$project->getErrorMessage());
 }
 

Modified: trunk/src/www/frs/admin/deleterelease.php
===================================================================
--- trunk/src/www/frs/admin/deleterelease.php	2010-09-16 19:37:18 UTC (rev 10522)
+++ trunk/src/www/frs/admin/deleterelease.php	2010-09-16 19:46:29 UTC (rev 10523)
@@ -38,7 +38,9 @@
 }
 
 $project =& group_get_object($group_id);
-if (!$project || $project->isError()) {
+if (!$project || !is_object($project)) {
+    exit_no_group();
+} elseif ($project->isError()) {
 	exit_error('Error',$project->getErrorMessage());
 }
 

Modified: trunk/src/www/frs/admin/editrelease.php
===================================================================
--- trunk/src/www/frs/admin/editrelease.php	2010-09-16 19:37:18 UTC (rev 10522)
+++ trunk/src/www/frs/admin/editrelease.php	2010-09-16 19:46:29 UTC (rev 10523)
@@ -42,17 +42,18 @@
 	exit;
 }
 
-$g =& group_get_object($group_id);
-if (!$g || $g->isError()) {
-	exit_error('Error',$g->getErrorMessage());
+$group=group_get_object($group_id);
+if (!$group || !is_object($group)) {
+    exit_no_group();
+} elseif ($group->isError()) {
+    exit_error('Error', $group->getErrorMessage());
 }
-
 session_require_perm ('frs', $group_id, 'write') ;
 
 //
 //  Get the package
 //
-$frsp = new FRSPackage($g,$package_id);
+$frsp = new FRSPackage($group,$package_id);
 if (!$frsp || !is_object($frsp)) {
 	exit_error('Error','Could Not Get FRSPackage');
 } elseif ($frsp->isError()) {

Modified: trunk/src/www/frs/admin/index.php
===================================================================
--- trunk/src/www/frs/admin/index.php	2010-09-16 19:37:18 UTC (rev 10522)
+++ trunk/src/www/frs/admin/index.php	2010-09-16 19:46:29 UTC (rev 10523)
@@ -37,7 +37,9 @@
 }
 
 $project =& group_get_object($group_id);
-if (!$project || $project->isError()) {
+if (!$project || !is_object($project)) {
+    exit_no_group();
+} elseif ($project->isError()) {
 	exit_error('Error',$project->getErrorMessage());
 }
 

Modified: trunk/src/www/frs/admin/qrs.php
===================================================================
--- trunk/src/www/frs/admin/qrs.php	2010-09-16 19:37:18 UTC (rev 10522)
+++ trunk/src/www/frs/admin/qrs.php	2010-09-16 19:46:29 UTC (rev 10523)
@@ -39,7 +39,9 @@
 }
 
 $g =& group_get_object($group_id);
-if (!$g || $g->isError()) {
+if (!$g || !is_object($g)) {
+    exit_no_group();
+} elseif ($g->isError()) {
 	exit_error('Error',$g->getErrorMessage());
 }
 

Modified: trunk/src/www/frs/admin/showreleases.php
===================================================================
--- trunk/src/www/frs/admin/showreleases.php	2010-09-16 19:37:18 UTC (rev 10522)
+++ trunk/src/www/frs/admin/showreleases.php	2010-09-16 19:46:29 UTC (rev 10523)
@@ -46,7 +46,9 @@
 }
 
 $project =& group_get_object($group_id);
-if (!$project || $project->isError()) {
+if (!$project || !is_object($project)) {
+    exit_no_group();
+} elseif ($project->isError()) {
 	exit_error('Error',$project->getErrorMessage());
 }
 




More information about the Fusionforge-commits mailing list