projects
/
fusionforge
/
fusionforge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
project home
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1493417
)
Revert "test against boolean"
author
Franck Villaume
<franck.villaume@trivialdev.com>
Sat, 23 Oct 2021 13:59:41 +0000
(15:59 +0200)
committer
Franck Villaume
<franck.villaume@trivialdev.com>
Sat, 23 Oct 2021 13:59:41 +0000
(15:59 +0200)
This reverts commit
a264a9609422bae193cbd30a19cf92d9185508c6
.
17 files changed:
src/common/include/TextSanitizer.class.php
patch
|
blob
|
history
src/common/include/my_utils.php
patch
|
blob
|
history
src/common/include/utils.php
patch
|
blob
|
history
src/common/survey/Survey.class.php
patch
|
blob
|
history
src/cronjobs/db/send_pending_items_mail.php
patch
|
blob
|
history
src/plugins/scmbzr/common/BzrPlugin.class.php
patch
|
blob
|
history
src/plugins/scmgit/common/GitPlugin.class.php
patch
|
blob
|
history
src/plugins/scmhook/cronjobs/updateScmRepo.php
patch
|
blob
|
history
src/plugins/scmhook/www/committracker/newcommit.php
patch
|
blob
|
history
src/plugins/scmhook/www/committracker/newcommitcvs.php
patch
|
blob
|
history
src/plugins/scmhook/www/committracker/newcommitgit.php
patch
|
blob
|
history
src/www/forum/attachment.php
patch
|
blob
|
history
src/www/include/expression.php
patch
|
blob
|
history
src/www/pm/admin/index.php
patch
|
blob
|
history
src/www/pm/index.php
patch
|
blob
|
history
src/www/pm/msproject/xmlparser.php
patch
|
blob
|
history
src/www/soap/common/group.php
patch
|
blob
|
history
diff --git
a/src/common/include/TextSanitizer.class.php
b/src/common/include/TextSanitizer.class.php
index 5dde68d518f933885c844e97f8a9a92cb7e32630..3446caeba3e991c2c6dd9c5e80aee386e251f546 100644
(file)
--- a/
src/common/include/TextSanitizer.class.php
+++ b/
src/common/include/TextSanitizer.class.php
@@
-279,10
+279,10
@@
class TextSanitizer extends FFError {
$summary = '';
for ($l = 0; $l < $nb_max; $l++) {
$summary .= '<br />';
$summary = '';
for ($l = 0; $l < $nb_max; $l++) {
$summary .= '<br />';
- if ($truncate ==
=
true && $nb_max < $nb_line && $l == $nb_max - 1) {
+ if ($truncate == true && $nb_max < $nb_line && $l == $nb_max - 1) {
$nb_char = $nb_char * ($nb_line - $nb_max + 1);
}
$nb_char = $nb_char * ($nb_line - $nb_max + 1);
}
- $summary .= util_make_links((($truncate ==
=
true && strlen($arr[$l]) > $nb_char)?
+ $summary .= util_make_links((($truncate == true && strlen($arr[$l]) > $nb_char)?
preg_replace('/[^\s]*$/', ' <b>...</b>', substr($arr[$l], 0, $nb_char), 1) :
$arr[$l]));
}
preg_replace('/[^\s]*$/', ' <b>...</b>', substr($arr[$l], 0, $nb_char), 1) :
$arr[$l]));
}
diff --git
a/src/common/include/my_utils.php
b/src/common/include/my_utils.php
index be23d00ad92e5d2f50b41803ad1e06e0b85a18dd..d48b3d9d7ec8080849f2557ccaecc68520cf1ad2 100644
(file)
--- a/
src/common/include/my_utils.php
+++ b/
src/common/include/my_utils.php
@@
-48,10
+48,10
@@
function my_hide_url($svc, $db_item_id, $item_id, $count, $hide) {
}
// Make sure they are both 0 if never set before
}
// Make sure they are both 0 if never set before
- if (
!$old_count
) {
+ if (
$old_count == false
) {
$old_count = 0;
}
$old_count = 0;
}
- if (
!$old_hid
e) {
+ if (
$old_hide == fals
e) {
$old_hide = 0;
}
if ($item_id == $db_item_id) {
$old_hide = 0;
}
if ($item_id == $db_item_id) {
@@
-95,11
+95,13
@@
function my_hide($svc, $db_item_id, $item_id, $hide) {
if ($old_pref_value) {
list($old_hide, $old_count) = explode('|', $old_pref_value);
}
if ($old_pref_value) {
list($old_hide, $old_count) = explode('|', $old_pref_value);
}
- // Make sure $old_hide is 0 if never set before
- if (!isset($old_hide) || !$old_hide) {
+ if (!isset($old_hide)) {
+ $old_hide = false;
+ }
+ // Make sure they are both 0 if never set before
+ if ($old_hide == false) {
$old_hide = 0;
}
$old_hide = 0;
}
-
if ($item_id == $db_item_id) {
if (!isset($hide)) {
$hide = $old_hide;
if ($item_id == $db_item_id) {
if (!isset($hide)) {
$hide = $old_hide;
diff --git
a/src/common/include/utils.php
b/src/common/include/utils.php
index 57919e74d4cb49804aa4e955bb36bc1a15f6b306..e09fa3dda4aed4c7c8abda3b84bc8ead3252a655 100644
(file)
--- a/
src/common/include/utils.php
+++ b/
src/common/include/utils.php
@@
-999,7
+999,7
@@
function util_display_user($username, $user_id = 0, $text = '', $size = 'xs') {
break;
}
}
break;
}
}
- if (
!$seen
) {
+ if (
$seen == false
) {
return '';
}
}
return '';
}
}
@@
-1152,7
+1152,7
@@
function util_path_info_last_numeric_component() {
if ($x == '/') {
$rv = 0;
$ok = true;
if ($x == '/') {
$rv = 0;
$ok = true;
- } elseif (
!$ok
) {
+ } elseif (
$ok == false
) {
/* need reset using slash */
} elseif ((ord($x) >= 48) && (ord($x) <= 57)) {
$rv = $rv * 10 + ord($x) - 48;
/* need reset using slash */
} elseif ((ord($x) >= 48) && (ord($x) <= 57)) {
$rv = $rv * 10 + ord($x) - 48;
@@
-1507,7
+1507,7
@@
function util_create_file_with_contents($path, $contents) {
return false;
}
$handle = fopen($path, "x+");
return false;
}
$handle = fopen($path, "x+");
- if (
!$handl
e) {
+ if (
$handle == fals
e) {
return false;
}
fwrite($handle, $contents);
return false;
}
fwrite($handle, $contents);
diff --git
a/src/common/survey/Survey.class.php
b/src/common/survey/Survey.class.php
index 1c2a50ab8c45d70b4a8001ec4e5cc1095ac6d6c9..42c34279c30f758fc9efad5c4f8a9341c6f996e6 100644
(file)
--- a/
src/common/survey/Survey.class.php
+++ b/
src/common/survey/Survey.class.php
@@
-453,7
+453,7
@@
class Survey extends FFError {
if ($arr) {
/* Copy questions only if it is not in question string */
for ($i=0; $i<count($this->all_question_array); $i++) {
if ($arr) {
/* Copy questions only if it is not in question string */
for ($i=0; $i<count($this->all_question_array); $i++) {
- if (
!array_search($this->all_question_array[$i]->getID(), $arr)
&&
+ if (
array_search($this->all_question_array[$i]->getID(), $arr) == false
&&
$this->all_question_array[$i]->getID()!=$arr[0]) {
$ret[] = $this->all_question_array[$i];
}
$this->all_question_array[$i]->getID()!=$arr[0]) {
$ret[] = $this->all_question_array[$i];
}
@@
-532,8
+532,8
@@
class Survey extends FFError {
} else {
if ($arr_to_add && is_array($arr_to_add) && !empty($arr_to_add)) {
for ($i = 0; $i < count($arr_to_add); $i++) {
} else {
if ($arr_to_add && is_array($arr_to_add) && !empty($arr_to_add)) {
for ($i = 0; $i < count($arr_to_add); $i++) {
-
/* Avoid double question */
- if ($arr_to_add[$i] &&
!array_search($arr_to_add[$i], $arr)
&& $arr_to_add[$i]!=$arr[0]) {
+ /* Avoid double question */
+ if ($arr_to_add[$i] &&
array_search($arr_to_add[$i], $arr) == false
&& $arr_to_add[$i]!=$arr[0]) {
$arr[] = $arr_to_add[$i];
}
}
$arr[] = $arr_to_add[$i];
}
}
@@
-545,7
+545,7
@@
class Survey extends FFError {
$new_arr = array();
for ($i = 0; $i < count($arr); $i++) {
/* If the value is no in the delete array, copy it into new array */
$new_arr = array();
for ($i = 0; $i < count($arr); $i++) {
/* If the value is no in the delete array, copy it into new array */
- if ($arr[$i] &&
!array_search($arr[$i], $arr_to_del)
&& $arr_to_del[0]!=$arr[$i]) {
+ if ($arr[$i] &&
array_search($arr[$i], $arr_to_del)==false
&& $arr_to_del[0]!=$arr[$i]) {
$new_arr[] = $arr[$i];
}
}
$new_arr[] = $arr[$i];
}
}
@@
-578,7
+578,7
@@
class Survey extends FFError {
/* The question number is not in the array
* We have nothing to change
*/
/* The question number is not in the array
* We have nothing to change
*/
- if (
!$index && $question_number !=
$arr[0]) {
+ if (
$index==false && $question_number!=
$arr[0]) {
return $this->getQuestionString();
}
return $this->getQuestionString();
}
@@
-598,3
+598,8
@@
class Survey extends FFError {
return $this->_makeQuestionString($arr);
}
}
return $this->_makeQuestionString($arr);
}
}
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
diff --git
a/src/cronjobs/db/send_pending_items_mail.php
b/src/cronjobs/db/send_pending_items_mail.php
index 624989659403e3a6c1ae7bde31df52f0eebd3ad5..f8785d796b1a6f4c3ca74301580b7551e1e01c68 100755
(executable)
--- a/
src/cronjobs/db/send_pending_items_mail.php
+++ b/
src/cronjobs/db/send_pending_items_mail.php
@@
-36,20
+36,20
@@
require_once $gfcommon.'include/pre.php';
require $gfcommon.'include/cron_utils.php';
require $gfcommon.'include/cron_utils.php';
-$options
=
$GLOBALS['argv'];
-if ($options){
- $option
=
$options[1];
- if (($option
== 'pm') || ($option == 'all'))
{
+$options
=
$GLOBALS['argv'];
+if ($options
!=FALSE
){
+ $option
=
$options[1];
+ if (($option
=='pm')|| ($option=='all'))
{
echo "running pm";
send_pending_pm_items_mail();
}
echo "running pm";
send_pending_pm_items_mail();
}
- if (($option
== 'tracker') || ($option == 'all'))
{
+ if (($option
=='tracker')|| ($option=='all'))
{
echo "\nrunning tracker";
send_pending_tracker_items_mail();
}
}
echo "\nrunning tracker";
send_pending_tracker_items_mail();
}
}
-function send_pending_pm_items_mail()
{
+function send_pending_pm_items_mail(){
$time = time();
/* first we check the tasks from the project_manager */
$time = time();
/* first we check the tasks from the project_manager */
diff --git
a/src/plugins/scmbzr/common/BzrPlugin.class.php
b/src/plugins/scmbzr/common/BzrPlugin.class.php
index 8b2d1e9f0ef69dc3327d1323db1394b5fdc20baa..4255bfd1f45c34c9032cdca0b08caa122bd2cce1 100644
(file)
--- a/
src/plugins/scmbzr/common/BzrPlugin.class.php
+++ b/
src/plugins/scmbzr/common/BzrPlugin.class.php
@@
-201,7
+201,7
@@
over it to the project's administrator.");
if (!$repo_exists) {
$tmp_repo = util_mkdtemp('.bzr', $project_name);
if (!$repo_exists) {
$tmp_repo = util_mkdtemp('.bzr', $project_name);
- if ($tmp_repo ==
=
false) {
+ if ($tmp_repo == false) {
return false;
}
return false;
}
diff --git
a/src/plugins/scmgit/common/GitPlugin.class.php
b/src/plugins/scmgit/common/GitPlugin.class.php
index 088be711f464f1b1a041f46fdd553c926b31ca84..d5b98613e432ab96043b700b2322485db2a104a7 100644
(file)
--- a/
src/plugins/scmgit/common/GitPlugin.class.php
+++ b/
src/plugins/scmgit/common/GitPlugin.class.php
@@
-460,7
+460,7
@@
control over it to the project's administrator.");
if (!is_dir($main_repo) || (!is_file("$main_repo/HEAD") &&
!is_dir("$main_repo/objects") && !is_dir("$main_repo/refs"))) {
$tmp_repo = util_mkdtemp('.git', $project_name);
if (!is_dir($main_repo) || (!is_file("$main_repo/HEAD") &&
!is_dir("$main_repo/objects") && !is_dir("$main_repo/refs"))) {
$tmp_repo = util_mkdtemp('.git', $project_name);
- if ($tmp_repo ==
=
false) {
+ if ($tmp_repo == false) {
return false;
}
$result = '';
return false;
}
$result = '';
diff --git
a/src/plugins/scmhook/cronjobs/updateScmRepo.php
b/src/plugins/scmhook/cronjobs/updateScmRepo.php
index 8a663356133d2b7b139eb623bcf6cd5c9862c1d3..ce62364da2743047f9ee0771d8c693fe785242b6 100755
(executable)
--- a/
src/plugins/scmhook/cronjobs/updateScmRepo.php
+++ b/
src/plugins/scmhook/cronjobs/updateScmRepo.php
@@
-44,7
+44,7
@@
while ($task = db_fetch_array($res)) {
$group_id = $task['group_id'];
$user_name = $task['user_name'];
// Run as the requesting user to avoid symlinks attacks
$group_id = $task['group_id'];
$user_name = $task['user_name'];
// Run as the requesting user to avoid symlinks attacks
- if (
!util_sudo_effective_user($user_name, 'install_hooks', array($group_id))
) {
+ if (
util_sudo_effective_user($user_name, 'install_hooks', array($group_id)) == false
) {
cron_debug("ERROR scmhook: couldn't run install_hooks as user $user_name");
}
}
cron_debug("ERROR scmhook: couldn't run install_hooks as user $user_name");
}
}
diff --git
a/src/plugins/scmhook/www/committracker/newcommit.php
b/src/plugins/scmhook/www/committracker/newcommit.php
index f7987fbb438e85c0e4386c145740588063863e25..dc7dba9da4cfd6e42e5506ba851e95642b9afe5b 100644
(file)
--- a/
src/plugins/scmhook/www/committracker/newcommit.php
+++ b/
src/plugins/scmhook/www/committracker/newcommit.php
@@
-226,7
+226,7
@@
AND project_group_list.group_id=$2',
if (isset($Configs) && is_array($Configs)) {
foreach ($Configs as $Config) {
$Result = parseConfig($Config);
if (isset($Configs) && is_array($Configs)) {
foreach ($Configs as $Config) {
$Result = parseConfig($Config);
- if (
!$Result['check']
) {
+ if (
$Result['check'] == false
) {
exit_error('Check_error:' . $Result['error']);
}
exit_error('Check_error:' . $Result['error']);
}
diff --git
a/src/plugins/scmhook/www/committracker/newcommitcvs.php
b/src/plugins/scmhook/www/committracker/newcommitcvs.php
index 14d3306e15157a0d114199c1bbce434b7e212c46..f785c43816525b805ec5b57f58f37f1dca0ba236 100644
(file)
--- a/
src/plugins/scmhook/www/committracker/newcommitcvs.php
+++ b/
src/plugins/scmhook/www/committracker/newcommitcvs.php
@@
-184,7
+184,7
@@
function addTaskLog($Config, $GroupId, $Num) {
if (isset($Configs) && is_array($Configs)) {
foreach ($Configs as $Config) {
$Result = parseConfig($Config);
if (isset($Configs) && is_array($Configs)) {
foreach ($Configs as $Config) {
$Result = parseConfig($Config);
- if (
!$Result['check']
) {
+ if (
$Result['check'] == false
) {
exit_error('Check_error', $Result['error']);
}
// ArtifactNumbers
exit_error('Check_error', $Result['error']);
}
// ArtifactNumbers
diff --git
a/src/plugins/scmhook/www/committracker/newcommitgit.php
b/src/plugins/scmhook/www/committracker/newcommitgit.php
index 31641254766d9f613238eab6b3b511a8bf31cd26..138905d77a5929c1b69a2c055a5dc79c1dda9e0f 100644
(file)
--- a/
src/plugins/scmhook/www/committracker/newcommitgit.php
+++ b/
src/plugins/scmhook/www/committracker/newcommitgit.php
@@
-241,7
+241,7
@@
AND project_group_list.group_id=$2',
if (isset($Configs) && is_array($Configs)) {
foreach ($Configs as $Config) {
$Result = parseConfig($Config);
if (isset($Configs) && is_array($Configs)) {
foreach ($Configs as $Config) {
$Result = parseConfig($Config);
- if (
!$Result['check']
) {
+ if (
$Result['check'] == false
) {
exit_error('Check_error:' . $Result['error']);
}
exit_error('Check_error:' . $Result['error']);
}
diff --git
a/src/www/forum/attachment.php
b/src/www/forum/attachment.php
index a038fa004d378541588e2384fe3ad8f554f6590e..c5ff5d7bb371e27639f7b7642a09c3db17a6b308 100644
(file)
--- a/
src/www/forum/attachment.php
+++ b/
src/www/forum/attachment.php
@@
-126,14
+126,14
@@
if ($edit == "yes") {
if ($attachid) {
//update existing one
$attachok = $am->attach($attach,$group_id,$attachid,$msg_id);
if ($attachid) {
//update existing one
$attachok = $am->attach($attach,$group_id,$attachid,$msg_id);
- if ($attachok) {
+ if ($attachok
!=false
) {
$fm->fetchData($msg_id);
$fm->sendAttachNotice($attachok);
}
} else {
//add new one
$attachok = $am->attach($attach,$group_id,false,$msg_id);
$fm->fetchData($msg_id);
$fm->sendAttachNotice($attachok);
}
} else {
//add new one
$attachok = $am->attach($attach,$group_id,false,$msg_id);
- if ($attachok) {
+ if ($attachok
!=false
) {
$fm->fetchData($msg_id);
$fm->sendAttachNotice($attachok);
}
$fm->fetchData($msg_id);
$fm->sendAttachNotice($attachok);
}
diff --git
a/src/www/include/expression.php
b/src/www/include/expression.php
index 78ca4e99bf178b418438e5a3960a23551b4494de..fd38234c67da2599e290d9fa98a7c7f7e620c10c 100644
(file)
--- a/
src/www/include/expression.php
+++ b/
src/www/include/expression.php
@@
-384,7
+384,7
@@
class Expression {
// evaluate postfix notation
function pfx($tokens, $vars = array()) {
$binaryOperator = array ('+', '-', '*', '/', '^', '<', '>', '<=', '>=', '==', '&&', '||', '!=', '=~', '%');
// evaluate postfix notation
function pfx($tokens, $vars = array()) {
$binaryOperator = array ('+', '-', '*', '/', '^', '<', '>', '<=', '>=', '==', '&&', '||', '!=', '=~', '%');
- if ($tokens ==
=
false) {
+ if ($tokens == false) {
return false;
}
$stack = new ExpressionStack ();
return false;
}
$stack = new ExpressionStack ();
diff --git
a/src/www/pm/admin/index.php
b/src/www/pm/admin/index.php
index 59839c7f353c0cb3475b2e800c2ec6eebe30f4e2..eb93f737b69f9780cece745af0c9ec43811c42ec 100644
(file)
--- a/
src/www/pm/admin/index.php
+++ b/
src/www/pm/admin/index.php
@@
-412,7
+412,7
@@
if ($add_cat && $group_project_id) {
$pg_arr = $pgf->getProjectGroups();
$pg_arr = $pgf->getProjectGroups();
- if ($pg_arr ==
=
false || empty($pg_arr)) {
+ if ($pg_arr == false || empty($pg_arr)) {
echo $HTML->information(_('No Subprojects Found in this Project'));
echo '<p>' . _('You may add new Subprojects using the “Add a Subproject” link above.') . '</p>';
echo db_error();
echo $HTML->information(_('No Subprojects Found in this Project'));
echo '<p>' . _('You may add new Subprojects using the “Add a Subproject” link above.') . '</p>';
echo db_error();
diff --git
a/src/www/pm/index.php
b/src/www/pm/index.php
index 7aef60d9179513a5d4fe53b42fc2f5ea5bad283f..925b2b957c7e2f7b68673a341f30258599515a26 100644
(file)
--- a/
src/www/pm/index.php
+++ b/
src/www/pm/index.php
@@
-60,7
+60,7
@@
pm_header(array('title' => sprintf(_('Subprojects for %s'), $g->getPublicName())
plugin_hook('blocks', 'tasks index');
plugin_hook('blocks', 'tasks index');
-if ($pg_arr ==
=
false || empty($pg_arr)) {
+if ($pg_arr == false || empty($pg_arr)) {
echo $HTML->information(_('No Subprojects Found'));
echo '<p>'._('No subprojects have been set up, or you cannot view them.').'</p>';
echo '<p class="important">'._('The Admin for this project will have to set up subprojects using the admin page.').'</p>';
echo $HTML->information(_('No Subprojects Found'));
echo '<p>'._('No subprojects have been set up, or you cannot view them.').'</p>';
echo '<p class="important">'._('The Admin for this project will have to set up subprojects using the admin page.').'</p>';
diff --git
a/src/www/pm/msproject/xmlparser.php
b/src/www/pm/msproject/xmlparser.php
index 9487f5531299d5f069db68bbff3671ad78407ba3..8ab24ab295ffb96100730225e564d1f60ff79004 100644
(file)
--- a/
src/www/pm/msproject/xmlparser.php
+++ b/
src/www/pm/msproject/xmlparser.php
@@
-108,7
+108,7
@@
function startElement($parser, $name, $attrib) {
global $linktypedependenton;
$tag_aux = $name;
global $linktypedependenton;
$tag_aux = $name;
- if ($tasks){
+ if ($tasks
== true
){
//ID TASK
if ($name == "TASK") {
/* $task_id = $attrib["ID"];
//ID TASK
if ($name == "TASK") {
/* $task_id = $attrib["ID"];
@@
-117,7
+117,7
@@
function startElement($parser, $name, $attrib) {
$parent_project_id = $attrib["PARENT_PROJECT_ID"];
$isnew = $attrib["ISNEW"];
*/
$parent_project_id = $attrib["PARENT_PROJECT_ID"];
$isnew = $attrib["ISNEW"];
*/
- if ($fdependenton){
+ if ($fdependenton
== true
){
$iddependenton = $attrib["ID"];
$projectiddependenton = $attrib["PROJECTID"];
$linktypedependenton= $attrib["LINKTYPE"];
$iddependenton = $attrib["ID"];
$projectiddependenton = $attrib["PROJECTID"];
$linktypedependenton= $attrib["LINKTYPE"];
@@
-185,12
+185,12
@@
function endElement($parser, $name) {
global $adependenton;
global $result;
global $adependenton;
global $result;
- if ($name == "TASK" && $principal_tag=="upload" && ($fdependenton ==
=
false)){
+ if ($name == "TASK" && $principal_tag=="upload" && ($fdependenton == false)){
$task_count++;
$atasks["resources"] = $resourcename;
$resourcename = array();
}
$task_count++;
$atasks["resources"] = $resourcename;
$resourcename = array();
}
- if ($name == "TASK" && $principal_tag=="upload" &&($fdependenton ==
=
false)) {
+ if ($name == "TASK" && $principal_tag=="upload" &&($fdependenton == false)) {
$result["tasks"][] = $atasks;
$atasks=array();
}
$result["tasks"][] = $atasks;
$atasks=array();
}
@@
-290,7
+290,7
@@
function characterDataHandler ($parser, $data) {
break;
}
case $tag_aux == "TASK": {
break;
}
case $tag_aux == "TASK": {
- if ($fdependenton) {
+ if ($fdependenton
== true
) {
$adependenton[] = array("task_id"=>$iddependenton,"msproj_id"=>$projectiddependenton,"link_type"=>$linktypedependenton,"task_name"=>$data);
} else {
$atasks = Array();
$adependenton[] = array("task_id"=>$iddependenton,"msproj_id"=>$projectiddependenton,"link_type"=>$linktypedependenton,"task_name"=>$data);
} else {
$atasks = Array();
@@
-382,15
+382,15
@@
xml_parser_free($xml_parser);
switch ($result["REQUEST"]) {
//MSPLogin
case $result["REQUEST"] == "GetSubprojects": {
switch ($result["REQUEST"]) {
//MSPLogin
case $result["REQUEST"] == "GetSubprojects": {
- $
f
forgeresult = MSPLogin($result["loginid"],$result["password"]);
+ $
g
forgeresult = MSPLogin($result["loginid"],$result["password"]);
print('<?xml version="1.0"?>');
print('<xml>');
print('<?xml version="1.0"?>');
print('<xml>');
- if ($
fforgeresult["success"] =
== true) {
+ if ($
gforgeresult["success"]
== true) {
print('<response handle="result">');
print('<session_id>');
print('<response handle="result">');
print('<session_id>');
- print($
f
forgeresult["session_hash"]);
+ print($
g
forgeresult["session_hash"]);
print('</session_id>');
print('</session_id>');
- $subprojects = $
f
forgeresult["subprojects"];
+ $subprojects = $
g
forgeresult["subprojects"];
print('<subprojects>');
if (count($subprojects) > 0 ) {
foreach($subprojects as $k => $v) {
print('<subprojects>');
if (count($subprojects) > 0 ) {
foreach($subprojects as $k => $v) {
@@
-400,7
+400,7
@@
switch ($result["REQUEST"]) {
print('</subprojects>');
} else {
print('<response handle="error">');
print('</subprojects>');
} else {
print('<response handle="error">');
- print('<error><description>'.$
f
forgeresult["errormessage"].'</description></error>');
+ print('<error><description>'.$
g
forgeresult["errormessage"].'</description></error>');
}
print('</response>');
print('</xml>');
}
print('</response>');
print('</xml>');
@@
-409,12
+409,12
@@
switch ($result["REQUEST"]) {
//MSPDownload
case $result["REQUEST"] == "download": {
if ((trim($result["ACTION"]) == "GetLatestVersion") || (trim($result["ACTION"]) == "Checkout")) {
//MSPDownload
case $result["REQUEST"] == "download": {
if ((trim($result["ACTION"]) == "GetLatestVersion") || (trim($result["ACTION"]) == "Checkout")) {
- $
f
forgeresult =& MSPDownload($result["session_id"],$result["subproject"][0]["id"]);
+ $
g
forgeresult =& MSPDownload($result["session_id"],$result["subproject"][0]["id"]);
$return = ('<?xml version="1.0"?>');
$return .= ('<xml>');
$return = ('<?xml version="1.0"?>');
$return .= ('<xml>');
- if ($
fforgeresult["success"] =
== true) {
+ if ($
gforgeresult["success"]
== true) {
$return .= ('<response handle="result">');
$return .= ('<response handle="result">');
- $tasks =& $
f
forgeresult["tasks"];
+ $tasks =& $
g
forgeresult["tasks"];
$return .= ('<sync_time>'.date('Y-m-d H:i:s').'</sync_time>');
$return .= ('<tasks>');
for ($tc=0; $tc<count($tasks); $tc++) {
$return .= ('<sync_time>'.date('Y-m-d H:i:s').'</sync_time>');
$return .= ('<tasks>');
for ($tc=0; $tc<count($tasks); $tc++) {
@@
-461,7
+461,7
@@
switch ($result["REQUEST"]) {
print $return;
} else {
print($return.'<response handle="error">');
print $return;
} else {
print($return.'<response handle="error">');
- print('<error><description>'.$
f
forgeresult["errormessage"].'</description></error>');
+ print('<error><description>'.$
g
forgeresult["errormessage"].'</description></error>');
}
print('</response>');
print('</xml>');
}
print('</response>');
print('</xml>');
@@
-471,13
+471,13
@@
switch ($result["REQUEST"]) {
//MSPCheckin
case $result["REQUEST"] == "upload": {
if (trim($result["ACTION"]) == "Checkin") {
//MSPCheckin
case $result["REQUEST"] == "upload": {
if (trim($result["ACTION"]) == "Checkin") {
- $
f
forgeresult = MSPCheckin($result["session_id"],$result["subproject"][0]["id"],$result["tasks"]);
+ $
g
forgeresult = MSPCheckin($result["session_id"],$result["subproject"][0]["id"],$result["tasks"]);
print('<?xml version="1.0"?>');
print('<xml>');
print('<?xml version="1.0"?>');
print('<xml>');
- if (!isset($
fforgeresult["success"]) || ($fforgeresult["success"] =
== false)) {
- if ($
f
forgeresult["errormessage"] == "Invalid Resource Name") {
+ if (!isset($
gforgeresult["success"]) || ($gforgeresult["success"]
== false)) {
+ if ($
g
forgeresult["errormessage"] == "Invalid Resource Name") {
print('<response handle="mapuser">');
print('<response handle="mapuser">');
- $resourcenames = $
f
forgeresult["resourcename"];
+ $resourcenames = $
g
forgeresult["resourcename"];
print('<resourcenames>');
if (count($resourcenames) > 0 ) {
foreach($resourcenames as $k => $resourcename) {
print('<resourcenames>');
if (count($resourcenames) > 0 ) {
foreach($resourcenames as $k => $resourcename) {
@@
-486,7
+486,7
@@
switch ($result["REQUEST"]) {
}
print('</resourcenames>');
print('<usernames>');
}
print('</resourcenames>');
print('<usernames>');
- $usernames = $
f
forgeresult["usernames"];
+ $usernames = $
g
forgeresult["usernames"];
if (count($usernames) > 0 ) {
foreach($usernames as $k => $username) {
print('<user id ="'.$k.'">'.$username.'</user>');
if (count($usernames) > 0 ) {
foreach($usernames as $k => $username) {
print('<user id ="'.$k.'">'.$username.'</user>');
@@
-496,7
+496,7
@@
switch ($result["REQUEST"]) {
} else {
print('<response handle="error">');
print('<error>');
} else {
print('<response handle="error">');
print('<error>');
- print('<description>'.$
f
forgeresult["errormessage"].'</description>');
+ print('<description>'.$
g
forgeresult["errormessage"].'</description>');
print('</error>');
}
print('</response>');
print('</error>');
}
print('</response>');
@@
-518,14
+518,14
@@
switch ($result["REQUEST"]) {
//GetProjects
case $result["REQUEST"] == "GetProjects": {
//Call GetProjects
//GetProjects
case $result["REQUEST"] == "GetProjects": {
//Call GetProjects
- $
f
forgeresult = MSPGetProjects($result["session_id"]);
+ $
g
forgeresult = MSPGetProjects($result["session_id"]);
print('<?xml version="1.0"?>');
print('<xml>');
print('<?xml version="1.0"?>');
print('<xml>');
- if ($
f
forgeresult) {
+ if ($
g
forgeresult) {
print('<response handle="result">');
print('<projects>');
print('<response handle="result">');
print('<projects>');
- for ($c=0;$c<count($
f
forgeresult);$c++) {
- $cgroup=$
f
forgeresult[$c];
+ for ($c=0;$c<count($
g
forgeresult);$c++) {
+ $cgroup=$
g
forgeresult[$c];
print('<project id ="'.$cgroup->getID().'">'.$cgroup->getPublicName().'</project>');
}
print('</projects>');
print('<project id ="'.$cgroup->getID().'">'.$cgroup->getPublicName().'</project>');
}
print('</projects>');
@@
-541,23
+541,23
@@
case $result["REQUEST"] == "GetProjects": {
}
case $result["REQUEST"] == "CreateProject": {
}
case $result["REQUEST"] == "CreateProject": {
- if($result["ispublic"]
== 1 || $result["ispublic"] ===
true) {
- $result["ispublic"]
=
1;
+ if($result["ispublic"]
==1 || $result["ispublic"]==
true) {
+ $result["ispublic"]
=
1;
} else {
} else {
- $result["ispublic"]
=
0;
+ $result["ispublic"]
=
0;
}
}
- $
f
forgeresult = MSPCreateProject($result["GROUPID"],$result["session_id"],$result["name"],$result["ispublic"],$result["description"]);
+ $
g
forgeresult = MSPCreateProject($result["GROUPID"],$result["session_id"],$result["name"],$result["ispublic"],$result["description"]);
print('<?xml version="1.0"?>');
print('<xml>');
print('<?xml version="1.0"?>');
print('<xml>');
- if (!is_object($
fforgeresult) && $f
forgeresult['code'] == "error") {
+ if (!is_object($
gforgeresult) && $g
forgeresult['code'] == "error") {
print('<response handle="error">');
print('<error>');
print('<response handle="error">');
print('<error>');
- print('<description>'.$
f
forgeresult['description'].'</description>');
+ print('<description>'.$
g
forgeresult['description'].'</description>');
print('</error>');
} else {
print('<response handle="result">');
print('<Group_ID>'.$result["GROUPID"].'</Group_ID>');
print('</error>');
} else {
print('<response handle="result">');
print('<Group_ID>'.$result["GROUPID"].'</Group_ID>');
- print('<Group_Project_ID>'.$
f
forgeresult->getID().'</Group_Project_ID>');
+ print('<Group_Project_ID>'.$
g
forgeresult->getID().'</Group_Project_ID>');
}
print('</response>');
print('</xml>');
}
print('</response>');
print('</xml>');
diff --git
a/src/www/soap/common/group.php
b/src/www/soap/common/group.php
index a3c83af7e3b523b360c814585ceab9c73e2c67ba..66d48c81e87f277361a2ca4ad46bd206e221216c 100644
(file)
--- a/
src/www/soap/common/group.php
+++ b/
src/www/soap/common/group.php
@@
-496,7
+496,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);
continue_session($session_ser);
$user_object = user_get_object_by_name($user_unix_name);
- if ($user_object ==
=
false) {
+ if ($user_object == false) {
return new soap_fault('addUserToGroup', 'Could Not Get User', 'Could Not Get User');
}
$user_id = $user_object->getID();
return new soap_fault('addUserToGroup', 'Could Not Get User', 'Could Not Get User');
}
$user_id = $user_object->getID();
@@
-566,7
+566,7
@@
function getUserRolesForGroup($session_ser, $group_id, $user_id) {
$roles = array () ;
$user = user_get_object($user_id);
$roles = array () ;
$user = user_get_object($user_id);
- if ($user ==
=
false) {
+ if ($user == false) {
$errMsg = 'Could not get user: '.$user->getErrorMessage();
return new soap_fault('2006', 'user', $errMsg, $errMsg);
}
$errMsg = 'Could not get user: '.$user->getErrorMessage();
return new soap_fault('2006', 'user', $errMsg, $errMsg);
}