dieOnError = true; } if(!empty($_POST["send_report"])) { $moduleModel = Vtiger_Module_Model::getInstance("Workflow2"); require_once("modules/Emails/class.phpmailer.php"); require_once('modules/Emails/mail.php'); $mailtext = "ERROR REPORT WORKFLOW EXTENSION ".$moduleModel->version." - vtiger VERSION ".$vtiger_current_version."\n\n"; $mailtext .= "PHPINFO:\n".$_POST["system"]["phpinfo"]."\n\n"; $mailtext .= "TABLES:\n".$_POST["system"]["table"]."\n\n"; $mailtext .= "CurrentUser:\n".$_POST["system"]["currentUser"]."\n\n"; $mailtext .= "FEHLERBESCHREIBUNG:\n".$_POST["errorRecognization"]."\n\n"; $mail = new PHPMailer(); $mail->IsSMTP(); setMailServerProperties($mail); $adminUser = \Users::getActiveAdminUser(); $mail->FromName = "Fehlerbericht"; $mail->Sender = $adminUser->email1; $mail->Subject = "Workflow Designer Error Report"; $mail->Body = $mailtext; $mail->AddAddress("errorreport@stefanwarnat.de", "Stefan Warnat"); $mailReturn = MailSend($mail); #setMailerProperties($mail,$subject,$contents,$from_email,$from_name,trim($to_email,","),$attachment,$emailid,$module,$logo); #$mail_return = send_mail("Accounts", "kontakt@stefanwarnat.de", "Fehlerbereicht", "errorreport@stefanwarnat.de","",$mailtext); /* ONLY DEBUG*/var_dump($mailReturn); } $extended = !empty($_GET["extend"]); $extendedGroups = array("PHP Variables", "HTTP Headers Information", "Apache Environment"); # Source: http://php.net/manual/de/function.phpinfo.php (Ken) function phpinfo_array() { ob_start(); phpinfo(INFO_ALL); $info_arr = array(); $info_lines = explode("\n", strip_tags(ob_get_clean(), "

")); $cat = "General"; foreach($info_lines as $line) { // new cat? preg_match("~

(.*)

~", $line, $title) ? $cat = trim($title[1]) : null; if(preg_match("~]+>([^<]*)]+>([^<]*)~", $line, $val)) { $info_arr[$cat][$val[1]] = trim($val[2]); } elseif(preg_match("~]+>([^<]*)]+>([^<]*)]+>([^<]*)~", $line, $val)) { $info_arr[$cat][$val[1]] = array("local" => $val[2], "master" => $val[3]); } } return $info_arr; } global $dbconfig; $result = $adb->query('SELECT VERSION() as mysql_version'); $data = $adb->fetchByAssoc($result); $debug = array("phpinfo" => array( 'Root Directory: "'.vglobal('root_directory').'"', 'Site URL: "'.vglobal('site_URL').'"', 'DBType: '.$dbconfig['db_type'], 'MySQL Version: '.$data['mysql_version'], ), "table" => array() ); $phpinfo = phpinfo_array(); foreach($phpinfo as $groupKey => $group) { if(in_array($groupKey, $extendedGroups) && $extended == false) { continue; } $debug["phpinfo"][] = "Group: ".$groupKey; if($groupKey == "Apache Environment" && $extended == false) { continue; } foreach($group as $index => $value) { if(!is_string($value) && !empty($value["local"])) { $debug["phpinfo"][] = " `".$index."` = '".$value["local"]."'"; } else { $debug["phpinfo"][] = " `".$index."` = '".$value."'"; } } } $tables = $adb->get_tables(); foreach($tables as $table) { if(substr($table, 0, 9) == "vtiger_wf") { $debug["table"][] = "Table: ".$table; $cols = $adb->query("SHOW FULL COLUMNS FROM `".$table."`"); while($row = $adb->fetchByAssoc($cols)) { $debug["table"][] = " `".$row["field"]."` - ".$row["type"]. " - ".$row["collation"].' '.$row['extra'].' Permission: '.$row['privileges']; } } } $sql = 'SELECT type, handlerclass, module, output, persons, text, input styleclass, version, repo_id FROM vtiger_wf_types'; $result = $adb->query($sql, true); $debug["table"][] = "### Types"; while($row = $adb->fetchByAssoc($result)) { //$debug["table"][] = " ".str_pad($row['type'], 20, ' ').' - Version '.$row['version'] .' - RepoID '.$row['repo_id']; $debug["table"][] = json_encode($row); } ?>

Workflow Designer - Debug


Please do not only send the Error Report. We won't check them, without reference in our support system. Explain your problem with an E-Mail to warnat@redoo-networks.com





Current User Settings: (Passwords are removed!)



">
- List of Vtiger_JsScript_Model instances */ function getHeaderScripts(Vtiger_Request $request) { $headerScriptInstances = parent::getHeaderScripts($request); $moduleName = $request->getModule(); $jsFileNames = array( "modules.Settings.$moduleName.views.resources.Workflow2", "modules.Settings.$moduleName.views.resources.HttpHandlerManager", ); $jsScriptInstances = $this->checkAndConvertJsScripts($jsFileNames); $headerScriptInstances = array_merge($headerScriptInstances, $jsScriptInstances); $moduleModel = Vtiger_Module_Model::getInstance($moduleName); foreach($headerScriptInstances as $obj) { $src = $obj->get('src'); if(!empty($src) && strpos($src, $moduleName) !== false) { $obj->set('src', $src.'?v='.$moduleModel->version); } } return $headerScriptInstances; } function getHeaderCss(Vtiger_Request $request) { $headerScriptInstances = parent::getHeaderCss($request); $moduleName = $request->getModule(); $cssFileNames = array( "~/modules/Settings/$moduleName/views/resources/Workflow2.css", ); $cssScriptInstances = $this->checkAndConvertCssStyles($cssFileNames); $headerStyleInstances = array_merge($headerScriptInstances, $cssScriptInstances); return $headerStyleInstances; } }