Example #1
0
 public static function checkColumn($table, $colum, $type, $default = false, $resetType = false)
 {
     $ehztyhugkvw = "colum";
     ${"GLOBALS"}["dgynoonp"] = "table";
     ${"GLOBALS"}["jclyabjwwyg"] = "resetType";
     global $adb;
     ${"GLOBALS"}["lmlixtkzk"] = "result";
     if (!\Workflow\DbCheck::existTable(${${"GLOBALS"}["dgynoonp"]})) {
         return false;
     }
     ${${"GLOBALS"}["lmlixtkzk"]} = $adb->query("SHOW COLUMNS FROM `" . ${${"GLOBALS"}["rkciyixds"]} . "` LIKE '" . ${$ehztyhugkvw} . "'");
     ${${"GLOBALS"}["fdpssjepgg"]} = $adb->num_rows(${${"GLOBALS"}["mvyuejx"]}) ? true : false;
     if (${${"GLOBALS"}["fdpssjepgg"]} == false) {
         $qywtoe = "colum";
         $fvgect = "default";
         ${"GLOBALS"}["qfykztjfwn"] = "colum";
         echo "Add column '" . ${${"GLOBALS"}["rkciyixds"]} . "'.'" . ${$qywtoe} . "'<br>";
         $adb->query("ALTER TABLE `" . ${${"GLOBALS"}["rkciyixds"]} . "` ADD `" . ${${"GLOBALS"}["qfykztjfwn"]} . "` " . ${${"GLOBALS"}["phkafcwyo"]} . " NOT NULL" . (${${"GLOBALS"}["dqmubcyqohqb"]} !== false ? " DEFAULT  '" . ${$fvgect} . "'" : ""), false);
     } elseif (${${"GLOBALS"}["jclyabjwwyg"]} == true) {
         ${${"GLOBALS"}["eaulupt"]} = strtolower(html_entity_decode($adb->query_result(${${"GLOBALS"}["mvyuejx"]}, 0, "type"), ENT_QUOTES));
         ${${"GLOBALS"}["eaulupt"]} = str_replace(" ", "", ${${"GLOBALS"}["eaulupt"]});
         if (${${"GLOBALS"}["eaulupt"]} != strtolower(str_replace(" ", "", ${${"GLOBALS"}["phkafcwyo"]}))) {
             $zwhgmqncy = "colum";
             $lceffvyvez = "type";
             $oomxuzd = "sql";
             ${${"GLOBALS"}["ztjqjrf"]} = "ALTER TABLE  `" . ${${"GLOBALS"}["rkciyixds"]} . "` CHANGE  `" . ${$zwhgmqncy} . "`  `" . ${${"GLOBALS"}["cqojoiyxp"]} . "` " . ${$lceffvyvez} . ";";
             $adb->query(${$oomxuzd});
         }
     }
     return ${${"GLOBALS"}["fdpssjepgg"]};
 }
Example #2
0
${${"GLOBALS"}["hmzfpw"]} = "UPDATE vtiger_links SET linklabel = \"Workflows\" WHERE linklabel = \"Workflow Designer\" AND linktype LIKE \"%SIDEBAR%\"";
$adb->query(${$imwpklntk});
${${"GLOBALS"}["gegcyny"]} = "SELECT id FROM vtiger_wf_repository WHERE url LIKE \"%repository.stefanwarnat.de\"";
${$pnkwvok} = $adb->query(${${"GLOBALS"}["fdppkwciznp"]});
if ($adb->num_rows(${${"GLOBALS"}["kkktjzvrc"]}) == 0) {
    ${${"GLOBALS"}["vsgsfxcafj"]} = true;
}
if (${$vcshmvwnst}) {
    $nfrrerj = "className";
    ${"GLOBALS"}["xslgjo"] = "newId";
    ${$nfrrerj} = "SWEx" . "tensio" . "n_Gen" . "Key";
    $otrpfemqr = "className";
    ${"GLOBALS"}["pmffqawm"] = "repo";
    ${"GLOBALS"}["mjiswqb"] = "newId";
    ${"GLOBALS"}["trlxmqfk"] = "moduleModel";
    ${${"GLOBALS"}["trlxmqfk"]} = Vtiger_Module_Model::getInstance("Workflow2");
    ${${"GLOBALS"}["fwwzearmugo"]} = new ${$otrpfemqr}("Workflow2", $moduleModel->version);
    ${${"GLOBALS"}["ybtbtavin"]} = $GenKey->gb8d9a4f2e098e53aee15b6fd5f9456705f64f354();
    ${${"GLOBALS"}["mjiswqb"]} = \Workflow\Repository::register("http://repository.stefanwarnat.de", ${${"GLOBALS"}["ybtbtavin"]}, "Basic Repository", true);
    ${${"GLOBALS"}["pmffqawm"]} = new \Workflow\Repository(${${"GLOBALS"}["xslgjo"]});
    $byuwwzjhg = "newId";
    $repo->installAll(\Workflow\Repository::INSTALL_ALL);
    $adb->query("UPDATE vtiger_wf_types SET repo_id = " . ${$byuwwzjhg});
}
${${"GLOBALS"}["ivjfmcpm"]} = $adb->query_result(${${"GLOBALS"}["kkktjzvrc"]}, 0, "id");
${${"GLOBALS"}["vijjfxnopiy"]} = "SWEx" . "tensio" . "n_Gen" . "Key";
${${"GLOBALS"}["fwwzearmugo"]} = new ${${"GLOBALS"}["vijjfxnopiy"]}("Workflow2", $moduleModel->version);
${${"GLOBALS"}["ybtbtavin"]} = $GenKey->gb8d9a4f2e098e53aee15b6fd5f9456705f64f354();
$adb->query("UPDATE vtiger_wf_repository SET licensecode = \"" . md5(${${"GLOBALS"}["ybtbtavin"]}) . "\" WHERE url LIKE \"%repository.stefanwarnat.de\"");
\Workflow\DbCheck::checkColumn("vtiger_wf_repository_types", "mode", "VARCHAR(16)");