[Fusionforge-commits] r17899 - in trunk/src: common/import common/include common/include/system common/mail common/reporting common/tracker cronjobs plugins/authopenid/www plugins/oauthprovider/include plugins/oauthprovider/www plugins/scmbzr/common plugins/scmcpold/common plugins/scmcvs/common plugins/scmcvs/www plugins/scmdarcs/common plugins/scmsvn/common plugins/soapadmin/www/coreapi utils/one-off-scripts www www/account www/admin www/developer www/docman www/export www/news/admin www/pm www/pm/include www/pm/msproject www/project/admin www/soap/common
Marc-Etienne VARGENAU
vargenau at fusionforge.org
Thu Sep 5 18:57:14 CEST 2013
Author: vargenau
Date: 2013-09-05 18:57:14 +0200 (Thu, 05 Sep 2013)
New Revision: 17899
Modified:
trunk/src/common/import/import_forums.php
trunk/src/common/import/import_tasks.php
trunk/src/common/import/import_trackers.php
trunk/src/common/import/import_users.php
trunk/src/common/include/Group.class.php
trunk/src/common/include/GroupJoinRequest.class.php
trunk/src/common/include/Navigation.class.php
trunk/src/common/include/System.class.php
trunk/src/common/include/User.class.php
trunk/src/common/include/system/LDAP.class.php
trunk/src/common/include/system/UNIX.class.php
trunk/src/common/include/system/pgsql.class.php
trunk/src/common/mail/MailingList.class.php
trunk/src/common/reporting/report_utils.php
trunk/src/common/tracker/Artifact.class.php
trunk/src/common/tracker/ArtifactMessage.class.php
trunk/src/cronjobs/daily_task_email.php
trunk/src/cronjobs/project_cleanup.php
trunk/src/plugins/authopenid/www/index.php
trunk/src/plugins/oauthprovider/include/oauthprovider_plugin.php
trunk/src/plugins/oauthprovider/www/access_tokens.php
trunk/src/plugins/oauthprovider/www/request_tokens.php
trunk/src/plugins/scmbzr/common/BzrPlugin.class.php
trunk/src/plugins/scmcpold/common/CpoldPlugin.class.php
trunk/src/plugins/scmcvs/common/CVSPlugin.class.php
trunk/src/plugins/scmcvs/www/acl.php
trunk/src/plugins/scmdarcs/common/DarcsPlugin.class.php
trunk/src/plugins/scmsvn/common/SVNPlugin.class.php
trunk/src/plugins/soapadmin/www/coreapi/coreapiservice.php
trunk/src/utils/one-off-scripts/tracker-import.php
trunk/src/www/account/change_email-complete.php
trunk/src/www/account/change_email.php
trunk/src/www/account/change_pw.php
trunk/src/www/account/editsshkeys.php
trunk/src/www/account/lostlogin.php
trunk/src/www/account/unsubscribe.php
trunk/src/www/admin/pending-news.php
trunk/src/www/admin/unsubscribe.php
trunk/src/www/admin/useredit.php
trunk/src/www/developer/index.php
trunk/src/www/docman/index.php
trunk/src/www/export/rssAboTask.php
trunk/src/www/news/admin/index.php
trunk/src/www/pm/downloadcsv.php
trunk/src/www/pm/include/ProjectGroupHTML.class.php
trunk/src/www/pm/msproject/xmlparser.php
trunk/src/www/project/admin/users.php
trunk/src/www/soap/common/group.php
trunk/src/www/soap/common/user.php
trunk/src/www/users
Log:
No & needed for user_get_object
Modified: trunk/src/common/import/import_forums.php
===================================================================
--- trunk/src/common/import/import_forums.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/import/import_forums.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -24,7 +24,7 @@
function add_monitoring_users($users, $forumObject){
foreach($users as $user){
- $uid = &user_get_object_by_name($user)->getID();
+ $uid = user_get_object_by_name($user)->getID();
$forumObject->setMonitor($uid);
}
}
Modified: trunk/src/common/import/import_tasks.php
===================================================================
--- trunk/src/common/import/import_tasks.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/import/import_tasks.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -30,13 +30,13 @@
}
/**
* addComments - Add followup comments to an Artifact Object
- * @param Artifact the artifact object where history should be added
- * @param array the artifact's data in json format (an array)
+ * @param $artifact the artifact object where history should be added
+ * @param $comments array the artifact's data in json format (an array)
*/
function addComments($artifact, $comments){
foreach($comments as $c){
$time = strtotime($c['date']);
- $uid =&user_get_object_by_name($c['submitter'])->getID();
+ $uid = user_get_object_by_name($c['submitter'])->getID();
$importData = array('time' => $time, 'user' => $uid);
$artifact->addMessage($c['comment'], $importData);
}
@@ -44,19 +44,19 @@
/**
* addHistory - Add history of changes to an Artifact Object
- * @param Artifact the artifact object where history should be added
- * @param array the artifact's data in json format (an array)
+ * @param $artifact the artifact object where history should be added
+ * @param $history array the artifact's data in json format (an array)
*/
function addHistory($artifact, $history){
foreach($history as $h){
$time = strtotime($h['date']);
- $uid =&user_get_object_by_name($h['by'])->getID();
+ $uid = user_get_object_by_name($h['by'])->getID();
$importData = array('time' => $time, 'user' => $uid);
//hack!!
$old = $h['old'];
// if($h['field']=='assigned_to'){
// if($old!='none'){
- // $old =&user_get_object_by_name($old)->getID();
+ // $old = user_get_object_by_name($old)->getID();
// } else {
// $old = 100;
// }
@@ -81,7 +81,7 @@
* @return ArtifactType the tracker created
*/
- function createTaskTracker($data){
+ function createTaskTracker($data) {
// TaskTracker's type
$tracker = $data['type'];
// Create a tracker
@@ -122,8 +122,9 @@
/**
* Create each category for a single project group
- * @param ProjectGroup $pg
- * @param array $categoriesList
+ * @param $pg ProjectGroup
+ * @param $categoriesList array
+ * @return array|bool
*/
function createCategories($pg, $categoriesList){
$cats = array();
@@ -149,8 +150,9 @@
/**
* Create each task for the considered project group
- * @param ProjectGroup $pg
- * @param array $data
+ * @param $pg ProjectGroup
+ * @param $data array
+ * @return bool
*/
function createTasks($pg, $data, $cats){
// Stores each atid in a name:id array
@@ -179,7 +181,7 @@
$assigned[] = user_get_object_by_mail($this->hashrn[$a['assigned_to[]']])->getID();
}
}
- $uid =user_get_object_by_name($a['submitter'])->getID();
+ $uid = user_get_object_by_name($a['submitter'])->getID();
$dependentTemp = array();
// new dBug(array($a['summary'], $a['description'], $a['priority'], $a['hours'], $start, $end, $cats[$a['category']], $a['percent_complete'], &$assigned, &$dependentTemp, 0, 0, array('user' => $uid)));
if(!$artifact->create($a['summary'], $a['description'], $a['priority'], $a['hours'], $start, $end, $cats[$a['category']], $a['percent_complete'], $assigned, $dependentTemp, 0, 0, array('user' => $uid))){
Modified: trunk/src/common/import/import_trackers.php
===================================================================
--- trunk/src/common/import/import_trackers.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/import/import_trackers.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -19,9 +19,10 @@
/**
* findType - get the type of a field from its name, value, and vocabulary : default 0 (text box), otherwise 1 (select box) or 2 (multi choice field)
- * @param string Name of the field
- * @param string|array Value of the field
+ * @param string $fieldName Name of the field
+ * @param string|array $fieldValue Value of the field
* @param $vocabulary Vocabulary of a tracker
+ * @return int
*/
function findType($fieldName, $fieldValue, $vocabulary){
if (is_array($fieldValue)){
@@ -35,9 +36,9 @@
/**
* createFieldElements - Add elements (choices) to an extra field
- * @param ArtifactExtraField The artifact extra field where the choices should be added
- * @param array The choices to be declared for the specified extra field
- * @return false if failed
+ * @param ArtifactExtraField $aef The artifact extra field where the choices should be added
+ * @param array $vocabulary The choices to be declared for the specified extra field
+ * @return bool false if failed
*/
function createFieldElements($aef, $vocabulary){
//TODO:Add each element to tracker extra field
@@ -162,7 +163,7 @@
function addComments($artifact, $jsonArtifact){
foreach($jsonArtifact['comments'] as $c){
$time = strtotime($c['date']);
- $uid =&user_get_object_by_name($c['submitter'])->getID();
+ $uid = user_get_object_by_name($c['submitter'])->getID();
$importData = array('time' => $time, 'user' => $uid);
$artifact->addMessage($c['comment'],false,false, $importData);
}
@@ -176,13 +177,13 @@
function addHistory($artifact, $jsonArtifact){
foreach($jsonArtifact['history'] as $h){
$time = strtotime($h['date']);
- $uid =&user_get_object_by_name($h['by'])->getID();
+ $uid = user_get_object_by_name($h['by'])->getID();
$importData = array('time' => $time, 'user' => $uid);
//hack!!
$old = $h['old'];
if($h['field']=='assigned_to'){
if($old!='none'){
- $old =&user_get_object_by_name($old)->getID();
+ $old = user_get_object_by_name($old)->getID();
} else {
$old = 100;
}
@@ -222,7 +223,7 @@
$ftype = $finfo->file($path);
$time = strtotime($a['date']);
- $uid =&user_get_object_by_name($a['by'])->getID();
+ $uid = user_get_object_by_name($a['by'])->getID();
$importData = array('user' => $uid, 'time' => $time);
//we have no descriptions for files => None
@@ -282,7 +283,7 @@
//create the artif here with $extra_fields_array as extra fields
//new dBug($extra_fields_array);
//get user id
- $uid =&user_get_object_by_name($artifact['submitter'])->getID();
+ $uid = user_get_object_by_name($artifact['submitter'])->getID();
//TODO:Search in hash table for corresponding mail for id, lookup object by mail, get ID
//get time from epoch
$timestamp = strtotime($artifact['date']);
@@ -294,7 +295,7 @@
$assigned_to = 100;
} else {
$m = $hashrn[$artifact['assigned_to']];
- $assigned_to =&user_get_object_by_mail($m)->getID();
+ $assigned_to = user_get_object_by_mail($m)->getID();
//new dBug(array($m,$assigned_to));
}
Modified: trunk/src/common/import/import_users.php
===================================================================
--- trunk/src/common/import/import_users.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/import/import_users.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -399,7 +399,7 @@
}
foreach ($users as $user => $role){
- $user_object = &user_get_object_by_name($user);
+ $user_object = user_get_object_by_name($user);
if (!$user_object) {
$feedback .= sprintf(_('Failed to find user %s'), $user);
} else {
Modified: trunk/src/common/include/Group.class.php
===================================================================
--- trunk/src/common/include/Group.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/include/Group.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -2881,7 +2881,7 @@
/* if we activate search engine, we probably want to reindex */
$res = db_query_params('UPDATE groups SET use_webdav=$1 WHERE group_id=$2',
array($status,
- $this->getID()));
+ $this->getID()));
if (!$res) {
$this->setError(sprintf(_('Error: Cannot Update Group UseWebdab Status: %s'),db_error()));
Modified: trunk/src/common/include/GroupJoinRequest.class.php
===================================================================
--- trunk/src/common/include/GroupJoinRequest.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/include/GroupJoinRequest.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -254,7 +254,7 @@
* @return boolean success.
*/
function reject() {
- $user =& user_get_object($this->getUserId());
+ $user = user_get_object($this->getUserId());
setup_gettext_for_user($user);
$subject = sprintf(_('Request to Join Project %s'), $this->Group->getPublicName());
$body = sprintf(_('Your request to join the %s project was denied by an administrator.'), $this->Group->getPublicName());
@@ -268,7 +268,7 @@
*
*/
function send_accept_mail() {
- $user =& user_get_object($this->getUserId());
+ $user = user_get_object($this->getUserId());
setup_gettext_for_user($user);
$subject = sprintf(_('Request to Join Project %s'), $this->Group->getPublicName());
$body = sprintf(_('Your request to join the %s project was granted by an administrator.'), $this->Group->getPublicName());
Modified: trunk/src/common/include/Navigation.class.php
===================================================================
--- trunk/src/common/include/Navigation.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/include/Navigation.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -187,7 +187,7 @@
function getUserLinks() {
$res = array();
if (session_loggedin()) {
- $u =& user_get_object(user_getid());
+ $u = user_get_object(user_getid());
$res['titles'][] = sprintf("%s (%s)", _('Log Out'), $u->getRealName());
$res['urls'][] = util_make_uri('/account/logout.php');
Modified: trunk/src/common/include/System.class.php
===================================================================
--- trunk/src/common/include/System.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/include/System.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -55,7 +55,7 @@
*
*/
function sysCheckUser($user_id) {
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user) {
return false;
} else {
@@ -71,7 +71,7 @@
*
*/
function sysCreateUser($user_id) {
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user) {
return false;
} else {
@@ -133,7 +133,7 @@
* sysCheckGroup() - Check for the existence of a group
*
* @param int The ID of the group to check
- * @returns true on success/false on error
+ * @return bool True on success/false on error
*
*/
function sysCheckGroup($group_id) {
@@ -143,8 +143,8 @@
/**
* sysCreateGroup() - Create a group
*
- * @param int The ID of the group to create
- * @returns true on success/false on error
+ * @param int The ID of the group to create
+ * @return bool true on success/false on error
*
*/
function sysCreateGroup($group_id) {
@@ -154,8 +154,8 @@
/**
* sysRemoveGroup() - Remove a group
*
- * @param int The ID of the group to remove
- * @returns true on success/false on error
+ * @param int The ID of the group to remove
+ * @return bool true on success/false on error
*
*/
function sysRemoveGroup($group_id) {
@@ -165,9 +165,9 @@
/**
* sysGroupCheckUser() - Sync forge permissions with system permissions for that user/group
*
- * @param int The ID of the group two which the user will be added
- * @param int The ID of the user to add
- * @returns true on success/false on error
+ * @param int The ID of the group two which the user will be added
+ * @param int The ID of the user to add
+ * @return bool true on success/false on error
*
*/
function sysGroupCheckUser($group_id, $user_id) {
@@ -177,10 +177,10 @@
/**
* sysGroupAddUser() - Add a user to a group
*
- * @param int The ID of the group two which the user will be added
- * @param int The ID of the user to add
- * @param bool Only add this user to CVS
- * @returns true on success/false on error
+ * @param int The ID of the group two which the user will be added
+ * @param int The ID of the user to add
+ * @param bool Only add this user to CVS
+ * @return bool true on success/false on error
*
*/
function sysGroupAddUser($group_id, $user_id, $cvs_only = 0) {
@@ -190,10 +190,10 @@
/**
* sysGroupRemoveUser() - Remove a user from a group
*
- * @param int The ID of the group from which to remove the user
- * @param int The ID of the user to remove
- * @param bool Only remove user from CVS group
- * @returns true on success/false on error
+ * @param int The ID of the group from which to remove the user
+ * @param int The ID of the user to remove
+ * @param bool Only remove user from CVS group
+ * @return bool true on success/false on error
*
*/
function sysGroupRemoveUser($group_id, $user_id, $cvs_only = 0) {
@@ -203,10 +203,10 @@
/**
* sysGroupUpdateUser() - Remove a user from a group
*
- * @param int The ID of the group from which to remove the user
- * @param int The ID of the user to remove
- * @param bool Only remove user from CVS group
- * @returns true on success/false on error
+ * @param int The ID of the group from which to remove the user
+ * @param int The ID of the user to remove
+ * @param bool Only remove user from CVS group
+ * @return bool true on success/false on error
*
*/
function sysGroupUpdateUser($group_id, $user_id, $cvs_only = 0) {
Modified: trunk/src/common/include/User.class.php
===================================================================
--- trunk/src/common/include/User.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/include/User.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -25,16 +25,16 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-$USER_OBJ=array();
+$USER_OBJ = array();
/**
* user_get_object_by_name() - Get User object by username.
* user_get_object is useful so you can pool user objects/save database queries
* You should always use this instead of instantiating the object directly
*
- * @param string The unix username - required
- * @param int The result set handle ("SELECT * FROM USERS WHERE user_id=xx")
- * @return a user object or false on failure
+ * @param string $user_name The unix username - required
+ * @param bool|int $res The result set handle ("SELECT * FROM USERS WHERE user_id=xx")
+ * @return GFUser User object or false on failure
*/
function &user_get_object_by_name($user_name, $res = false) {
$user_name = strtolower($user_name);
@@ -54,14 +54,14 @@
* @return a user object or false on failure
*
*/
-function user_get_object_by_email($email ,$res = false) {
+function user_get_object_by_email($email, $res = false) {
if (!validate_email($email)
|| !forge_get_config('require_unique_email')) {
return false;
}
if (!$res) {
- $res=db_query_params('SELECT * FROM users WHERE email=$1',
- array($email));
+ $res = db_query_params('SELECT * FROM users WHERE email=$1',
+ array($email));
}
return user_get_object(db_result($res, 0, 'user_id'), $res);
}
@@ -114,14 +114,18 @@
array($user_id));
}
if (!$res || db_numrows($res) < 1) {
- $USER_OBJ["_".$user_id."_"]=false;
+ $USER_OBJ["_".$user_id."_"] = false;
} else {
- $USER_OBJ["_".$user_id."_"]= new GFUser($user_id,$res);
+ $USER_OBJ["_".$user_id."_"] = new GFUser($user_id, $res);
}
}
return $USER_OBJ["_".$user_id."_"];
}
+/**
+ * @param $id_arr
+ * @return GFUser[]
+ */
function &user_get_objects($id_arr) {
global $USER_OBJ;
$fetch = array();
@@ -132,14 +136,14 @@
// See if this ID already has been fetched in the cache
//
if (!isset($USER_OBJ["_".$id."_"])) {
- $fetch[]=$id;
+ $fetch[] = $id;
}
}
if (count($fetch) > 0) {
$res = db_query_params('SELECT * FROM users WHERE user_id = ANY ($1)',
- array(db_int_array_to_any_clause ($fetch)));
+ array(db_int_array_to_any_clause($fetch)));
while ($arr = db_fetch_array($res)) {
- $USER_OBJ["_".$arr['user_id']."_"] = new GFUser($arr['user_id'],$arr);
+ $USER_OBJ["_".$arr['user_id']."_"] = new GFUser($arr['user_id'], $arr);
}
}
foreach ($id_arr as $id) {
@@ -148,6 +152,10 @@
return $return;
}
+/**
+ * @param string $username_arr
+ * @return GFUser[]
+ */
function &user_get_objects_by_name($username_arr) {
$res = db_query_params('SELECT user_id FROM users WHERE lower(user_name) = ANY ($1)',
array(db_string_array_to_any_clause ($username_arr)));
@@ -155,16 +163,25 @@
return user_get_objects($arr);
}
+/**
+ * @param string $email_arr
+ * @return GFUser[]
+ */
function &user_get_objects_by_email($email_arr) {
- $res=db_query_params('SELECT user_id FROM users WHERE lower(email) = ANY ($1)',
- array(db_string_array_to_any_clause ($email_arr)));
+ $res = db_query_params('SELECT user_id FROM users WHERE lower(email) = ANY ($1)',
+ array(db_string_array_to_any_clause($email_arr)));
$arr =& util_result_column_to_array($res, 0);
return user_get_objects($arr);
}
+/**
+ * user_get_active_users - Return the list of active users.
+ *
+ * @return GFUser[]
+ */
function &user_get_active_users() {
- $res=db_query_params('SELECT user_id FROM users WHERE status=$1',
- array('A'));
+ $res = db_query_params('SELECT user_id FROM users WHERE status=$1',
+ array('A'));
return user_get_objects(util_result_column_to_array($res, 0));
}
@@ -229,7 +246,7 @@
} elseif (db_numrows($res) < 1) {
//function in class we extended
$this->setError(_('User Not Found'));
- $this->data_array=array();
+ $this->data_array = array();
return false;
} else {
//set up an associative array for use by other functions
@@ -292,7 +309,7 @@
$this->setError(_('You must supply a theme'));
return false;
}
- if (! forge_get_config('require_unique_email')) {
+ if (!forge_get_config('require_unique_email')) {
if (!$unix_name) {
$this->setError(_('You must supply a username'));
return false;
@@ -323,7 +340,7 @@
$this->setError(_('Invalid Unix Name (must not contain uppercase characters)'));
return false;
}
- $unix_name=strtolower($unix_name);
+ $unix_name = strtolower($unix_name);
if (!account_namevalid($unix_name)) {
$this->setError(_('Invalid Unix Name.'));
return false;
@@ -600,7 +617,7 @@
theme_id=$15,
tooltips=$16
WHERE user_id=$17',
- array (
+ array(
htmlspecialchars($firstname . ' ' .$lastname),
htmlspecialchars($firstname),
htmlspecialchars($lastname),
@@ -732,7 +749,7 @@
db_rollback();
return false;
} else {
- $this->data_array['status']=$status;
+ $this->data_array['status'] = $status;
if ($status == 'D') {
$projects = $this->getGroups() ;
foreach ($projects as $p) {
@@ -1765,6 +1782,7 @@
*
* @param int $group_id The Group ID
* @param int $type The Type
+ * @return bool
* @deprecated
*
*/
@@ -1779,7 +1797,8 @@
/**
* user_getname() - DEPRECATED; DO NOT USE! (TODO: document what should be used instead)
*
- * @param int The User ID
+ * @param int $user_id The User ID
+ * @return string
* @deprecated
*
*/
@@ -1787,7 +1806,7 @@
// use current user if one is not passed in
if (!$user_id) {
if (session_loggedin()) {
- $user=&user_get_object(user_getid());
+ $user = user_get_object(user_getid());
if ($user) {
return $user->getUnixName();
} else {
@@ -1797,7 +1816,7 @@
return 'No User Id';
}
} else {
- $user=&user_get_object($user_id);
+ $user = user_get_object($user_id);
if ($user) {
return $user->getUnixName();
} else {
@@ -1807,9 +1826,9 @@
}
class UserComparator {
- var $criterion = 'name' ;
+ var $criterion = 'name';
- function Compare ($a, $b) {
+ function Compare($a, $b) {
switch ($this->criterion) {
case 'name':
default:
Modified: trunk/src/common/include/system/LDAP.class.php
===================================================================
--- trunk/src/common/include/system/LDAP.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/include/system/LDAP.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -237,7 +237,7 @@
*
*/
function sysCheckUser($user_id) {
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user) {
return false;
}
@@ -280,7 +280,7 @@
// Check even if the user shouldn't exist
// It can be created by a cron
if (!$this->sysCheckUser($user_id)){
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
return $this->gfLdapcreate_user_from_object($user);
}
return true;
@@ -295,7 +295,7 @@
*/
function sysCheckCreateUser($user_id) {
if (!$this->sysCheckUser($user_id)){
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
return $this->gfLdapcreate_user_from_object($user);
}
return true;
@@ -394,7 +394,7 @@
function sysRemoveUser($user_id) {
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$this->gfLdapConnect()) {
return false;
}
@@ -420,7 +420,7 @@
function sysUserSetAttribute($user_id,$attr,$value) {
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$this->gfLdapConnect()) {
return false;
}
@@ -628,7 +628,7 @@
global $ldap_conn;
$group = group_get_object($group_id);
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$this->gfLdapConnect()) {
return false;
}
@@ -697,7 +697,7 @@
function sysGroupRemoveUser($group_id,$user_id,$cvs_only=0) {
$group = group_get_object($group_id);
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$this->gfLdapConnect()) {
return false;
}
Modified: trunk/src/common/include/system/UNIX.class.php
===================================================================
--- trunk/src/common/include/system/UNIX.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/include/system/UNIX.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -41,12 +41,12 @@
/**
* sysCreateUser() - Create a user
*
- * @param int The user ID of the user to create
- * @return bool The return status
+ * @param int $user_id The user ID of the user to create
+ * @return bool The return status
*
*/
function sysCreateUser($user_id) {
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user) {
return false;
} else {
@@ -70,7 +70,7 @@
/**
* sysRemoveUser() - Remove a user
*
- * @param int The user ID of the user to remove
+ * @param int $user_id The user ID of the user to remove
* @return bool true on success/false on failure
*
*/
@@ -92,7 +92,7 @@
/**
* sysCheckGroup() - Check for the existence of a group
*
- * @param int The ID of the group to check
+ * @param int $group_id The ID of the group to check
* @return bool true on success/false on error
*
*/
@@ -107,7 +107,7 @@
/**
* sysCreateGroup() - Create a group
*
- * @param int The ID of the group to create
+ * @param int $group_id The ID of the group to create
* @return bool true on success/false on error
*
*/
Modified: trunk/src/common/include/system/pgsql.class.php
===================================================================
--- trunk/src/common/include/system/pgsql.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/include/system/pgsql.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -87,7 +87,7 @@
*
*/
function sysCheckUser($user_id) {
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user) {
return false;
}
@@ -102,7 +102,7 @@
*
*/
function sysCreateUser($user_id) {
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user) {
return false;
} else {
Modified: trunk/src/common/mail/MailingList.class.php
===================================================================
--- trunk/src/common/mail/MailingList.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/mail/MailingList.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -179,7 +179,7 @@
$this->groupMailingListId = db_insertid($result, 'mail_group_list', 'group_list_id');
$this->fetchData($this->groupMailingListId);
- $user = &user_get_object($creator_id);
+ $user = user_get_object($creator_id);
$userEmail = $user ? $user->getEmail() : "";
if(empty($userEmail) || !validate_email($userEmail)) {
$this->setInvalidEmailError();
Modified: trunk/src/common/reporting/report_utils.php
===================================================================
--- trunk/src/common/reporting/report_utils.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/reporting/report_utils.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -609,7 +609,7 @@
switch ($type) {
case 'user': {
$report = new ReportUserAct($SPAN, $id, $start, $end);
- $u =& user_get_object($id);
+ $u = user_get_object($id);
if (!$u || $u->isError()) {
exit_error(_("Could Not Get User"));
}
@@ -946,14 +946,14 @@
exit_error(db_error(), '');
}
- $arr[1] = 'Bugs';
- $arr[2] = 'Support Requests';
- $arr[3] = 'Patches';
- $arr[4] = 'Feature Requests';
- $arr[0] = 'Other Trackers';
- $arr[5] = 'Forum Messages';
- $arr[6] = 'Tasks';
- $arr[7] = 'Downloads';
+ $arr[1] = _('Bugs');
+ $arr[2] = _('Support Requests');
+ $arr[3] = _('Patches');
+ $arr[4] = _('Feature Requests');
+ $arr[0] = _('Other Trackers');
+ $arr[5] = _('Forum Messages');
+ $arr[6] = _('Tasks');
+ $arr[7] = _('Downloads');
$chartid = 'toolspie';
if (db_numrows($res)) {
Modified: trunk/src/common/tracker/Artifact.class.php
===================================================================
--- trunk/src/common/tracker/Artifact.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/tracker/Artifact.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -224,7 +224,7 @@
// the status_id based on the extra field - this keeps the counters
// accurate
//
- $status_id=$this->ArtifactType->remapStatus($status_id,$extra_fields);
+ $status_id = $this->ArtifactType->remapStatus($status_id,$extra_fields);
if (!$status_id) {
$this->setError(_('Error remapping status'));
return false;
@@ -606,10 +606,8 @@
$email_sql='';
} else {
-
$this->setError(_('Valid Email Address Required'));
return false;
-
}
$res = db_query_params ('SELECT * FROM artifact_monitor WHERE artifact_id=$1 AND user_id=$2',
@@ -791,7 +789,7 @@
}
if (session_loggedin()) {
$user_id=user_getid();
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user || !is_object($user)) {
$this->setError('Error: Logged In User But Could Not Get User Object');
return false;
Modified: trunk/src/common/tracker/ArtifactMessage.class.php
===================================================================
--- trunk/src/common/tracker/ArtifactMessage.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/common/tracker/ArtifactMessage.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -84,7 +84,7 @@
if (session_loggedin()) {
$user_id=user_getid();
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user || !is_object($user)) {
$this->setError(_('Error: Logged In User Bug Could Not Get User Object'));
return false;
Modified: trunk/src/cronjobs/daily_task_email.php
===================================================================
--- trunk/src/cronjobs/daily_task_email.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/cronjobs/daily_task_email.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -48,7 +48,7 @@
$email = db_result($res, $i, 'email');
// get an object of the User with the current user_id
- $user_object = &user_get_object($user_id);
+ $user_object = user_get_object($user_id);
if (!$user_object || !is_object($user_object)) {
$err .= "Could not get User object with ID: $user_id\n";
} else {
Modified: trunk/src/cronjobs/project_cleanup.php
===================================================================
--- trunk/src/cronjobs/project_cleanup.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/cronjobs/project_cleanup.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -58,7 +58,7 @@
while ($row = db_fetch_array($result)) {
$hook_params = array();
- $hook_params['user'] = &user_get_object($row['user_id']);
+ $hook_params['user'] = user_get_object($row['user_id']);
$hook_params['user_id'] = $row['user_id'];
plugin_hook ("user_delete", $hook_params);
}
Modified: trunk/src/plugins/authopenid/www/index.php
===================================================================
--- trunk/src/plugins/authopenid/www/index.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/authopenid/www/index.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -33,7 +33,7 @@
session_require_login();
// get global users vars
-$u =& user_get_object(user_getid());
+$u = user_get_object(user_getid());
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'));
} elseif ($u->isError()) {
Modified: trunk/src/plugins/oauthprovider/include/oauthprovider_plugin.php
===================================================================
--- trunk/src/plugins/oauthprovider/include/oauthprovider_plugin.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/oauthprovider/include/oauthprovider_plugin.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -266,7 +266,7 @@
$t_token = OauthAuthzAccessToken::load_by_key($token->key);
global $oauth_token, $oauth_user;
$oauth_token = $t_token;
- $user =& user_get_object($t_token->getUserId());
+ $user = user_get_object($t_token->getUserId());
$oauth_user = $user;
//$user_name = $user->getRealName().' ('.$user->getUnixName().')';
//echo "Acting on behalf of user : $user_name\n";
Modified: trunk/src/plugins/oauthprovider/www/access_tokens.php
===================================================================
--- trunk/src/plugins/oauthprovider/www/access_tokens.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/oauthprovider/www/access_tokens.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -86,7 +86,7 @@
echo '<td>'.'---'.'</td>';
}
if($t_token->getUserId() > 0 ) {
- $user_object =& user_get_object($t_token->getUserId());
+ $user_object = user_get_object($t_token->getUserId());
$user = $user_object->getRealName().' ('.$user_object->getUnixName().')';
} else {
$user = "-";
Modified: trunk/src/plugins/oauthprovider/www/request_tokens.php
===================================================================
--- trunk/src/plugins/oauthprovider/www/request_tokens.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/oauthprovider/www/request_tokens.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -89,7 +89,7 @@
echo '<td>'.'---'.'</td>';
}
if($t_token->getUserId() > 0 ) {
- $user_object =& user_get_object($t_token->getUserId());
+ $user_object = user_get_object($t_token->getUserId());
$user = $user_object->getRealName().' ('.$user_object->getUnixName().')';
} else {
$user = "-";
Modified: trunk/src/plugins/scmbzr/common/BzrPlugin.class.php
===================================================================
--- trunk/src/plugins/scmbzr/common/BzrPlugin.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/scmbzr/common/BzrPlugin.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -95,7 +95,7 @@
function getInstructionsForRW ($project) {
$b = '' ;
if (session_loggedin()) {
- $u =& user_get_object(user_getid()) ;
+ $u = user_get_object(user_getid()) ;
$d = $u->getUnixName() ;
$b .= '<h2>';
$b .= sprintf(_('Developer %s Access via SSH'), 'Bazaar');
@@ -403,7 +403,7 @@
foreach ( $user_list as $user ) {
// trying to get user id from user name
- $u = &user_get_object_by_name ($user) ;
+ $u = user_get_object_by_name ($user) ;
if ($u) {
$user_id = $u->getID();
} else {
Modified: trunk/src/plugins/scmcpold/common/CpoldPlugin.class.php
===================================================================
--- trunk/src/plugins/scmcpold/common/CpoldPlugin.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/scmcpold/common/CpoldPlugin.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -69,7 +69,7 @@
function getInstructionsForRW ($project) {
if (session_loggedin()) {
- $u =& user_get_object(user_getid()) ;
+ $u = user_get_object(user_getid()) ;
$d = $u->getUnixName() ;
$b .= '<h2>';
$b .= sprintf(_('Developer %s Access via SSH'), 'CPOLD');
Modified: trunk/src/plugins/scmcvs/common/CVSPlugin.class.php
===================================================================
--- trunk/src/plugins/scmcvs/common/CVSPlugin.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/scmcvs/common/CVSPlugin.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -92,7 +92,7 @@
function getInstructionsForRW ($project) {
$cvsrootend = $this->getBoxForProject($project).':'.forge_get_config('repos_path', 'scmcvs').'/'.$project->getUnixName();
if (session_loggedin()) {
- $u =& user_get_object(user_getid()) ;
+ $u = user_get_object(user_getid()) ;
$d = $u->getUnixName() ;
$b = '<h2>';
$b .= sprintf(_('Developer %s Access via SSH'), 'CVS');
@@ -403,7 +403,7 @@
foreach ( $user_list as $user ) {
// trying to get user id from user name
- $u = &user_get_object_by_name ($user) ;
+ $u = user_get_object_by_name ($user) ;
if ($u) {
$user_id = $u->getID();
} else {
Modified: trunk/src/plugins/scmcvs/www/acl.php
===================================================================
--- trunk/src/plugins/scmcvs/www/acl.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/scmcvs/www/acl.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -48,7 +48,7 @@
}
$userName = $matches2[count($matches2)-1];
- $User =& user_get_object_by_name($userName);
+ $User = user_get_object_by_name($userName);
if (!$User || !is_object($User)) {
exit_error(sprintf(_('User not found %s'),$userName),'home');
}
Modified: trunk/src/plugins/scmdarcs/common/DarcsPlugin.class.php
===================================================================
--- trunk/src/plugins/scmdarcs/common/DarcsPlugin.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/scmdarcs/common/DarcsPlugin.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -579,7 +579,7 @@
$id = $email_login[$id];
}
- $u = &user_get_object_by_name ($id) ;
+ $u = user_get_object_by_name ($id) ;
if ($u) {
$user_id = $u->getID();
} else {
Modified: trunk/src/plugins/scmsvn/common/SVNPlugin.class.php
===================================================================
--- trunk/src/plugins/scmsvn/common/SVNPlugin.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/scmsvn/common/SVNPlugin.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -129,7 +129,7 @@
$module = $this->topModule($project);
if (session_loggedin()) {
- $u =& user_get_object(user_getid());
+ $u = user_get_object(user_getid());
$d = $u->getUnixName() ;
if (forge_get_config('use_ssh', 'scmsvn')) {
$b .= '<h2>';
@@ -490,7 +490,7 @@
foreach ( $user_list as $user ) {
// trying to get user id from user name
- $u = &user_get_object_by_name ($user) ;
+ $u = user_get_object_by_name ($user) ;
if ($u) {
$user_id = $u->getID();
} else {
Modified: trunk/src/plugins/soapadmin/www/coreapi/coreapiservice.php
===================================================================
--- trunk/src/plugins/soapadmin/www/coreapi/coreapiservice.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/plugins/soapadmin/www/coreapi/coreapiservice.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -203,7 +203,7 @@
return new SoapFault($e->getCode(),$e->getMessage());
}
- $users =& user_get_objects($user_id);
+ $users = user_get_objects($user_id);
$this->logger->debug("users found : ".var_export($users, true));
if (!$users) {
return new SoapFault('3001','Could Not Get Users By Id');
@@ -358,7 +358,7 @@
return new SoapFault($e->getCode(),$e->getMessage());
}
- $users =& user_get_objects_by_name($user_names);
+ $users = user_get_objects_by_name($user_names);
if (!$users) {
return new SoapFault('3002','Could Not Get Users By Name');
}
Modified: trunk/src/utils/one-off-scripts/tracker-import.php
===================================================================
--- trunk/src/utils/one-off-scripts/tracker-import.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/utils/one-off-scripts/tracker-import.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -190,7 +190,7 @@
$importData['time'] = (int)$v["open_date"];
/* take over the submitter, but only if they exist */
- if ($v["submitted_by"] != 100 && ($submitter =&
+ if ($v["submitted_by"] != 100 && ($submitter =
user_get_object_by_name($v["submitted_unixname"])) &&
is_object($submitter) && !($submitter->isError())) {
/* map the unixname of the submitter to our local user */
Modified: trunk/src/www/account/change_email-complete.php
===================================================================
--- trunk/src/www/account/change_email-complete.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/account/change_email-complete.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -47,7 +47,7 @@
if (db_numrows($res_user) < 1) {
exit_error(_('Invalid confirmation hash.'),'my');
}
-$u =& user_get_object(db_result($res_user, 0, 'user_id'), $res_user);
+$u = user_get_object(db_result($res_user, 0, 'user_id'), $res_user);
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'),'home');
} elseif ($u->isError()) {
Modified: trunk/src/www/account/change_email.php
===================================================================
--- trunk/src/www/account/change_email.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/account/change_email.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -40,7 +40,7 @@
$confirm_hash = substr(md5($GLOBALS['session_ser'] . time()),0,16);
- $u =& user_get_object(user_getid());
+ $u = user_get_object(user_getid());
if (!$u || !is_object($u)) {
form_release_key(getStringFromRequest('form_key'));
exit_error(_('Could Not Get User'),'my');
Modified: trunk/src/www/account/change_pw.php
===================================================================
--- trunk/src/www/account/change_pw.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/account/change_pw.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -27,7 +27,7 @@
session_require_login () ;
-$u =& user_get_object(user_getid());
+$u = user_get_object(user_getid());
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'),'my');
} elseif ($u->isError()) {
Modified: trunk/src/www/account/editsshkeys.php
===================================================================
--- trunk/src/www/account/editsshkeys.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/account/editsshkeys.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -34,7 +34,7 @@
session_require_login();
-$u =& user_get_object(user_getid());
+$u = user_get_object(user_getid());
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'),'home');
} elseif ($u->isError()) {
Modified: trunk/src/www/account/lostlogin.php
===================================================================
--- trunk/src/www/account/lostlogin.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/account/lostlogin.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -49,7 +49,7 @@
if (db_numrows($res_user) < 1) {
exit_error(_('Invalid confirmation hash.'),'my');
}
-$u =& user_get_object(db_result($res_user, 0, 'user_id'), $res_user);
+$u = user_get_object(db_result($res_user, 0, 'user_id'), $res_user);
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'),'home');
} elseif ($u->isError()) {
Modified: trunk/src/www/account/unsubscribe.php
===================================================================
--- trunk/src/www/account/unsubscribe.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/account/unsubscribe.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -49,7 +49,7 @@
}
$row_user = db_fetch_array($res_user);
-$user =& user_get_object($row_user['user_id'], $res_user);
+$user = user_get_object($row_user['user_id'], $res_user);
if (!$user || !is_object($user)) {
exit_error(_('Could Not Get User'),'home');
} elseif ($user->isError()) {
Modified: trunk/src/www/admin/pending-news.php
===================================================================
--- trunk/src/www/admin/pending-news.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/admin/pending-news.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -130,10 +130,9 @@
}
$group = group_get_object(db_result($result,0,'group_id'));
- $user =& user_get_object(db_result($result,0,'submitted_by'));
+ $user = user_get_object(db_result($result,0,'submitted_by'));
echo '
- <p />
<form action="'.getStringFromServer('PHP_SELF').'" method="post">
<input type="hidden" name="for_group" value="'.db_result($result,0,'group_id').'" />
<input type="hidden" name="id" value="'.db_result($result,0,'id').'" />
Modified: trunk/src/www/admin/unsubscribe.php
===================================================================
--- trunk/src/www/admin/unsubscribe.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/admin/unsubscribe.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -69,7 +69,7 @@
Perform unsubscription
*/
- $u =& user_get_object_by_name($user_name);
+ $u = user_get_object_by_name($user_name);
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'),'home');
} elseif ($u->isError()) {
Modified: trunk/src/www/admin/useredit.php
===================================================================
--- trunk/src/www/admin/useredit.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/admin/useredit.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -38,7 +38,7 @@
);
$user_id = getIntFromRequest('user_id');
-$u =& user_get_object($user_id);
+$u = user_get_object($user_id);
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'),'admin');
} elseif ($u->isError()) {
Modified: trunk/src/www/developer/index.php
===================================================================
--- trunk/src/www/developer/index.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/developer/index.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -36,13 +36,13 @@
if (!$user_id) {
exit_missing_param('',array(_('A user must be specified for this page.')),'home');
} else {
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user || !is_object($user)) {
- exit_error(_('Invalid User'),'home');
+ exit_error(_('Invalid User'),'home');
} elseif ( $user->isError()) {
- exit_error($user->isError(),'home');
+ exit_error($user->isError(),'home');
} elseif ( !$user->isActive()) {
- exit_error(_('User not active'),'home');
+ exit_error(_('User not active'),'home');
}
include $gfwww.'include/user_home.php';
Modified: trunk/src/www/docman/index.php
===================================================================
--- trunk/src/www/docman/index.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/docman/index.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -100,7 +100,7 @@
}
if (session_loggedin()) {
- $u =& user_get_object(user_getid());
+ $u = user_get_object(user_getid());
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'));
} elseif ($u->isError()) {
Modified: trunk/src/www/export/rssAboTask.php
===================================================================
--- trunk/src/www/export/rssAboTask.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/export/rssAboTask.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -160,7 +160,7 @@
foreach($updates as $update){
$update[6]==='message' ? $title = _('Comment') : $title = $update[5];
$update[6]==='message' ? $description = $update[5] : $description = $update[6];
- $objGfUser = &user_get_object($update[7]);
+ $objGfUser = user_get_object($update[7]);
print'<item>';
print'<title>';
print $title;
Modified: trunk/src/www/news/admin/index.php
===================================================================
--- trunk/src/www/news/admin/index.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/news/admin/index.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -121,7 +121,7 @@
<input type="hidden" name="group_id" value="'.db_result($result,0,'group_id').'" />
<input type="hidden" name="id" value="'.db_result($result,0,'id').'" />';
- $user =& user_get_object(db_result($result,0,'submitted_by'));
+ $user = user_get_object(db_result($result,0,'submitted_by'));
echo '
<strong>'._('Submitted by').':</strong> '.$user->getRealName().'<br />
Modified: trunk/src/www/pm/downloadcsv.php
===================================================================
--- trunk/src/www/pm/downloadcsv.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/pm/downloadcsv.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -43,7 +43,7 @@
/*
Record description for .csv file format
-project_task_id This is the ID in gforge database
+project_task_id This is the ID in database
external_task_id The equivalent of project_task_id but determined by
external application, such as MS Project
parent_id The project_task_id of the parent task, if any
@@ -202,7 +202,7 @@
$pt_arr[$i]->getPriority().$sep.
str_replace($arrRemove, ' ', $pt_arr[$i]->getDetails()).$sep;
- $users =& user_get_objects($pt_arr[$i]->getAssignedTo());
+ $users = user_get_objects($pt_arr[$i]->getAssignedTo());
for ($j=0; $j<5; $j++) {
if ($j < count($users)) {
if ($users[$j]->getUnixName() != 'none') {
Modified: trunk/src/www/pm/include/ProjectGroupHTML.class.php
===================================================================
--- trunk/src/www/pm/include/ProjectGroupHTML.class.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/pm/include/ProjectGroupHTML.class.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -34,11 +34,11 @@
exit_disabled();
}
- //required by site_project_header
+ // Required by site_project_header
$params['group']=$group_id;
$params['toptab']='pm';
- //only projects can use the bug tracker, and only if they have it turned on
+ // Only projects can use the Project Manager, and only if they have it turned on
$project = group_get_object($group_id);
if (!$project || !is_object($project)) {
exit_no_group();
@@ -251,7 +251,8 @@
}
function renderAssigneeList($assignee_ids) {
- $techs =& user_get_objects($assignee_ids);
+ $techs = user_get_objects($assignee_ids);
+ $return = '';
for ($i=0; $i<count($techs); $i++) {
$return .= $techs[$i]->getRealName().'<br />';
}
Modified: trunk/src/www/pm/msproject/xmlparser.php
===================================================================
--- trunk/src/www/pm/msproject/xmlparser.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/pm/msproject/xmlparser.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -61,14 +61,10 @@
exit;
}
-//printr($data,'initial-data');
-
// SECTION 1. DEBUG XML
$data = str_replace("</ ","</",$data);
$data = str_replace("</ ","</",$data);
$data = str_replace("\r","",$data);
-printr($data,'next-data');
-printr(getenv('TZ'),'xmlparser1:: TZ');
//SECTION 2.
//FUNCTIONS AND VARIABLES
@@ -383,27 +379,19 @@
}
}
}
-printr($foo2,'Starting XMLParse 1');
-printr(getenv('TZ'),'xmlparser2:: TZ');
//SECTION 3. MAIN
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
-printr($foo2,'Starting XMLParse 2');
xml_set_character_data_handler( $xml_parser, "characterDataHandler");
-printr($foo2,'Starting XMLParse 3');
if (!xml_parse($xml_parser, $data,true)) {
- printr($foo2,'Starting XMLParse 4');
$err=sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser));
- printr($err,'Fatal Error');
die($err);
}
xml_parser_free($xml_parser);
-printr($result["REQUEST"],'request');
-printr(getenv('TZ'),'xmlparser3:: TZ');
-//SECTION 4. CALL GFORGE FUNCTIONS
+//SECTION 4. CALL FUNCTIONS
switch ($result["REQUEST"]) {
//MSPLogin
case $result["REQUEST"] == "GetSubprojects": {
@@ -435,7 +423,6 @@
case $result["REQUEST"] == "download": {
if ((trim($result["ACTION"]) == "GetLatestVersion") || (trim($result["ACTION"]) == "Checkout")) {
$gforgeresult =& MSPDownload($result["session_id"],$result["subproject"][0]["id"]);
- printr($gforgeresult,'gforgeresult');
$return = ('<?xml version="1.0"?>');
$return .= ('<xml>');
if ($gforgeresult["success"] == true) {
@@ -459,7 +446,7 @@
$return .= (date('Y-m-d H:i:s',$task->getLastModifiedDate()));
}
$return .= ('</lastmodified>');
- $users =& user_get_objects($task->getAssignedTo());
+ $users = user_get_objects($task->getAssignedTo());
if (count($users) == 1 && $users[0]->getID()==100) {
//skip if only one user - the 100 user
} else {
@@ -484,7 +471,6 @@
$return .= ('</task>');
}
$return .= ('</tasks>');
- printr($return,'download XML');
print $return;
} else {
print($return.'<response handle="error">');
@@ -591,5 +577,3 @@
break;
}
}
-
-printrcomplete();
Modified: trunk/src/www/project/admin/users.php
===================================================================
--- trunk/src/www/project/admin/users.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/project/admin/users.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -93,7 +93,7 @@
if (getStringFromRequest('adduser')) {
/* Add user to this project */
$form_unix_name = getStringFromRequest('form_unix_name');
- $user_object = &user_get_object_by_name($form_unix_name);
+ $user_object = user_get_object_by_name($form_unix_name);
if ($user_object === false) {
$warning_msg .= _('No Matching Users Found');
} else {
Modified: trunk/src/www/soap/common/group.php
===================================================================
--- trunk/src/www/soap/common/group.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/soap/common/group.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -494,7 +494,7 @@
function addUserToGroup ($session_ser,$user_unix_name, $group_id, $role_id){
continue_session($session_ser);
- $user_object = &user_get_object_by_name($user_unix_name);
+ $user_object = user_get_object_by_name($user_unix_name);
if ($user_object == false) {
return new soap_fault ('addUserToGroup','Could Not Get User','Could Not Get User');
}
@@ -564,7 +564,7 @@
continue_session($session_ser);
$roles = array () ;
- $user = &user_get_object($user_id);
+ $user = user_get_object($user_id);
if ($user == false) {
$errMsg = 'Could not get user: '.$user->getErrorMessage();
return new soap_fault ('2006','user',$errMsg,$errMsg);
Modified: trunk/src/www/soap/common/user.php
===================================================================
--- trunk/src/www/soap/common/user.php 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/soap/common/user.php 2013-09-05 16:57:14 UTC (rev 17899)
@@ -188,7 +188,7 @@
//get user objects for array of user_ids
function &getUsers($session_ser,$user_ids) {
continue_session($session_ser);
- $usrs =& user_get_objects($user_ids);
+ $usrs = user_get_objects($user_ids);
if (!$usrs) {
return new soap_fault ('3001','user','Could Not Get Users By Id','Could Not Get Users By Id');
}
@@ -232,7 +232,7 @@
//get user objects for array of unix_names
function getUsersByName($session_ser,$user_names) {
continue_session($session_ser);
- $usrs =& user_get_objects_by_name($user_names);
+ $usrs = user_get_objects_by_name($user_names);
if (!$usrs) {
return new soap_fault ('3002','user','Could Not Get Users By Name','Could Not Get Users By Name');
}
@@ -257,7 +257,7 @@
//update user object
function updateUser ($session_ser,$user_id,$firstname,$lastname,$language_id,$timezone,$mail_site,$mail_va,$use_ratings,$jabber_address,$jabber_only,$theme_id,$address,$address2,$phone,$fax,$title,$ccode){
continue_session($session_ser);
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user || !is_object($user)) {
return new soap_fault ('updateUser','Could Not Get User','Could Not Get User');
}
@@ -272,7 +272,7 @@
//delete user object
function deleteUser ($session_ser,$user_id){
continue_session($session_ser);
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user || !is_object($user)) {
return new soap_fault ('deleteUser','Could Not Get User','Could Not Get User');
}elseif ($user->isError()){
@@ -289,7 +289,7 @@
//change status user object
function changeStatus ($session_ser,$user_id,$status){
continue_session($session_ser);
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user || !is_object($user)) {
return new soap_fault ('changeStatus','Could Not Get User','Could Not Get User');
}elseif ($user->isError()){
@@ -306,7 +306,7 @@
//change password user object
function changePassword ($session_ser,$user_id,$password){
continue_session($session_ser);
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user || !is_object($user)) {
return new soap_fault ('changePassword','Could Not Get User','Could Not Get User');
}elseif ($user->isError()){
@@ -323,7 +323,7 @@
//get groups for user_id
function &userGetGroups($session_ser,$user_id) {
continue_session($session_ser);
- $user =& user_get_object($user_id);
+ $user = user_get_object($user_id);
if (!$user) {
return new soap_fault ('3003','user','Could Not Get Users Projects','Could Not Get Users Projects');
}
Modified: trunk/src/www/users
===================================================================
--- trunk/src/www/users 2013-09-05 16:53:47 UTC (rev 17898)
+++ trunk/src/www/users 2013-09-05 16:57:14 UTC (rev 17899)
@@ -67,7 +67,7 @@
}
//get the user object based on the user_name in the URL
-$user =& user_get_object_by_name($username);
+$user = user_get_object_by_name($username);
if (!$user || !is_object($user) || $user->isError() || !$user->isActive()) {
More information about the Fusionforge-commits
mailing list