new feature: http://lists.w3.org/Archives/Member/w3c-tools/2010OctDec/0005.html default tip
authorDominique Hazaël-Massieux <dom@w3.org>
Mon, 06 Dec 2010 18:24:59 +0100
changeset 1 69000a8e604d
parent 0 8f567f29340d
new feature: http://lists.w3.org/Archives/Member/w3c-tools/2010OctDec/0005.html
src/actions.php
src/changelog.php
src/config.php
src/index.php
src/issues.php
src/objects.phi
src/options.php
src/trackerlib.phi
src/user.php
--- a/src/actions.php	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/actions.php	Mon Dec 06 18:24:59 2010 +0100
@@ -37,7 +37,7 @@
  // checking at least one action was selected
  && is_array($_POST['actions']) && count($_POST['actions'])
  // Checking at least one operation was requested
- && ($_POST["status"]!=-1 || $_POST["due"]!='No change' || $_POST["product"]!=-1)) {
+ && ($_POST["status"]!=-1 || $_POST["due"]!='No change' || $_POST["product"]!=-1 || $_POST["issue"]!=-1)) {
  		// Checking credentials
  		// Only WG participants are allowed
  	if (!$u) {
@@ -73,10 +73,20 @@
  			$changelog[]="are associated with product &quot;".htmlify($p->name)."&quot;";
  		}
  	}
+ 	if (intval($_POST["issue"])!=-1) {
+ 		$newissueid =$_POST["issue"];
+ 		$i = new Issue();
+ 		if (!$i->load($newissueid,$wg->id)) {
+ 			$newissueid = false;
+ 		} else {
+ 			$changelog[]="are associated with ISSUE-".htmlify($i->id).($i->nickname ? " “".htmlify($i->nickname)."”" : "");
+ 		}
+ 	}
+
  	foreach (array_keys($_POST["actions"]) as $actionid) {
  		$action = new Action();
  		$action->load($actionid,$wg->id);
- 		if ($action->update(false,false,$newduedate,$newstatus,false,$newproductid,$u->id)) {
+ 		if ($action->update(false,false,$newduedate,$newstatus,$newissueid,$newproductid,$u->id)) {
  			$editedactions[]=$action->id;
  		}
   	}
@@ -104,6 +114,10 @@
  			$status = ANY;
  	}
  }
+
+$issues = $wg->listIssues(array(RAISED,OPEN,PENDINGREVIEW));
+$closedissues = $wg->listIssues(array(CLOSED,POSTPONED));
+$products = $wg->listProducts();
   
  $editRights = ($u ? $u->isMemberOf($wg->wgid) : true);
  	
@@ -143,10 +157,26 @@
 <li><label>Update due date to: 
 <input class="w8em format-y-m-d divider-dash highlight-days-67  no-transparency"
 type="text" name="due" value="No change" size="10" /></label></li>
+<li><label>Associate to issue: <select name='issue'>
+<option value='-1'>No change</option>
+<optgroup label="Open issues">
+	<?php
+	foreach ($issues->list as $issue) {
+		echo("<option value=\"" . $issue->id . "\">ISSUE-".$issue->id. ($issue->nickname ? ": ".htmlify($issue->nickname) : "")."</option>\n");
+	}
+	?>
+</optgroup>
+<optgroup label="Closed issues">
+	<?php
+	foreach ($closedissues->list as $issue) {
+		echo("<option value=\"" . $issue->id . "\">ISSUE-".$issue->id. ($issue->nickname ? ": ".htmlify($issue->nickname) : "") . "</option>\n");
+	}
+	?>
+</optgroup>
+</li>
 <li><label>Associate to product: <select name='product'>
 <option value='-1'>No change</option>
 <?php
-$products = $wg->listProducts();
 foreach($products->list as $p) {
 	echo "<option title='".htmlify($p->name)."' value='".$p->id."'>".
 	elipsize(htmlify($p->name),35)."</option>\n";
@@ -159,6 +189,6 @@
 	displayactionslist($actions,$qualifier,true,$sort,$editRights);
 	echo "</form>";
 	echo "<script type='text/javascript'>addSelectAllButtons('actions')</script>\n";
-	echo "<p><a href='". $wg->uribase. "actions/new'>Add a new action item</a>.
-	 See <a href='". $wg->uribase. "actions/'>all the action items</a></p>";
-WriteHTMLFoot('$Id: actions.php,v 1.14 2009/08/06 13:54:35 dom Exp $',$wg);
+	echo "<p><a href='". $wg->relativeuribase. "actions/new'>Add a new action item</a>.
+	 See <a href='". $wg->relativeuribase. "actions/'>all the action items</a></p>";
+WriteHTMLFoot('$Id: actions.php,v 1.19 2010/12/03 12:09:08 dom Exp $',$wg);
--- a/src/changelog.php	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/changelog.php	Mon Dec 06 18:24:59 2010 +0100
@@ -75,7 +75,7 @@
 if (count($changedissues->list)) {
 	echo "<dl class='changelist'>";
  	foreach($changedissues->list as $issue) {
- 		echo "<dt><a href='".$wg->uribase."issues/".$issue->id."'"
+ 		echo "<dt><a href='".$wg->relativeuribase."issues/".$issue->id."'"
  		." title='".htmlify($issue->title)."'"
  		.">ISSUE-".$issue->id."</a>"
  		.($issue->nickname ? " [".htmlify($issue->nickname)."]" : "")
@@ -122,7 +122,7 @@
  if (count($changedactions->list)) {
 	echo "<dl class='changelist'>";
  	foreach($changedactions->list as $action) {
- 		echo "<dt><a href='".$wg->uribase."actions/".$action->id."'"
+ 		echo "<dt><a href='".$wg->relativeuribase."actions/".$action->id."'"
  		.">ACTION-".$action->id."</a>: "
  		.htmlify($action->owner->name)." to ".htmlify($action->title)
  		." (".$action->_readableStatus[$action->status].")</dt>\n";
@@ -164,5 +164,5 @@
 	echo "<p>No actions were modified in this period.</p>";
 }
  
- WriteHTMLFoot('$Id: changelog.php,v 1.30 2009/08/06 13:55:41 dom Exp $',$wg);
+ WriteHTMLFoot('$Id: changelog.php,v 1.31 2010/12/02 17:27:34 dom Exp $',$wg);
 ?>
\ No newline at end of file
--- a/src/config.php	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/config.php	Mon Dec 06 18:24:59 2010 +0100
@@ -10,7 +10,7 @@
 foreach($wgs as $wg) {
 	$wg->loadConfig();
 	$wg->loadExtraConfig();	
-    echo "  <tracker wgid='".(int) $wg->id."'>\n".
+    echo "  <tracker wgid='".(int) $wg->id."' ns='".htmlify($wg->shortname)."'>\n".
       "    <mailinglist email='".htmlify($wg->mailinglist)."' />\n".
       "    <uribase uri='".htmlify($wg->uribase)."' />\n".
       "    <irc channel='".htmlify($wg->ircchannel)."' />\n".
--- a/src/index.php	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/index.php	Mon Dec 06 18:24:59 2010 +0100
@@ -134,7 +134,7 @@
 		$actions = $p->listActionItems();
 	}
 	displayactionslist($actions,$qualifier);
-	echo "<p><a href='". $wg->uribase. "actions/new'>Add a new action item</a>.</p>";
+	echo "<p><a href='". $wg->relativeuribase. "actions/new'>Add a new action item</a>.</p>";
 }
 
 
@@ -184,7 +184,7 @@
 
 <p>Use this page to create a new product - a product is typically a
 deliverable of the group.</p>
-<form method="post" action="<?= $wg->uribase; ?>">
+<form method="post" action="<?= $wg->relativeuribase; ?>">
 <div><input type="hidden" name="do" value="createproduct" />
 
 <p>Name:<br />
@@ -213,7 +213,7 @@
 }
 ?>
 </p>
-<form method="post" action="<?= $wg->uribase; ?>">
+<form method="post" action="<?= $wg->relativeuribase; ?>">
 <div><input type="hidden" name="do" value="createissue" />
 
 <p>Nickname: <br />
@@ -269,7 +269,7 @@
 	$products = $wg->listProducts();
 	$users = $wg->listMembers();
 	?>
-<form method="post" action="<?= $wg->uribase; ?>">
+<form method="post" action="<?= $wg->relativeuribase; ?>">
 <div><input type="hidden" name="do" value="createaction" />
 
 <p>Title:<br />
@@ -366,7 +366,7 @@
 	   $users[] = new User($issue->owner->id);
 	}
 	?>
-<form method="post" action="<?= $wg->uribase; ?>">
+<form method="post" action="<?= $wg->relativeuribase; ?>">
 <div><input type="hidden" name="do" value="updateissue" /> <input
 	type="hidden" name="id" value="<?= $issue->id; ?>" />
 <p>Nickname: <br />
@@ -456,7 +456,7 @@
 	$products = $wg->listProducts();
 
 	?>
-<form method="post" action="<?= $wg->uribase; ?>">
+<form method="post" action="<?= $wg->relativeuribase; ?>">
 <div><input type="hidden" name="do" value="updateaction" /> <input
 	type="hidden" name="id" value="<?= $action->id; ?>" />
 
@@ -555,8 +555,8 @@
 	displayissueinfo($issue,$showchangelog);
 	if (!$showchangelog) {
 		echo "<p>Display <a href='".
-			htmlify($wg->uribase)."issues/".htmlify($issue->id)."?changelog'>change log</a>"
-			." <a href='".htmlify($wg->uribase)."issues/".htmlify($issue->id).".atom'>"
+			htmlify($wg->relativeuribase)."issues/".htmlify($issue->id)."?changelog'>change log</a>"
+			." <a href='".htmlify($wg->relativeuribase)."issues/".htmlify($issue->id).".atom'>"
 			."<img src='/2008/site/images/icons/atom'
 			 alt='ATOM feed' width='12' height='12' /></a>"
 			."</p>\n" ;
@@ -578,16 +578,16 @@
  	echo '<title>'.htmlify($wg->name)
  		.'’s ISSUE-'.$id.($issue->nickname ? ' ('.htmlify($issue->nickname).')' : '')
  		.' changelog </title>';
- 	echo '<link rel="self" href="'.htmlify($wg->uribase."issues/$id.atom").'"/>';
- 	echo '<link rel="related" href="'.htmlify($wg->uribase."issues/$id").'"/>';
+ 	echo '<link rel="self" href="'.htmlify($wg->relativeuribase."issues/$id.atom").'"/>';
+ 	echo '<link rel="related" href="'.htmlify($wg->relativeuribase."issues/$id").'"/>';
  	echo '<updated>'.htmlify($updated).'</updated>';
  	echo '<author><name>'.htmlify($wg->name).'’s Tracker</name></author>';
- 	echo '<id>'.htmlify($wg->uribase."issues/$id.atom").'</id>';
+ 	echo '<id>'.htmlify($wg->relativeuribase."issues/$id.atom").'</id>';
  	if (count($changelog)  > 0) {
 		foreach($changelog as $note) {
  		echo '<entry>';
    		echo '<title>'.htmlify($note->note).'</title>';
-   		echo '<id>'.htmlify($wg->uribase."issues/".$id."#".gmdate("Y-m-d\TH:i:s\Z",$note->entered)).'</id>';
+   		echo '<id>'.htmlify($wg->relativeuribase."issues/".$id."#".gmdate("Y-m-d\TH:i:s\Z",$note->entered)).'</id>';
    		echo '<updated>'. htmlify(gmdate("Y-m-d\TH:i:s\Z",$note->entered)) . '</updated>';
    		if ($note->author) {
    			echo '<author><name>'.htmlify($note->author->name).'</name></author>';
@@ -606,7 +606,7 @@
 	global $wg;
 	displayactioninfo($action,$showchangelog);
 	if (!$showchangelog) {
-		echo "<p>Display <a href='".$wg->uribase."/actions/".$action->id."?changelog'>change log</a>.</p>\n" ;
+		echo "<p>Display <a href='".$wg->relativeuribase."/actions/".$action->id."?changelog'>change log</a>.</p>\n" ;
 	}
 
 }
@@ -650,7 +650,7 @@
         echo strtoupper($issue->_readableStatus[$issue->status]);
 	echo("</dd>\n");
 	echo("<dt>Product:</dt>\n<dd>" . htmlify($issue->product->name) . "</dd>\n");
-	echo("<dt>Raised by:</dt>\n<dd><a href='".$wg->uribase."users/" 
+	echo("<dt>Raised by:</dt>\n<dd><a href='".$wg->relativeuribase."users/" 
 		.htmlify($action->owner->id)."'>" . htmlify($issue->owner->name) . "</a></dd>\n");
 	echo("<dt>Opened on:</dt>\n<dd>" . gmdate("Y-m-d",$issue->created) . "</dd>\n");
 
@@ -663,7 +663,7 @@
 		echo "<ul>";
 		foreach($actions->list as $action) {
 			echo "<li>".($action->status==CLOSED  ? "<del class='closed'>": "").
-			"<a href='".htmlify($wg->uribase)."actions/".$action->id."'>ACTION-".$action->id.
+			"<a href='".htmlify($wg->relativeuribase)."actions/".$action->id."'>ACTION-".$action->id.
 			"</a> on ".htmlify($action->owner->name)." to ".htmlify($action->title)." - due ".
 			"<span class='date".($action->duedate < time() && $action->status==OPEN ? 
 			" overdue":"")."'>".
@@ -740,7 +740,7 @@
 	$id = $action->id;
 
 	if (isset($_REQUEST["v"])) {
-		echo("<p><a href=\"" .$wg->uribase. "actions/" . $id . "/edit\">Edit this action</a></p>\n");
+		echo("<p><a href=\"" .$wg->relativeuribase. "actions/" . $id . "/edit\">Edit this action</a></p>\n");
 	}
 
 	echo("<h2>" . addlinks($action->title) . "</h2>\n");
@@ -749,7 +749,7 @@
 	global $humanReadableState;
 	echo $humanReadableState[$action->status];
 	echo("</dd>\n");
-	echo("<dt>Person:</dt>\n<dd><a href='".$wg->uribase."users/" 
+	echo("<dt>Person:</dt>\n<dd><a href='".$wg->relativeuribase."users/" 
 		.htmlify($action->owner->id)."' title='Tracker summary for "
 		.htmlify($action->owner->name)."'>" . htmlify($action->owner->name) 
 		. "</a></dd>\n");
@@ -762,9 +762,9 @@
 	// Not used at this time? @@@
 	//  echo("<dt>URI:</dt>\n<dd></dd>\n");
 	if ($action->issue) {
-		echo "<dt>Associated Issue:</dt>\n<dd><a href='".$wg->uribase.'issues/'.$action->issue->id."'>".($action->issue->nickname ? htmlify($action->issue->nickname) : "ISSUE-".$action->issue->id)."</a></dd>\n" ;
+		echo "<dt>Associated Issue:</dt>\n<dd><a href='".$wg->relativeuribase.'issues/'.$action->issue->id."'>".($action->issue->nickname ? htmlify($action->issue->nickname) : "ISSUE-".$action->issue->id)."</a></dd>\n" ;
 	} else if ($action->product) {
-		echo "<dt>Associated Product:</dt>\n<dd><a href='".$wg->uribase.'products/'.$action->product->id."'>".htmlify($action->product->name)."</a></dd>\n" ;
+		echo "<dt>Associated Product:</dt>\n<dd><a href='".$wg->relativeuribase.'products/'.$action->product->id."'>".htmlify($action->product->name)."</a></dd>\n" ;
 	}
 
 	$emails = $action->listEmails();
@@ -820,7 +820,7 @@
 	$issue->create($wg->id,$_POST["title"],$_POST["raisedby"],$_POST["description"]
 		,$_POST["product"],$_POST["nickname"],$public,$wg->defaultIssueState, $userid);
 
-	echo("<p><a href='".$wg->uribase."issues/".$issue->id."'>ISSUE-".$issue->id."</a> added to database</p>\n");
+	echo("<p><a href='".$wg->relativeuribase."issues/".$issue->id."'>ISSUE-".$issue->id."</a> added to database</p>\n");
 
 	displayissueinfo($issue);
 	$to = ($issue->product->mailinglist ? $issue->product->mailinglist : $wg->mailinglist);
@@ -862,7 +862,7 @@
 	if ($action->create($wg->id,$_POST["action"],$_POST["user"],$due,$issueid,$productid,$userid)) {
 		echo("<p>ACTION-".$action->id." added to database - <a href='actions/".$action->id."/edit'>edit</a>.</p>\n");
 
-		echo("<h1><a href=\"" .$wg->uribase. "actions/" . $action->id . "\">ACTION-" . $action->id . "</a></h1>\n");
+		echo("<h1><a href=\"" .$wg->relativeuribase. "actions/" . $action->id . "\">ACTION-" . $action->id . "</a></h1>\n");
 
 		displayactioninfo($action);
 	} else {
@@ -1022,7 +1022,7 @@
 	}
 
 	_addTags($wg->id);
-	echo("<p><a href='".$wg->uribase."issues/".$issue->id."'>ISSUE-".$issue->id."</a> updated in database</p>\n");
+	echo("<p><a href='".$wg->relativeuribase."issues/".$issue->id."'>ISSUE-".$issue->id."</a> updated in database</p>\n");
 	editissue($issue);
 }
 
@@ -1112,7 +1112,7 @@
 	}
 	_addTags($wg->id);
 	
-	echo("<p><a href='".$wg->uribase."actions/".$action->id."'>ACTION-".$action->id."</a> updated in database</p>\n");
+	echo("<p><a href='".$wg->relativeuribase."actions/".$action->id."'>ACTION-".$action->id."</a> updated in database</p>\n");
 
 
 
@@ -1321,10 +1321,10 @@
 		}
 		$count++;
 		echo "<td>".$product->id."
-		<a href='".$wg->uribase."products/".$product->id."/edit' title='Edit Product ".$product->id."'>
+		<a href='".$wg->relativeuribase."products/".$product->id."/edit' title='Edit Product ".$product->id."'>
 		<img width='8' height='12' src='/2002/09/wbs/icons/stock_edit2' alt=' (edit)'  />
 		</a></td>\n" ;
-		echo "<td><a href='".$wg->uribase."products/".$product->id."'>".htmlify($product->name)."</a></td>\n" ;
+		echo "<td><a href='".$wg->relativeuribase."products/".$product->id."'>".htmlify($product->name)."</a></td>\n" ;
 
 		$issues = $product->listIssues(array(RAISED,OPEN,PENDINGREVIEW));
 		echo("<td>" . count($issues->list) . "</td>\n");
@@ -1510,16 +1510,16 @@
         $operation = array();
 	switch($do) {
 		case 'showissue':
-			$operation = array('link'=>$wg->uribase.'issues/'.$id.'/edit','text'=>"Edit this issue");
-			$feed=$wg->uribase.'issues/'.$id.'.atom';
+			$operation = array('link'=>$wg->relativeuribase.'issues/'.$id.'/edit','text'=>"Edit this issue");
+			$feed=$wg->relativeuribase.'issues/'.$id.'.atom';
 			break;
 		case 'updateaction':
 		case 'showaction':
-			$operation = array('link'=>$wg->uribase.'actions/'.$id.'/edit','text'=>"Edit this action");
+			$operation = array('link'=>$wg->relativeuribase.'actions/'.$id.'/edit','text'=>"Edit this action");
 			break;
 		case 'showproduct':
 			if (intval($product)) {
-				$operation = array('link'=>$wg->uribase.'products/'.$product.'/edit','text'=>"Edit this product");
+				$operation = array('link'=>$wg->relativeuribase.'products/'.$product.'/edit','text'=>"Edit this product");
 			}
 			break;
 	}
@@ -1546,9 +1546,9 @@
 		echo "<h2>".$actionqualifier." Actions</h2>\n";
 		showactions($status,false,$product);
 		if ($_GET['status']=='all') {
-			echo "<p>See only <a href='".htmlify($wg->uribase)."products/".$product."'>open and raised issues and actions</a>.</p>";
+			echo "<p>See only <a href='".htmlify($wg->relativeuribase)."products/".$product."'>open and raised issues and actions</a>.</p>";
 		} else {
-			echo "<p>See <a href='".htmlify($wg->uribase)."products/".$product."/all'>all issues and actions for this product</a>.</p>";
+			echo "<p>See <a href='".htmlify($wg->relativeuribase)."products/".$product."/all'>all issues and actions for this product</a>.</p>";
 		}
 	} else if ($do == "newproduct") {
 		newproduct();
@@ -1591,7 +1591,7 @@
 	}
 
 
-	WriteHTMLFoot('$Id: index.php,v 1.275 2010/11/21 17:14:38 dom Exp $',$wg);
+	WriteHTMLFoot('$Id: index.php,v 1.276 2010/12/02 17:26:02 dom Exp $',$wg);
 }
 
 ?>
--- a/src/issues.php	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/issues.php	Mon Dec 06 18:24:59 2010 +0100
@@ -156,5 +156,5 @@
 	displayissueslist($issues,$qualifier,true,$sort,$editRights);
 	echo "</form>";
 	echo "<script type='text/javascript'>addSelectAllButtons('issues')</script>\n";
-	echo "<p><a href='". $wg->uribase. "issues/new'>Raise an issue </a>.</p>";
-WriteHTMLFoot('$Id: issues.php,v 1.10 2009/08/06 13:54:53 dom Exp $',$wg);
+	echo "<p><a href='". $wg->relativeuribase. "issues/new'>Raise an issue </a>.</p>";
+WriteHTMLFoot('$Id: issues.php,v 1.11 2010/12/02 17:27:46 dom Exp $',$wg);
--- a/src/objects.phi	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/objects.phi	Mon Dec 06 18:24:59 2010 +0100
@@ -2,7 +2,7 @@
 /**
  * This library defines classes that are used for Tracker
  * @package Tracker
- * @version $Id: objects.phi,v 1.293 2010/10/20 15:58:09 dom Exp $
+ * @version $Id: objects.phi,v 1.295 2010/12/06 09:22:06 dom Exp $
  * @author Dominique Hazael-Massieux, Ted Guild, Vivien Lacourba
 */
 
@@ -46,6 +46,7 @@
 */
 class TrackerWorkingGroup extends WorkingGroup {
   var $uribase;
+  var $relativeuribase;
   /**
    * Mailing list to which new issues are announced
    *
@@ -94,6 +95,7 @@
   var $ircchannel ;
   var $conferenceid;
   var $minutesacls ;
+  var $shortname;
   
   /**
    * @return ActionList
@@ -214,6 +216,7 @@
     ."issueProcess, notifyNewAction, UNIX_TIMESTAMP(last) FROM config WHERE wgid=".$this->id);
     if (is_array($data) && count($data)) {
       $this->uribase = $data[0];
+      $this->relativeuribase = str_replace(array('http://www.w3.org', 'https://www.w3.org'), '', $this->uribase);
       $this->mailinglist = $data[1];
       $this->acls = $data[2];
       $this->issueProcess = $data[3];
@@ -230,7 +233,7 @@
   }
 
   function loadExtraConfig() {
-  	$data = $this->_getFromDb("SELECT ircchannel, conferenceid, watchedlist, defaultminacls, UNIX_TIMESTAMP(c.last)
+  	$data = $this->_getFromDb("SELECT ircchannel, conferenceid, watchedlist, defaultminacls, shortname, UNIX_TIMESTAMP(c.last)
   	 FROM config c LEFT OUTER JOIn watchedmailinglists w ON w.wgid=c.wgid WHERE c.wgid=".$this->id);
   	if (!is_array($data[0])) {
   		$data = array($data);
@@ -240,6 +243,7 @@
   		$this->conferenceid = $row[1];
   		$this->watchedlists[] = $row[2];
   		$this->minutesacls = $row[3];
+  		$this->shortname = $row[4];
   	}
   }
 }
--- a/src/options.php	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/options.php	Mon Dec 06 18:24:59 2010 +0100
@@ -23,6 +23,8 @@
 WriteHTMLTop("Options of the ".htmlify($wg->name)." Tracker",$wg);
 ?>
 <dl>
+<dt>Shortname (<a href='/2005/06/tracker/email#prefix'>what is for?</a>)</dt>
+<dd><?php echo ($wg->shortname ? htmlify($wg->shortname) : "none — ask sysreq@w3.org to set one")?></dd>
 <dt>IRC Channel</dt>
 <dd><?php echo htmlify($wg->ircchannel);
 if (substr($wg->ircchannel,0,1)=="#") {
@@ -82,5 +84,5 @@
 ?></dd>
 </dl>
 <?php
-WriteHTMLFoot('$Id: options.php,v 1.10 2010/05/21 15:16:14 dom Exp $',$wg);
+WriteHTMLFoot('$Id: options.php,v 1.13 2010/12/06 17:12:23 dom Exp $',$wg);
 ?>
\ No newline at end of file
--- a/src/trackerlib.phi	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/trackerlib.phi	Mon Dec 06 18:24:59 2010 +0100
@@ -2,7 +2,7 @@
 /**
  * This library defines utility functions for Tracker
  * @package Tracker
- * @version $Id: trackerlib.phi,v 1.82 2010/11/21 17:11:27 dom Exp $
+ * @version $Id: trackerlib.phi,v 1.84 2010/12/03 12:58:56 dom Exp $
  * @author Dominique Hazael-Massieux, Ted Guild, Vivien Lacourba
 */
 
@@ -22,10 +22,10 @@
   		    $res .= preg_replace($uri_regexp.'e',"'<a href=\''.htmlify('\\1').'\'>'.htmlify('\\1').'</a>'",$match);
   	} else {
   		$match = htmlify($match);
-  		$match = preg_replace('/(issue\-([0-9]+))/i', "<a href=\"" . $wg->uribase . "issues/\\2\">\\1</a>", $match);
-  		$match = preg_replace('/(ISSUE\s+([0-9]+))/', "<a href=\"" . $wg->uribase . "issues/\\2\">\\1</a>", $match);
-  		$match = preg_replace('/(action\-([0-9]+))/i', "<a href=\"" . $wg->uribase . "actions/\\2\">\\1</a>", $match);
-  		$match = preg_replace('/(ACTION\s+([0-9]+))/', "<a href=\"" . $wg->uribase . "actions/\\2\">\\1</a>", $match);
+  		$match = preg_replace('/(issue\-([0-9]+))/i', "<a href=\"" . $wg->relativeuribase . "issues/\\2\">\\1</a>", $match);
+  		$match = preg_replace('/(ISSUE\s+([0-9]+))/', "<a href=\"" . $wg->relativeuribase . "issues/\\2\">\\1</a>", $match);
+  		$match = preg_replace('/(action\-([0-9]+))/i', "<a href=\"" . $wg->relativeuribase . "actions/\\2\">\\1</a>", $match);
+  		$match = preg_replace('/(ACTION\s+([0-9]+))/', "<a href=\"" . $wg->relativeuribase . "actions/\\2\">\\1</a>", $match);
   		$res .= $match;
   	}
   }
@@ -65,39 +65,39 @@
 ?>
   <h3><a href='<?= htmlify($wg->homepage);?>'><?= $wg->name; ?></a> Issue Tracking</h3>
   <ul>
-    <li><a href="<?= $wg->uribase; ?>">Summary</a></li>
+    <li><a href="<?= $wg->relativeuribase; ?>">Summary</a></li>
   <li>Issues: 
      <ul>
      <?php if (strstr($wg->issueProcess,'R')) {
-     ?><li><a href="<?= $wg->uribase; ?>issues/raised">Raised</a></li>
+     ?><li><a href="<?= $wg->relativeuribase; ?>issues/raised">Raised</a></li>
      <? }  ?>
-<li><a href="<?= $wg->uribase; ?>issues/open">Open</a></li>
+<li><a href="<?= $wg->relativeuribase; ?>issues/open">Open</a></li>
 <?php  if (strstr($wg->issueProcess,'P')) {
-     ?><li><a href="<?= $wg->uribase; ?>issues/pendingreview">Pending Review</a></li>
+     ?><li><a href="<?= $wg->relativeuribase; ?>issues/pendingreview">Pending Review</a></li>
      <? } ?>
-        <li><a href="<?= $wg->uribase; ?>issues/closed">Closed</a></li>      
+        <li><a href="<?= $wg->relativeuribase; ?>issues/closed">Closed</a></li>      
      <?php  if (strstr($wg->issueProcess,'T')) {
-     ?><li><a href="<?= $wg->uribase; ?>issues/postponed">Postponed</a></li>
+     ?><li><a href="<?= $wg->relativeuribase; ?>issues/postponed">Postponed</a></li>
      <? } ?>
-         <li><a href="<?= $wg->uribase; ?>issues">All</a></li>
-         <li><a href="<?= $wg->uribase; ?>issues/new">Create</a></li>
+         <li><a href="<?= $wg->relativeuribase; ?>issues">All</a></li>
+         <li><a href="<?= $wg->relativeuribase; ?>issues/new">Create</a></li>
       </ul>
   </li>
   <li>Actions:
   <ul>
-      <li><a href="<?= $wg->uribase; ?>actions/open">Open</a></li>
-      <li><a href="<?= $wg->uribase; ?>actions/overdue">Overdue</a></li>
-      <li><a href="<?= $wg->uribase; ?>actions/closed">Closed</a></li>
-      <li><a href="<?= $wg->uribase; ?>actions/pendingreview">Pending Review</a></li>
-<li><a href="<?= $wg->uribase; ?>actions/new">Raise</a></li>
+      <li><a href="<?= $wg->relativeuribase; ?>actions/open">Open</a></li>
+      <li><a href="<?= $wg->relativeuribase; ?>actions/overdue">Overdue</a></li>
+      <li><a href="<?= $wg->relativeuribase; ?>actions/closed">Closed</a></li>
+      <li><a href="<?= $wg->relativeuribase; ?>actions/pendingreview">Pending Review</a></li>
+<li><a href="<?= $wg->relativeuribase; ?>actions/new">Raise</a></li>
   </ul>
   </li>
-  <li><a href="<?= $wg->uribase; ?>users">Users</a>
+  <li><a href="<?= $wg->relativeuribase; ?>users">Users</a>
   <ul><li><a href='/2005/06/tracker/users/my'><em>My</em> Tracker</a></li></ul>
   </li> 
-  <li><a href="<?= $wg->uribase; ?>products">Products</a></li>
-  <li><a href="<?= $wg->uribase; ?>agenda">Agenda planning</a></li>
-  <li><a href="<?= $wg->uribase; ?>changelog">Recent activity</a></li> 
+  <li><a href="<?= $wg->relativeuribase; ?>products">Products</a></li>
+  <li><a href="<?= $wg->relativeuribase; ?>agenda">Agenda planning</a></li>
+  <li><a href="<?= $wg->relativeuribase; ?>changelog">Recent activity</a></li> 
   </ul>
 <?php
 } else {
@@ -112,7 +112,7 @@
 <?php
     foreach ($wgs as $g) {
 ?>
-        <li><a href="<?= htmlify($g->uribase)?>users/<?= $userid?>"><?= htmlify($g->name)?></a></li>
+        <li><a href="<?= htmlify($g->relativeuribase)?>users/<?= $userid?>"><?= htmlify($g->name)?></a></li>
 <?php
     }
 ?>
@@ -179,8 +179,8 @@
     }
 ?>
 <br />
-<a href="/2005/06/tracker/">Tracker</a> 
-<?php if (is_object($wg)) { echo "(<a href='".htmlify($wg->uribase)."options'>configuration for this group</a>)"; } ?>
+Tracker: <a href="/2005/06/tracker/">documentation</a>, 
+<?php if (is_object($wg)) { echo "(<a href='".htmlify($wg->relativeuribase)."options'>configuration for this group</a>)"; } ?>
 , originally developed by <a href='/People/Dean/'>Dean Jackson</a>, 
 is developed and maintained by the Systems Team &lt;<a href='mailto:w3t-sys@w3.org'>w3t-sys@w3.org</a>&gt;.<br />
 <?php echo $Id;?>
@@ -198,7 +198,7 @@
   }
   WriteHTMLTop($title);
   echo $message;
-  WriteHTMLFoot('$Id: trackerlib.phi,v 1.82 2010/11/21 17:11:27 dom Exp $');
+  WriteHTMLFoot('$Id: trackerlib.phi,v 1.84 2010/12/03 12:58:56 dom Exp $');
   exit();
 }
 
@@ -254,10 +254,10 @@
       	name='actions[".$action->id."]' type='checkbox' />";
       }
       echo "";
-      echo ("<a href=\"" .$wg->uribase. "actions/" . $action->id . "\">ACTION-" . $action->id . "</a><a href='".$wg->uribase."actions/".$action->id."/edit' title='Edit ACTION-".$action->id."'><img width='8' height='12' src='/2002/09/wbs/icons/stock_edit2' alt=' (edit)'  /></a></td>\n");
+      echo ("<a href=\"" .$wg->relativeuribase. "actions/" . $action->id . "\">ACTION-" . $action->id . "</a><a href='".$wg->relativeuribase."actions/".$action->id."/edit' title='Edit ACTION-".$action->id."'><img width='8' height='12' src='/2002/09/wbs/icons/stock_edit2' alt=' (edit)'  /></a></td>\n");
 	  echo "<td class='".strtolower(str_replace(' ','',$humanReadableState[$action->status]))."'>".
 	  $humanReadableState[$action->status]."</td>\n";
-      echo("<td><a href=\"" .$wg->uribase. "actions/" . $action->id . "\">" . htmlify($action->title) . "</a></td>\n");  
+      echo("<td><a href=\"" .$wg->relativeuribase. "actions/" . $action->id . "\">" . htmlify($action->title) . "</a></td>\n");  
       echo("<td>" . htmlify($action->owner->name) . "</td>\n");
       if ($action->duedate < time()  && $action->status == OPEN) {
         echo("<td><span class=\"overdue\">" . gmdate("Y-m-d",$action->duedate) . "</span></td>\n");
@@ -265,14 +265,14 @@
         echo("<td>" . gmdate("Y-m-d",$action->duedate) . "</td>\n");
       } 
       if ($action->issue) {
-        echo "<td><a href='".htmlify($wg->uribase)."issues/".$action->issue->id."'>".($action->issue->nickname ? htmlify($action->issue->nickname) : "ISSUE-".$action->issue->id)."</a></td>\n" ;
+        echo "<td><a href='".htmlify($wg->relativeuribase)."issues/".$action->issue->id."'>".($action->issue->nickname ? htmlify($action->issue->nickname) : "ISSUE-".$action->issue->id)."</a></td>\n" ;
       } else if ($action->product) {
-        echo "<td><a href='".htmlify($wg->uribase)."products/".$action->product->id."'>".htmlify($action->product->name)."</a></td>\n" ;
+        echo "<td><a href='".htmlify($wg->relativeuribase)."products/".$action->product->id."'>".htmlify($action->product->name)."</a></td>\n" ;
       } else {
         echo "<td></td>\n";
       }
       if (!$oneWG) {
-      	echo "<td><a href='".htmlify($wg->uribase)."'>".htmlify($wg->name)."</a></td>\n";
+      	echo "<td><a href='".htmlify($wg->relativeuribase)."'>".htmlify($wg->name)."</a></td>\n";
       }
       echo("</tr>\n");
     }
@@ -335,15 +335,15 @@
       	name='issues[".$issue->id."]' type='checkbox' />";
       }
       
-      echo ("<a href=\"" .$wg->uribase. "issues/" . $issue->id . "\">ISSUE-" . $issue->id . "</a><a href='".$wg->uribase."issues/".$issue->id."/edit' title='Edit ISSUE-".$issue->id."'><img width='8' height='12' src='/2002/09/wbs/icons/stock_edit2' alt=' (edit)'  /></a>".($issue->nickname ? "<br />".htmlify($issue->nickname) : "")."</td>\n");
+      echo ("<a href=\"" .$wg->relativeuribase. "issues/" . $issue->id . "\">ISSUE-" . $issue->id . "</a><a href='".$wg->relativeuribase."issues/".$issue->id."/edit' title='Edit ISSUE-".$issue->id."'><img width='8' height='12' src='/2002/09/wbs/icons/stock_edit2' alt=' (edit)'  /></a>".($issue->nickname ? "<br />".htmlify($issue->nickname) : "")."</td>\n");
       echo "<td class='".$issue->_readableStatus[$issue->status]."'>".strtoupper($issue->_readableStatus[$issue->status])."</td>\n";
-      echo("<td><a href=\"" . $wg->uribase . "issues/" . $issue->id . "\">" . htmlify($issue->title) . "</a></td>\n");  
+      echo("<td><a href=\"" . $wg->relativeuribase . "issues/" . $issue->id . "\">" . htmlify($issue->title) . "</a></td>\n");  
       echo("<td>" . gmdate('Y-m-d',$issue->created) . "</td>\n");
       echo("<td>" . htmlify($issue->product->name) . "</td>\n");
       $actions = $issue->listActionItems(OPEN);
       echo("<td>" . count($actions->list) . "</td>\n");
  if (!$oneWG) {
-      	echo "<td><a href='".htmlify($wg->uribase)."'>".htmlify($wg->name)."</a></td>\n";
+      	echo "<td><a href='".htmlify($wg->relativeuribase)."'>".htmlify($wg->name)."</a></td>\n";
       }
       echo("</tr>\n");
     }
--- a/src/user.php	Fri Nov 26 15:06:40 2010 +0100
+++ b/src/user.php	Mon Dec 06 18:24:59 2010 +0100
@@ -50,13 +50,13 @@
 	}
 }
 
-if (count($wgids)==0) {
+if (count($wgids)==0 && count($wgs)!=0) {
     WriteErrorpage("Forbidden","You are not allowed to see any of action items for this user.","",403);
 }
 $operation = array();
 $success = 0;
 if ($viewer->id==$user->id && $singleWG) {
-	$operation = array('link'=>$singleWG->uribase.'users/'.$user->id.".ics",'text'=>"Actions as iCalendar");
+	$operation = array('link'=>$singleWG->relativeuribase.'users/'.$user->id.".ics",'text'=>"Actions as iCalendar");
 	if (array_key_exists('update',$_POST)) {
 		if ($user->setEmailNotifPref($singleWG->id, $_POST['notify'])) {
 			$success = 1;
@@ -108,5 +108,5 @@
 	<?php
 }
 
-WriteHTMLFoot('$Id: user.php,v 1.28 2010/05/26 07:17:53 dom Exp $');
+WriteHTMLFoot('$Id: user.php,v 1.30 2010/12/02 17:28:08 dom Exp $');
 ?>