Exemplo n.º 1
0
 $fromuser = $_SESSION['reassignRecords']['fromuser'];
 $touser = $_SESSION['reassignRecords']['touser'];
 $fromusername = $_SESSION['reassignRecords']['fromusername'];
 $tousername = $_SESSION['reassignRecords']['tousername'];
 $toteam = $_SESSION['reassignRecords']['toteam'];
 $toteamsetid = $_SESSION['reassignRecords']['toteamsetid'];
 $toteamname = $_SESSION['reassignRecords']['toteamname'];
 //$beanListFlip = array_flip($_SESSION['reassignRecords']['assignedModuleListCache']);
 foreach ($_SESSION['reassignRecords']['modules'] as $module => $queries) {
     $moduleLabel = isset($app_list_strings['moduleList'][$module]) ? $app_list_strings['moduleList'][$module] : $module;
     $workflow = isset($_POST[$module . "_workflow"]) && ($_POST[$module . "_workflow"] = "on");
     $query = $workflow ? $queries['query'] : $queries['update'];
     echo "<h5>{$mod_strings_users['LBL_PROCESSING']} {$moduleLabel}</h5>";
     // nutmeg sfa-219 : Fix reassignment of records when user set to Inactive
     if ($module == 'ForecastWorksheets') {
         $affected_rows = ForecastWorksheet::reassignForecast($fromuser, $touser);
         echo "{$mod_strings_users['LBL_UPDATE_FINISH']}: {$affected_rows} {$mod_strings_users['LBL_AFFECTED']}<BR>\n";
         continue;
     } else {
         $res = $db->query($query, true);
         $affected_rows = $db->getAffectedRowCount($res);
     }
     //echo "<i>Workflow and Notifications <b>".($workflow ? "enabled" : "disabled")."</b> for this module record reassignment</i>\n<BR>\n";
     echo "<table border='0' cellspacing='0' cellpadding='0'  class='detail view'>\n";
     echo "<tr>\n";
     echo "<td>\n";
     if (!$workflow) {
         echo "{$mod_strings_users['LBL_UPDATE_FINISH']}: {$affected_rows} {$mod_strings_users['LBL_AFFECTED']}<BR>\n";
     } else {
         $successarr = array();
         $failarr = array();