Added hasChair() function as someone added it on prod servers...
authorJean-Guilhem Rouel <jean-gui@w3.org>
Fri, 18 Apr 2014 15:09:24 +0200
changeset 326 8dd8caae67d7
parent 325 2018dac79d97
child 327 f3d94f45545b
Added hasChair() function as someone added it on prod servers...
src/Org/W3/Cg/Pub/SpecBundle/Controller/ReportController.php
vendor/w3/lib/W3/ProposedGroup.php
--- a/src/Org/W3/Cg/Pub/SpecBundle/Controller/ReportController.php	Fri Apr 18 14:34:02 2014 +0200
+++ b/src/Org/W3/Cg/Pub/SpecBundle/Controller/ReportController.php	Fri Apr 18 15:09:24 2014 +0200
@@ -100,7 +100,7 @@
                      
                     break;
                 }
-                $report = array('name'=>$gr_obj->getName(),'shortName'=>$gr_obj->getShortName(),'draft'=>array(),'final'=>array(),'hasSpec'=>false,'hasAccess'=>$gr_obj->hasAccess($this->getLogin()->login),'isChair'=>$gr_obj->isChair($this->getLogin()),'hasCommitRight' => $has_commit_right, 'user' => $user);
+                $report = array('name'=>$gr_obj->getName(),'shortName'=>$gr_obj->getShortName(),'draft'=>array(),'final'=>array(),'hasSpec'=>false,'hasAccess'=>$gr_obj->hasAccess($this->getLogin()->login),'isChair'=>$gr_obj->isChair($this->getLogin()),'hasCommitRight' => $has_commit_right, 'user' => $user, 'hasChair'=>$gr_obj->hasChair()));
                 if($specPGs != null){
 			foreach($specPGs as $specPG){
 				$revs = $this->getSpecRevsBySpecId($specPG->getSpec()->getId());
--- a/vendor/w3/lib/W3/ProposedGroup.php	Fri Apr 18 14:34:02 2014 +0200
+++ b/vendor/w3/lib/W3/ProposedGroup.php	Fri Apr 18 15:09:24 2014 +0200
@@ -178,7 +178,13 @@
 	public function isChair($member){
 		return in_array((int)$member->id, $this->_chairs);
 	}
-	
+
+  /** Needs review by Hiro/Hiroto **/
+  public function hasChair() {
+      return !empty($this->_chairs);
+  }
+/********************************/
+
 	/**
 	 * Return if user has access to this proposed group or not.
 	 * @param String $user_login