コード例 #1
0
ファイル: installupdater.php プロジェクト: kduqi/corebos
}
function putMsg($msg)
{
    echo '<tr width="100%"><td colspan=3>' . $msg . '</td></tr>';
}
echo "<table width=80% align=center border=1>";
$package = new Vtiger_Package();
ob_start();
$rdo = $package->importManifest("modules/cbupdater/manifest.xml");
$out = ob_get_contents();
ob_end_clean();
putMsg($out);
if ($rdo) {
    putMsg("{$module} installed: <a href='index.php?module=cbupdater&action=getupdates'>proceed to the rest of the updates by clicking here</a>");
} else {
    putMsg("ERROR installing {$module}!");
}
?>
</table>
<br /><br />
<b style="color:#FF0000">Failed Queries Log</b>
<div id="failedLog" style="border:1px solid #666666;width:90%;position:relative;height:200px;overflow:auto;left:5%;top:10px;">
	<?php 
foreach ($failure_query_array as $failed_query) {
    echo '<br><font color="red">' . $failed_query . '</font>';
}
?>
</div>
<br /><br />
<table width="35%" border="0" cellpadding="5" cellspacing="0" align="center" class="small">
   <tr>
コード例 #2
0
}
function deleteWorkflow($wfid)
{
    ExecuteQuery("DELETE FROM com_vtiger_workflowtasks WHERE workflow_id = {$wfid}");
    ExecuteQuery("DELETE FROM com_vtiger_workflows WHERE workflow_id = {$wfid}");
}
echo "<table width=80% align=center border=1>";
$force = isset($_REQUEST['force']) ? 1 : 0;
$cver = vtws_getVtigerVersion();
if ($cver == '6.1.0' or $force) {
    putMsg('<h2>** Starting Migration from 6.1 **</h2>');
    include 'build/migrate6/migrate_from_vt61.php';
}
$cver = vtws_getVtigerVersion();
if ($cver == '6.0.0' or $force) {
    putMsg('<h2>** Starting Migration from 6.0 **</h2>');
    include 'build/migrate6/migrate_from_vt60.php';
}
ExecuteQuery("DELETE FROM vtiger_def_org_share WHERE vtiger_def_org_share.tabid not in (select tabid from vtiger_tab)");
ExecuteQuery("update vtiger_users set theme='softed'");
ExecuteQuery("update vtiger_version set old_version='5.4.0', current_version='5.5.0' where id=1");
ExecuteQuery("DELETE FROM vtiger_field WHERE tablename = 'vtiger_inventoryproductrel'");
// Recalculate permissions  RecalculateSharingRules
RecalculateSharingRules();
?>
</table>
<br /><br />
<b style="color:#FF0000">Failed Queries Log</b>
<div id="failedLog" style="border:1px solid #666666;width:90%;position:relative;height:200px;overflow:auto;left:5%;top:10px;">
	<?php 
foreach ($failure_query_array as $failed_query) {
コード例 #3
0
ファイル: migrate_from_vt60.php プロジェクト: kduqi/corebos
$helpDeskWorkflow->test = '[{"fieldname":"from_portal","operation":"is","value":"false:boolean"}]';
$helpDeskWorkflow->description = "Workflow for Ticket Change, not from the Portal";
$helpDeskWorkflow->executionCondition = VTWorkflowManager::$ON_EVERY_SAVE;
$helpDeskWorkflow->defaultworkflow = 1;
$workflowManager->save($helpDeskWorkflow);
$task = $taskManager->createTask('VTEntityMethodTask', $helpDeskWorkflow->id);
$task->active = true;
$task->summary = 'Notify Record Owner on Ticket Change, which is not done from Portal';
$task->methodName = "NotifyOwnerOnTicketChange";
$taskManager->saveTask($task);
$task = $taskManager->createTask('VTEntityMethodTask', $helpDeskWorkflow->id);
$task->active = true;
$task->summary = 'Notify Related Customer on Ticket Change, which is not done from Portal';
$task->methodName = "NotifyParentOnTicketChange";
$taskManager->saveTask($task);
putMsg('Workflow "' . $helpDeskWorkflow->description . '" created!');
$delmods = array('EmailTemplates', 'Google');
foreach ($delmods as $module) {
    $mod = Vtiger_Module::getInstance($module);
    if ($mod) {
        $mod->deleteRelatedLists();
        $mod->deleteLinks();
        $mod->deinitWebservice();
        $mod->delete();
        echo "<b>Module {$module} EXTERMINATED!</b><br>";
    }
}
$delmods = array('ar_ae', 'sv_se', 'tr_tr', 'pl_pl', 'ro_ro', 'ru_ru');
require_once 'vtlib/Vtiger/Language.php';
foreach ($delmods as $prefix) {
    $languagePack = new Vtiger_Language();