}
}
-if (is_array($_extra_fields)){
+if (is_array($_extra_fields)) {
$keys=array_keys($_extra_fields);
foreach ($keys as $key) {
if ($_extra_fields[$key] != 'Array') {
}
}
} else {
- if (isset($_extra_fields)){
+ if (isset($_extra_fields)) {
$aux_extra_fields = $_extra_fields;
} else {
$aux_extra_fields = '';
if ($ath->usesCustomStatuses()) {
$aux_extra_fields = array();
- if (is_array($_extra_fields)){
+ if (is_array($_extra_fields)) {
$keys=array_keys($_extra_fields);
foreach ($keys as $key) {
if (!is_array($_extra_fields[$key])) {
$title_arr[]=_('Title');
$title_arr[]=_('Operation');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
for ($i=0; $i < $rows; $i++) {
$id = db_result($result, $i, 'id');
$g=$ath->getGroup();
$roles = $g->getRoles();
foreach ($roles as $role) {
- if (!in_array(get_class($role), array('RoleLoggedIn','RoleAnonymous'))){
+ if (!in_array(get_class($role), array('RoleLoggedIn','RoleAnonymous'))) {
$vals[$role->getID()]=$role->getName();
}
}
$title_arr[]=_('Default');
}
$title_arr[]='';
- echo $HTML->listTableTop ($title_arr,false, ' ');
+ echo $HTML->listTableTop($title_arr, false, ' ');
if (in_array($efType, unserialize(ARTIFACT_EXTRAFIELDTYPEGROUP_CHOICE))) {
$row_attrs = array('class'=>$HTML->boxGetAltRowStyle(-1,true));
$cells = array();
echo html_e('strong', array(), _('Status'));
echo $ath->statusBox('status_id',1,false,false);
}
- echo html_e('input', array( 'type'=>'submit', 'name'=>'post_changes', 'value'=>_('Submit')));
+ echo html_e('input', array('type'=>'submit', 'name'=>'post_changes', 'value'=>_('Submit')));
echo $HTML->closeForm();
}
if ($efType != ARTIFACT_EXTRAFIELDTYPE_USER) {} else {}
$title_arr[] = _('Up/Down positions');
$title_arr[] = _('Delete');
-echo $HTML->listTableTop ($title_arr,false, ' ');
+echo $HTML->listTableTop($title_arr,false, ' ');
echo implode('', $rows);
echo '<tr class="noborder">
<td>
global $HTML;
$atf = new ArtifactsForUser(@UserManager::instance()->getCurrentUser());
$my_artifacts = array();
- if ($this->_artifact_show == 'ASM'){
- $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.submitted_by=$1 OR av.assigned_to=$1 OR av.artifact_id IN (select artifact_monitor.artifact_id FROM artifact_monitor WHERE artifact_monitor.user_id = $1)) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array( UserManager::instance()->getCurrentUser()->getID()));
+ if ($this->_artifact_show == 'ASM') {
+ $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.submitted_by=$1 OR av.assigned_to=$1 OR av.artifact_id IN (select artifact_monitor.artifact_id FROM artifact_monitor WHERE artifact_monitor.user_id = $1)) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array(UserManager::instance()->getCurrentUser()->getID()));
}
- if ($this->_artifact_show == 'AS'){
- $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.submitted_by=$1 OR av.assigned_to=$1) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array( UserManager::instance()->getCurrentUser()->getID()));
+ if ($this->_artifact_show == 'AS') {
+ $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.submitted_by=$1 OR av.assigned_to=$1) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array(UserManager::instance()->getCurrentUser()->getID()));
}
- if ($this->_artifact_show == 'AM'){
- $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.assigned_to=$1 OR av.artifact_id IN (select artifact_monitor.artifact_id FROM artifact_monitor WHERE artifact_monitor.user_id = $1)) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array( UserManager::instance()->getCurrentUser()->getID()));
+ if ($this->_artifact_show == 'AM') {
+ $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.assigned_to=$1 OR av.artifact_id IN (select artifact_monitor.artifact_id FROM artifact_monitor WHERE artifact_monitor.user_id = $1)) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array(UserManager::instance()->getCurrentUser()->getID()));
}
- if ($this->_artifact_show == 'SM'){
- $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.submitted_by=$1 OR av.artifact_id IN (select artifact_monitor.artifact_id FROM artifact_monitor WHERE artifact_monitor.user_id = $1)) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array( UserManager::instance()->getCurrentUser()->getID()));
+ if ($this->_artifact_show == 'SM') {
+ $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.submitted_by=$1 OR av.artifact_id IN (select artifact_monitor.artifact_id FROM artifact_monitor WHERE artifact_monitor.user_id = $1)) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array(UserManager::instance()->getCurrentUser()->getID()));
}
if ($this->_artifact_show== 'S') {
$my_artifacts = $atf->getSubmittedArtifactsByGroup();
$my_artifacts = $atf->getAssignedArtifactsByGroup();
}
if ($this->_artifact_show== 'M') {
- $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.artifact_id IN (select artifact_monitor.artifact_id FROM artifact_monitor WHERE artifact_monitor.user_id = $1)) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array( UserManager::instance()->getCurrentUser()->getID()));;
+ $my_artifacts = $atf->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av where (av.artifact_id IN (select artifact_monitor.artifact_id FROM artifact_monitor WHERE artifact_monitor.user_id = $1)) AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',array(UserManager::instance()->getCurrentUser()->getID()));;
}
if (count($my_artifacts) > 0) {
- $html_my_artifacts = $HTML->listTableTop(array());
+ $html_my_artifacts = $HTML->listTableTop();
$html_my_artifacts .= $this->_display_artifacts($my_artifacts, 1);
$html_my_artifacts .= $HTML->listTableBottom();
} else {
$allIds = array();
$pm = ProjectManager::instance();
- foreach ($list_trackers as $trackers_array ) {
+ foreach ($list_trackers as $trackers_array) {
$atid = $trackers_array->getArtifactType()->getID();
$group_id = $trackers_array->getArtifactType()->getGroup()->getID();
//work on the tracker of the last round if there was one
if ($atid != $atid_old && $count_aids != 0) {
- list($hide_now,$count_diff,$hide_url) = my_hide_url('artifact', $atid_old, $hide_item_id, $count_aids, $hide_artifact);
+ list($hide_now,$count_diff,$hide_url) =
+ my_hide_url('artifact', $atid_old, $hide_item_id, $count_aids, $hide_artifact);
$count_new = max(0, $count_diff);
$cells = array();
$cells[] = array($hide_url.
echo '<h4>'._('Links to related CVS commits').':</h4>';
$title_arr=$this->getTitleArr();
- echo $GLOBALS['HTML']->listTableTop ($title_arr);
+ echo $GLOBALS['HTML']->listTableTop($title_arr);
for ($i=0; $i<$Rows; $i++) {
$Row = db_fetch_array($DBResult);
* Return a link to the File in cvsweb
*
* @param String $GroupName is the Name of the project
- * @param String $FileName is the FileName ( with path )
+ * @param String $FileName is the FileName (with path)
*
* @return String The string containing a link to the File in the cvsweb
*
* Return a link to the File in cvsweb in the specified Version
*
* @param String $GroupName is the Name of the project
- * @param String $FileName is the FileName ( with path )
+ * @param String $FileName is the FileName (with path)
* @param String $Version the version to retrieve
*
* @return String The string containing a link to the File in the cvsweb
* Return a link to the diff between two versions of a File in cvsweb
*
* @param String $GroupName is the Name of the project
- * @param String $FileName is the FileName ( with path )
+ * @param String $FileName is the FileName (with path)
* @param String $PrevVersion First version to retrieve
* @param String $ActualVersion Second version to retrieve
*
$FOut = fopen($path, "a");
if($FOut) {
fwrite($FOut, "# BEGIN added by gforge-plugin-cvstracker\n");
- if ( $cvs_binary_version == "1.12" ) {
+ if ($cvs_binary_version == "1.12") {
$Line = "ALL ( php -q -d include_path=".ini_get('include_path')." ".forge_get_config('plugins_path')."/cvstracker/bin/post.php %r %p %{sVv} )\n";
}
- if ( $cvs_binary_version == "1.11") {
+ if ($cvs_binary_version == "1.11") {
$Line = "ALL ( php -q -d include_path=".ini_get('include_path')." ".forge_get_config('plugins_path')."/cvstracker/bin/post.php ".$group->getUnixName()." %{sVv} )\n";
}
fwrite($FOut,$Line);
$cvs_binary_version = get_cvs_binary_version();
$array=array();
$array[]="# BEGIN added by gforge-plugin-cvstracker\n";
- if ( $cvs_binary_version == "1.11" ) {
+ if ($cvs_binary_version == "1.11") {
$array[] = "ALL ( php -q -d include_path=".ini_get('include_path')." ".forge_get_config('plugins_path')."/cvstracker/bin/post.php ".$group->getUnixName()." %{sVv} )\n";
}else { //it's version 1.12
$array[] = "ALL ( php -q -d include_path=".ini_get('include_path')." ".forge_get_config('plugins_path')."/cvstracker/bin/post.php %r %p %{sVv} )\n";
preg_match("/cvstracker/",$Line)) {
$LineFound = TRUE;
}
- }
- fclose($FIn);
+ }
+ fclose($FIn);
}
if($LineFound == FALSE) {
$this->addCvsTrackerToFile($Group, $newfile);
_('Message')
);
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
for ($i=0; $i<db_numrows($res); $i++) {
$cells = array();
$error_msg = $fm->getErrorMessage();
session_redirect('/forum/new.php?forum_id='.$forum_id.'&group_id='.$group_id);
} else {
- if ($fm->isPending() ) {
+ if ($fm->isPending()) {
$feedback = _('Message Queued for moderation -> Please wait until the admin approves/rejects it');
} else {
$feedback = _('Message Posted Successfully');
New slashdot-inspired nested threads,
showing all submessages and bodies
*/
- $ret_val .= $fh->showNestedMessage ( $msg_arr["0"][$i] ).'<br />';
+ $ret_val .= $fh->showNestedMessage($msg_arr["0"][$i]).'<br />';
- if ( $msg_arr["0"][$i]->hasFollowups() ) {
+ if ($msg_arr["0"][$i]->hasFollowups()) {
//show submessages for this message
$tempid=$msg_arr["0"][$i]->getID();
// echo "<p>before showNestedMessages() $tempid | ". count( $msg_arr["$tempid"] );
- $ret_val .= $fh->showNestedMessages ( $msg_arr, $tempid );
+ $ret_val .= $fh->showNestedMessages($msg_arr, $tempid);
}
$i++;
}
$title_arr[]=_('Author');
$title_arr[]=_('Date');
- $ret_val .= $HTML->listTableTop ($title_arr);
+ $ret_val .= $HTML->listTableTop($title_arr);
$rows=count($msg_arr[0]);
$avail_rows=$fmf->fetched_rows;
$avail_rows=$fmf->fetched_rows;
for ($i=0; ($i<count($msg_arr) && ($i < $max_rows)); $i++) {
- $ret_val .= $fh->showNestedMessage ( $msg_arr[$i] ).'<br />';
+ $ret_val .= $fh->showNestedMessage($msg_arr[$i]).'<br />';
}
} else {
$title_arr[]=_('Replies');
$title_arr[]=_('Last Post');
- $ret_val .= $HTML->listTableTop ($title_arr);
+ $ret_val .= $HTML->listTableTop($title_arr);
$i=0;
while (($row=db_fetch_array($result)) && ($i < $max_rows)) {
/*
// $title_arr=array();
// $title_arr[]=_('Message')._(': ').$msg_id;
-// echo $GLOBALS['HTML']->listTableTop ($title_arr);
+// echo $GLOBALS['HTML']->listTableTop($title_arr);
$url = util_make_url('/forum/message.php?msg_id='. $msg_id .'&group_id='.$group_id);
$title_arr[]=_('Author');
$title_arr[]=_('Date');
- $ret_val = $HTML->listTableTop ($title_arr);
+ $ret_val = $HTML->listTableTop($title_arr);
$rows=count($msg_arr[0]);
$params['toptab'] = 'people';
$params['group'] = $group_id;
site_project_header($params);
- } elseif (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], 'account')){
+ } elseif (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], 'account')) {
$params['toptab'] = 'my';
site_user_header($params);
} else {
$title_arr[]=_('Experience');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
$rows=db_numrows($result);
if (!$result || $rows < 1) {
$title_arr[]=_('Experience');
$title_arr[]=_('Action');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
$rows=db_numrows($result);
if (!$result || $rows < 1) {
$title_arr[]=_('Level');
$title_arr[]=_('Experience');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
$rows=db_numrows($result);
if (!$result || $rows < 1) {
$title_arr[]=_('Experience').utils_requiredField();
$title_arr[]=_('Action');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
$rows=db_numrows($result);
if (!$result || $rows < 1) {
if ($added && ((count($categories) - 1) > 0)) {
for ($j = 0; $j < (count($categories) - 1); $j++) {
$found = 0;
- if ( $categories[$j]['category_id'] == $categories[$i]['category_id'] ) {
+ if ($categories[$j]['category_id'] == $categories[$i]['category_id']) {
$categories[$j]['total'] += $categories[$i]['total'];
$found = 1;
break;
if (count($projects) < 1) {
$return = $HTML->warning_msg(_('None Found'));
} else {
- $return = $HTML->listTableTop ($title_arr);
+ $return = $HTML->listTableTop($title_arr);
for ($i = 0; $i < count($projects); $i++) {
$return .= '
<tr '. $HTML->boxGetAltRowStyle($i) . '>
$title_arr=array();
$title_arr[]=_('Id');
$title_arr[]=_('Title');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
for ($i=0; $i < $rows; $i++) {
$cells = array();
$cells[][] = db_result($result, $i, 'category_id');
if ($_view=="detail") {
echo '
<tr class="priority'.$pt_arr[$i]->getPriority() .'">
- <td> </td><td colspan="'.(count($title_arr)-1).'">'. nl2br( $pt_arr[$i]->getDetails() ) .'</td>
+ <td> </td><td colspan="'.(count($title_arr)-1).'">'. nl2br($pt_arr[$i]->getDetails()) .'</td>
</tr>';
}
}
}
function multipleAssignedBox ($name='assigned_to[]') {
- $engine = RBACEngine::getInstance () ;
+ $engine = RBACEngine::getInstance();
$techs = $engine->getUsersByAllowedAction ('pm', $this->ProjectGroup->getID(), 'tech') ;
- $tech_id_arr = array () ;
- $tech_name_arr = array () ;
+ $tech_id_arr = array();
+ $tech_name_arr = array();
foreach ($techs as $tech) {
$tech_id_arr[] = $tech->getID() ;
//get the data so we can mark items as SELECTED
$arr2 = $this->getAssignedTo();
- return html_build_multiple_select_box_from_arrays ($tech_id_arr,$tech_name_arr,$name,$arr2);
+ return html_build_multiple_select_box_from_arrays($tech_id_arr,$tech_name_arr,$name,$arr2);
}
function showDependentTasks () {
FROM project_task,project_dependencies
WHERE project_task.project_task_id=project_dependencies.project_task_id
AND project_dependencies.is_dependent_on_task_id=$1',
- array($this->getID() ));
+ array($this->getID()));
$rows=db_numrows($result);
if ($rows > 0) {
echo html_e('h3', array(), _('Tasks That Depend on This Task'));
$title_arr[]=_('Task Id');
$title_arr[]=_('Task Summary');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
for ($i = 0; $i < $rows; $i++) {
$cells = array();
$title_arr[]=_('Open Date');
(($is_admin) ? $title_arr[]=_('Remove Relation') : '');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
for ($i = 0; $i < $rows; $i++) {
$cells = array();
$title_arr[]=_('Date');
$title_arr[]=_('By');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
for ($i = 0; $i < $rows; $i++) {
$field = db_result($result, $i, 'field_name');
$title_arr[]=_('Date');
$title_arr[]=_('By');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
for ($i=0; $i < $rows; $i++) {
$field = db_result($result, $i, 'field_name');
$cells = array();
$labels = $report->labels;
$data = $report->getData();
- echo $HTML->listTableTop (array(_('Type'),
- _('Time')));
+ echo $HTML->listTableTop(array(_('Type'), _('Time')));
for ($i=0; $i<count($labels); $i++) {
echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>'.
'<td>'. $labels[$i] .'</td><td>'. $data[$i] .'</td></tr>';
}
- echo $HTML->listTableBottom ();
+ echo $HTML->listTableBottom();
} elseif ($g_id && $start != $end) {
report_timegraph('project', $type, $start, $end, $g_id);
$labels = $report->labels;
$data = $report->getData();
- echo $HTML->listTableTop (array(_('Type'), _('Time')));
+ echo $HTML->listTableTop(array(_('Type'), _('Time')));
for ($i=0; $i<count($labels); $i++) {
echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>'.
'<td>'. $labels[$i] .'</td><td>'. $data[$i] .'</td></tr>';
}
- echo $HTML->listTableBottom ();
+ echo $HTML->listTableBottom();
} elseif ($start != $end) {
report_timegraph('site', $type, $start, $end);
}
$report->setData($res,1);
$data=$report->getData();
$labels=$report->getDates();
- echo $HTML->listTableTop (array(_('Week'),
- _('Time')));
+ echo $HTML->listTableTop(array(_('Week'), _('Time')));
for ($i=0; $i<count($labels); $i++) {
}
- echo $HTML->listTableBottom ();
+ echo $HTML->listTableBottom();
} elseif ($start != $end) {
report_sitetimebargraph($start, $end);
$xi = 0;
$total_hours = 0;
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
while ($r=db_fetch_array($res)) {
echo '<tr '.$HTML->boxGetAltRowStyle($xi++).'>
<td class="align-center">'.$r['name'].'</td>
}
- echo $HTML->listTableBottom ();
+ echo $HTML->listTableBottom();
} elseif ($dev_id && $start != $end) {
report_timegraph('user', $type, $start, $end, $dev_id);
$title_arr[]= _('Author');
$title_arr[]= _('Delete');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
/*
get the newest version of this snippet, so we can display its code
$title_arr[]= _('Author');
$title_arr[]= _('Actions');
- echo $HTML->listTableTop ($title_arr);
+ echo $HTML->listTableTop($title_arr);
/*
determine the newest version of this package,
$params['toptab'] = 'surveys';
$params['group'] = $group_id;
- if ($project = group_get_object($group_id)){
+ if ($project = group_get_object($group_id)) {
if (!$project->usesSurvey()) {
exit_disabled();
}
* @param Survey $q Question Question Object
* @return string
*/
- function showAddQuestionForm( &$q ) {
+ function showAddQuestionForm(&$q) {
global $group_id;
global $HTML;
* @param Survey $s Question Question Object
* @return string
*/
- function showAddSurveyForm( &$s) {
+ function showAddSurveyForm(&$s) {
global $group_id;
global $survey_id;
global $HTML;
if (! $survey_id && ! count($s->getAddableQuestionInstances())) {
$ret = '<p>' . sprintf(_('Please %1$s create a question %2$s before creating a survey'),
'<a href="'.util_make_url('/survey/admin/question.php?group_id='.$group_id).'">',
- '</a>') .
+ '</a>') .
'</p>';
return $ret;
}
$title_arr[] = " ";
$title_arr[] = _('Questions');
$title_arr[] = " ";
- $ret.= $HTML->listTableTop ($title_arr);
+ $ret.= $HTML->listTableTop($title_arr);
}
for($i = 0; $i < count($arr_to_add); $i++) {
/* Head information */
$title_arr = array(_('Question ID'), _('Question'), _('Type'), _('Edit/Delete'));
- $ret.= $HTML->listTableTop ($title_arr);
+ $ret.= $HTML->listTableTop($title_arr);
for($i = 0; $i < count($questions); $i++) {
if ($questions[$i]->isError()) {
$show_vote=0, $show_edit=0, $show_result=0,
$show_result_graph=0, $show_result_comment=0,
$show_result_csv=0,
- $show_inactive=0 ) {
+ $show_inactive=0) {
global $user_id;
global $group_id;
global $HTML;
$title_arr[] = _("CSV");
}
- $ret.= $HTML->listTableTop ($title_arr);
+ $ret.= $HTML->listTableTop($title_arr);
/* Color index for table */
$color_index=0;
//print 100 chars in words per line
foreach ($words as $word) {
// if we have a stupidly strange word with lots of letters, we'll make a new line for it and split it
- if ( (strlen($word)>100) && ((strlen($word)+$linelength)>100)) {
+ if ((strlen($word)>100) && ((strlen($word)+$linelength)>100)) {
$chunks = $this->split_str($word,50);
foreach ($chunks as $chunk) {
$ret .= $chunk;
for ($i=0;$i<$cnt;$i+=$split_lengt) {
$rslt[]= substr($str,$i,$split_lengt);
}
- return $rslt;
+ return $rslt;
}
/**