function piworkflowProcessArticleColumns($array) { global $idcat, $action, $modidartlang; if ($action == "workflow_do_action") { $selectedAction = "wfselect" . $modidartlang; doWorkflowAction($modidartlang, $GLOBALS[$selectedAction]); } $defaultidworkflow = getWorkflowForCat($idcat); if ($defaultidworkflow != 0) { $narray = array(); $bInserted = false; foreach ($array as $sKey => $sValue) { $narray[$sKey] = $sValue; if ($sKey == 'title' && !$bInserted) { $narray["wftitle"] = $array["title"]; $narray["wfstep"] = i18n("Workflow Step", "workflow"); $narray["wfaction"] = i18n("Workflow Action", "workflow"); $narray["wfeditor"] = i18n("Workflow Editor", "workflow"); $narray["wflaststatus"] = i18n("Last status", "workflow"); $bInserted = true; } } unset($narray['title']); unset($narray['changeddate']); unset($narray['publisheddate']); unset($narray['sortorder']); } else { $narray = $array; } return $narray; }
global $sess; $sSession = $sess->id; $wfa = new WorkflowArtAllocations(); $wfu = new WorkflowUserSequences(); $users = new User(); $db2 = new DB_Contenido(); ob_start(); if ($usershow == "") { $usershow = $auth->auth["uid"]; } if (!$perm->have_perm_area_action($area, "workflow_task_user_select")) { $usershow = $auth->auth["uid"]; } if ($action == "workflow_do_action") { $selectedAction = "wfselect" . $modidartlang; doWorkflowAction($modidartlang, $GLOBALS[$selectedAction]); } $wfa->select(); while ($wfaitem = $wfa->next()) { $wfaid = $wfaitem->get("idartallocation"); $usersequence[$wfaid] = $wfaitem->get("idusersequence"); $lastusersequence[$wfaid] = $wfaitem->get("lastusersequence"); $article[$wfaid] = $wfaitem->get("idartlang"); } if (is_array($usersequence)) { foreach ($usersequence as $key => $value) { $wfu->select("idusersequence = '{$value}'"); if ($obj = $wfu->next()) { $userids[$key] = $obj->get("iduser"); } }