当前位置: 首页>>代码示例>>PHP>>正文


PHP G::auditLog方法代码示例

本文整理汇总了PHP中G::auditLog方法的典型用法代码示例。如果您正苦于以下问题:PHP G::auditLog方法的具体用法?PHP G::auditLog怎么用?PHP G::auditLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在G的用法示例。


在下文中一共展示了G::auditLog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveConfigPmGmail

 public function saveConfigPmGmail($httpData)
 {
     G::LoadClass("pmGoogleApi");
     $pmGoogle = new PMGoogleApi();
     $result = new StdClass();
     $result->success = true;
     if (!empty($httpData->status_pmgmail)) {
         $httpData->status_pmgmail = $httpData->status_pmgmail == 1 ? true : false;
         $pmGoogle->setStatusService($httpData->status_pmgmail);
         $message = G::LoadTranslation('ID_ENABLE_PMGMAIL') . ': ' . ($httpData->status_pmgmail ? G::LoadTranslation('ID_ENABLE') : G::LoadTranslation('ID_DISABLE'));
         $pmGoogle->setTypeAuthentication($httpData->typeAuth);
         if (!empty($httpData->email_service_account)) {
             $pmGoogle->setServiceAccountEmail($httpData->email_service_account);
             $message .= ', ' . G::LoadTranslation('ID_PMG_EMAIL') . ': ' . $httpData->email_service_account;
         }
         if (!empty($_FILES)) {
             if (!empty($_FILES['file_p12']) && $_FILES['file_p12']['error'] != 1) {
                 if ($_FILES['file_p12']['tmp_name'] != '') {
                     G::uploadFile($_FILES['file_p12']['tmp_name'], PATH_DATA_SITE, $_FILES['file_p12']['name']);
                     $pmGoogle->setServiceAccountP12($_FILES['file_p12']['name']);
                     $message .= ', ' . G::LoadTranslation('ID_PMG_FILE') . ': ' . $_FILES['file_p12']['name'];
                 }
             } else {
                 if (!empty($_FILES['file_json']) && $_FILES['file_json']['error'] != 1) {
                     if ($_FILES['file_json']['tmp_name'] != '') {
                         G::uploadFile($_FILES['file_json']['tmp_name'], PATH_DATA_SITE, $_FILES['file_json']['name']);
                         $pmGoogle->setAccountJson($_FILES['file_json']['name']);
                         $message .= ', ' . G::LoadTranslation('ID_PMG_FILE') . ': ' . $_FILES['file_json']['name'];
                     }
                 } else {
                     $result->success = false;
                     $result->fileError = true;
                     print G::json_encode($result);
                     die;
                 }
             }
         }
     } else {
         $pmGoogle->setStatusService(false);
         $message = G::LoadTranslation('ID_ENABLE_PMGMAIL') . ': ' . G::LoadTranslation('ID_DISABLE');
     }
     G::auditLog("Update Settings Gmail", $message);
     print G::json_encode($result);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:44,代码来源:pmGmail.php

示例2: create

 public function create($data)
 {
     try {
         parent::create($data);
     } catch (\Exception $e) {
         throw new \RuntimeException(sprintf("Can't create Bpmn Project." . PHP_EOL . $e->getMessage()));
     }
     try {
         $wpData = array();
         $wpData["PRO_UID"] = $this->getUid();
         if (array_key_exists("PRJ_NAME", $data)) {
             $wpData["PRO_TITLE"] = $data["PRJ_NAME"];
         }
         if (array_key_exists("PRJ_DESCRIPTION", $data)) {
             $wpData["PRO_DESCRIPTION"] = $data["PRJ_DESCRIPTION"];
         }
         if (array_key_exists("PRJ_AUTHOR", $data)) {
             $wpData["PRO_CREATE_USER"] = $data["PRJ_AUTHOR"];
         }
         if (array_key_exists("PRJ_TYPE", $data)) {
             $wpData["PRO_TYPE"] = $data["PRJ_TYPE"];
         }
         if (array_key_exists("PRJ_CATEGORY", $data)) {
             $wpData["PRO_CATEGORY"] = $data["PRJ_CATEGORY"];
         }
         $this->wp = new Project\Workflow();
         $this->wp->create($wpData);
         //Add Audit Log
         $ogetProcess = new \Process();
         $getprocess = $ogetProcess->load($this->getUid());
         $nameProcess = $getprocess['PRO_TITLE'];
         \G::auditLog("ImportProcess", 'PMX File Imported ' . $nameProcess . ' (' . $this->getUid() . ')');
     } catch (\Exception $e) {
         $prjUid = $this->getUid();
         //$this->remove();
         $bpmnProject = Project\Bpmn::load($prjUid);
         $bpmnProject->remove();
         throw new \RuntimeException(sprintf("Can't create Bpmn Project with prj_uid: %s, workflow creation fails." . PHP_EOL . $e->getMessage(), $prjUid));
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:40,代码来源:BpmnWorkflow.php

示例3: updateDevice

 /**
  * Update register device with userUid
  *
  * @param array $request_data
  * @param string $dev_uid
  * @param string $use_uid
  * @author Ronald Quenta <ronald.quenta@processmaker.com>
  *
  */
 public function updateDevice($dev_uid, $use_uid, $request_data)
 {
     $arrayData = array();
     $arrayData['USR_UID'] = $use_uid;
     $arrayData['DEV_UID'] = $dev_uid;
     if (isset($request_data['deviceIdToken'])) {
         $arrayData['DEV_REG_ID'] = $request_data['deviceIdToken'];
     }
     if (isset($request_data['sysLanguage'])) {
         $arrayData['SYS_LANG'] = $request_data['sysLanguage'];
     }
     if (isset($request_data['deviceType'])) {
         $arrayData['DEV_TYPE'] = $request_data['deviceType'];
     }
     $oNoti = new \NotificationDevice();
     $response = array();
     if ($oNoti->update($arrayData)) {
         $response["message"] = G::LoadTranslation("ID_RECORD_SAVED_SUCCESFULLY");
         G::auditLog("Update", "Device Save: Device ID (" . $oNoti->getDevUid() . ") ");
     }
     return $response;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:NotificationDevice.php

示例4: create

 public function create($data)
 {
     try {
         parent::create($data);
     } catch (\Exception $e) {
         throw new \RuntimeException(sprintf("Can't create Workflow Project." . PHP_EOL . $e->getMessage()));
     }
     try {
         $bpData = array();
         $bpData["PRJ_UID"] = $this->getUid();
         if (array_key_exists("PRO_TITLE", $data)) {
             $bpData["PRJ_NAME"] = $data["PRO_TITLE"];
         }
         if (array_key_exists("PRO_DESCRIPTION", $data)) {
             $bpData["PRJ_DESCRIPTION"] = $data["PRO_DESCRIPTION"];
         }
         if (array_key_exists("PRO_CREATE_USER", $data)) {
             $bpData["PRJ_AUTHOR"] = $data["PRO_CREATE_USER"];
         } elseif (array_key_exists("USR_UID", $data)) {
             $bpData["PRJ_AUTHOR"] = $data["USR_UID"];
         }
         $this->bp = new Project\Bpmn();
         $this->bp->create($bpData);
         // At this time we will add a default diagram and process
         $this->bp->addDiagram();
         $this->bp->addProcess();
         //Add Audit Log
         $ogetProcess = new \Process();
         $getprocess = $ogetProcess->load($this->getUid());
         $nameProcess = $getprocess['PRO_TITLE'];
         \G::auditLog("ImportProcess", 'BPMN Imported ' . $nameProcess . ' (' . $this->getUid() . ')');
     } catch (\Exception $e) {
         $prjUid = $this->getUid();
         $this->remove();
         throw new \RuntimeException(sprintf("Can't create Project with prj_uid: %s, workflow creation fails." . PHP_EOL . $e->getMessage(), $prjUid));
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:37,代码来源:WorkflowBpmn.php

示例5: switch

}
try {
    global $RBAC;
    switch ($RBAC->userCanAccess('PM_FACTORY')) {
        case -2:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
        case -1:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
    }
    require_once 'classes/model/CaseTrackerObject.php';
    $oCaseTrackerObject = new CaseTrackerObject();
    if (isset($_POST['form'])) {
        $value = $_POST['form'];
    } else {
        $value = $_POST;
    }
    $aFields = $oCaseTrackerObject->load($value['CTO_UID']);
    $aFields['CTO_CONDITION'] = $value['CTO_CONDITION'];
    $oCaseTrackerObject->update($aFields);
    $infoProcess = new Process();
    $resultProcess = $infoProcess->load($value['PRO_UID']);
    G::auditLog('CaseTrackers', 'Save Condition Case Tracker Object (' . $value['CTO_UID'] . ', condition: ' . $value['CTO_CONDITION'] . ') in Process "' . $resultProcess['PRO_TITLE'] . '"');
} catch (Exception $oException) {
    die($oException->getMessage());
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:tracker_ConditionsSave.php

示例6: remove

    public function remove ($SchUid)
    {
        $con = Propel::getConnection( CaseSchedulerPeer::DATABASE_NAME );
        try {
            $oCaseScheduler = CaseSchedulerPeer::retrieveByPK( $SchUid );
            if (! is_null( $oCaseScheduler )) {
                $fields = $this->Load( $SchUid );
                $iResult = $oCaseScheduler->delete();
                $con->commit();
                //Add Audit Log
                G::auditLog("DeleteCaseScheduler", "Scheduler Name: ".$fields['SCH_NAME'].", Task: ".$fields['TAS_UID']);

                return $iResult;
            } else {
                throw (new Exception( 'This row doesn\'t exist!' ));
            }
        } catch (Exception $e) {
            $con->rollback();
            throw ($e);
        }
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:21,代码来源:CaseScheduler.php

示例7: Step

        require_once 'classes/model/Step.php';
        $oStep = new Step();
        $sUidGrids = $oStep->lookingforUidGrids($sPRO_UID, $sDYNAFORM);
        $template->assign("URL_MABORAK_JS", G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
        $template->assign("URL_TRANSLATION_ENV_JS", G::browserCacheFilesUrl("/jscore/labels/" . SYS_LANG . ".js"));
        $template->assign("siteUrl", $http . $_SERVER["HTTP_HOST"]);
        $template->assign("sysSys", SYS_SYS);
        $template->assign("sysLang", SYS_LANG);
        $template->assign("sysSkin", SYS_SKIN);
        $template->assign("processUid", $sPRO_UID);
        $template->assign("dynaformUid", $sDYNAFORM);
        $template->assign("taskUid", $sTASKS);
        $template->assign("dynFileName", $sPRO_UID . "/" . $sDYNAFORM);
        $template->assign("formId", $G_FORM->id);
        $template->assign("scriptCode", $scriptCode);
        if (sizeof($sUidGrids) > 0) {
            foreach ($sUidGrids as $k => $v) {
                $template->newBlock('grid_uids');
                $template->assign('siteUrl', $http . $_SERVER['HTTP_HOST']);
                $template->assign('gridFileName', $sPRO_UID . '/' . $v);
            }
        }
        print_r('<textarea cols="77" rows="26" style="width:100%; height:99%">' . htmlentities(str_replace('</body>', '</form></body>', str_replace('</form>', '', $template->getOutputContent()))) . '</textarea>');
        G::auditLog('WebEntry', 'Generate web entry with single HTML (dynaform uid: ' . $sDYNAFORM . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
    }
} catch (Exception $e) {
    $G_PUBLISH = new Publisher();
    $aMessage['MESSAGE'] = $e->getMessage();
    $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
    G::RenderPage('publish', 'raw');
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processes_webEntryGenerate.php

示例8: switch

                    die;
                }

                $sDir = "";
                if (isset($_REQUEST['MAIN_DIRECTORY'])) {
                    $_REQUEST['MAIN_DIRECTORY'] = $filter->xssFilterHard($_REQUEST['MAIN_DIRECTORY']);
                    $sDir = $_REQUEST['MAIN_DIRECTORY'];
                }
                switch ($sDir) {
                    case 'mailTemplates':
                        $sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
                        G::auditLog('ProcessFileManager','Save template ('.$_REQUEST['filename'].') in process "'.$resultProcess['PRO_TITLE'].'"');
                        break;
                    case 'public':
                        $sDirectory = PATH_DATA_PUBLIC . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
                        G::auditLog('ProcessFileManager','Save public template ('.$_REQUEST['filename'].') in process "'.$resultProcess['PRO_TITLE'].'"');
                        break;
                    default:
                        $sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
                        break;
                }
                $fp = fopen($sDirectory, 'w');
                $content = stripslashes($_REQUEST['fcontent']);
                $content = str_replace("@amp@", "&", $content);
                $content = base64_decode($content);
                fwrite($fp, $content);
                fclose($fp);
                $sDirectory = $filter->xssFilterHard($sDirectory);
                echo 'saved: ' . $sDirectory;
            }
            break;
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:processes_Ajax.php

示例9: remove

 /**
  * Remove the application document registry
  *
  * @param string $sGrpUid
  * @param string $sUserUid
  * @return string
  */
 public function remove($sGrpUid, $sUserUid)
 {
     $oConnection = Propel::getConnection(GroupUserPeer::DATABASE_NAME);
     try {
         $oGroupUser = GroupUserPeer::retrieveByPK($sGrpUid, $sUserUid);
         if (!is_null($oGroupUser)) {
             $oConnection->begin();
             $iResult = $oGroupUser->delete();
             $oConnection->commit();
             $oGrpwf = new Groupwf();
             $grpName = $oGrpwf->loadByGroupUid($sGrpUid);
             $oUsr = new Users();
             $usrName = $oUsr->load($sUserUid);
             G::auditLog("AssignUserToGroup", "Remove user: " . $usrName['USR_USERNAME'] . " (" . $sUserUid . ") from group " . $grpName['CON_VALUE'] . " (" . $sGrpUid . ") ");
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:30,代码来源:GroupUser.php

示例10: export

    /**
     * Export PM tables
     *
     * @author : Erik Amaru Ortiz <aortiz.erik@gmail.com>
     */
    public function export ($httpData)
    {
        require_once 'classes/model/AdditionalTables.php';
        $at = new AdditionalTables();
        $tablesToExport = G::json_decode( stripslashes( $httpData->rows ) );

        try {
            $result = new stdClass();
            G::LoadCLass( 'net' );
            $net = new NET( G::getIpAddress() );

            G::LoadClass( "system" );

            $META = " \n-----== ProcessMaker Open Source Private Tables ==-----\n" . " @Ver: 1.0 Oct-2009\n" . " @Processmaker version: " . System::getVersion() . "\n" . " -------------------------------------------------------\n" . " @Export Date: " . date( "l jS \of F Y h:i:s A" ) . "\n" . " @Server address: " . getenv( 'SERVER_NAME' ) . " (" . getenv( 'SERVER_ADDR' ) . ")\n" . " @Client address: " . $net->hostname . "\n" . " @Workspace: " . SYS_SYS . "\n" . " @Export trace back:\n\n";

            $EXPORT_TRACEBACK = Array ();
            $c = 0;
            foreach ($tablesToExport as $table) {
                $tableRecord = $at->load( $table->ADD_TAB_UID );
                $tableData = $at->getAllData( $table->ADD_TAB_UID, null, null, false );
                $table->ADD_TAB_NAME = $tableRecord['ADD_TAB_NAME'];
                $rows = $tableData['rows'];
                $count = $tableData['count'];

                array_push( $EXPORT_TRACEBACK, Array ('uid' => $table->ADD_TAB_UID,'name' => $table->ADD_TAB_NAME,'num_regs' => $tableData['count'],'schema' => $table->_SCHEMA ? 'yes' : 'no','data' => $table->_DATA ? 'yes' : 'no'
                ) );
            }

            $sTrace = "TABLE UID                        TABLE NAME\tREGS\tSCHEMA\tDATA\n";

            foreach ($EXPORT_TRACEBACK as $row) {
                $sTrace .= "{$row['uid']}\t{$row['name']}\t\t{$row['num_regs']}\t{$row['schema']}\t{$row['data']}\n";
            }

            $META .= $sTrace;

            ///////////////EXPORT PROCESS
            $PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP;

            $filenameOnly = strtolower( 'SYS-' . SYS_SYS . "_" . date( "Y-m-d" ) . '_' . date( "Hi" ) . ".pmt" );

            $filename = $PUBLIC_ROOT_PATH . $filenameOnly;
            $fp = fopen( $filename, "wb" );

            $bytesSaved = 0;
            $bufferType = '@META';
            $fsData = sprintf( "%09d", strlen( $META ) );
            $fsbufferType = sprintf( "%09d", strlen( $bufferType ) );
            $bytesSaved += fwrite( $fp, $fsbufferType ); //writing the size of $oData
            $bytesSaved += fwrite( $fp, $bufferType ); //writing the $oData
            $bytesSaved += fwrite( $fp, $fsData ); //writing the size of $oData
            $bytesSaved += fwrite( $fp, $META ); //writing the $oData


            foreach ($tablesToExport as $table) {

                if ($table->_SCHEMA) {
                    $oAdditionalTables = new AdditionalTables();
                    $aData = $oAdditionalTables->load( $table->ADD_TAB_UID, true );

                    $bufferType = '@SCHEMA';
                    $SDATA = serialize( $aData );
                    $fsUid = sprintf( "%09d", strlen( $table->ADD_TAB_UID ) );
                    $fsData = sprintf( "%09d", strlen( $SDATA ) );
                    $fsbufferType = sprintf( "%09d", strlen( $bufferType ) );

                    $bytesSaved += fwrite( $fp, $fsbufferType ); //writing the size of $oData
                    $bytesSaved += fwrite( $fp, $bufferType ); //writing the $oData
                    $bytesSaved += fwrite( $fp, $fsUid ); //writing the size of xml file
                    $bytesSaved += fwrite( $fp, $table->ADD_TAB_UID ); //writing the xmlfile
                    $bytesSaved += fwrite( $fp, $fsData ); //writing the size of xml file
                    $bytesSaved += fwrite( $fp, $SDATA ); //writing the xmlfile
                }

                if ($table->_DATA) {
                    //export data
                    $oAdditionalTables = new additionalTables();
                    $tableData = $oAdditionalTables->getAllData( $table->ADD_TAB_UID, null, null, false );

                    $SDATA = serialize( $tableData['rows'] );
                    $bufferType = '@DATA';

                    $fsbufferType = sprintf( "%09d", strlen( $bufferType ) );
                    $fsTableName = sprintf( "%09d", strlen( $table->ADD_TAB_NAME ) );
                    $fsData = sprintf( "%09d", strlen( $SDATA ) );

                    $bytesSaved += fwrite( $fp, $fsbufferType ); //writing type size
                    $bytesSaved += fwrite( $fp, $bufferType ); //writing type
                    $bytesSaved += fwrite( $fp, $fsTableName ); //writing the size of xml file
                    $bytesSaved += fwrite( $fp, $table->ADD_TAB_NAME ); //writing the xmlfile
                    $bytesSaved += fwrite( $fp, $fsData ); //writing the size of xml file
                    $bytesSaved += fwrite( $fp, $SDATA ); //writing the xmlfile
                }
                G::auditLog("ExportTable", $table->ADD_TAB_NAME." (".$table->ADD_TAB_UID.") ");
            }
//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:pmTablesProxy.php

示例11: array

         //SUB_APPLICATION INSERT
         $res = $appCache->triggerSubApplicationInsert($lang, false);
         //CONTENT UPDATE
         $res = $appCache->triggerContentUpdate($lang, true);
         //$result->info[] = array("name" => "Trigger CONTENT UPDATE", "value" => $res);
         //build using the method in AppCacheView Class
         $res = $appCache->fillAppCacheView($lang);
         //$result->info[] = array ('name' => 'build APP_CACHE_VIEW',              'value'=> $res);
         //set status in config table
         $confParams = array('LANG' => $lang, 'STATUS' => 'active');
         $conf->aConfig = $confParams;
         $conf->saveConfig('APP_CACHE_VIEW_ENGINE', '', '', '');
         $result = new StdClass();
         $result->success = true;
         $result->msg = G::LoadTranslation('ID_TITLE_COMPLETED');
         G::auditLog("BuildCache");
         echo G::json_encode($result);
     } catch (Exception $e) {
         $confParams = array('lang' => $lang, 'status' => 'failed');
         $appCacheViewEngine = $oServerConf->setProperty('APP_CACHE_VIEW_ENGINE', $confParams);
         echo '{success: false, msg:"' . $e->getMessage() . '"}';
     }
     break;
 case 'recreate-root':
     $user = $_POST['user'];
     $passwd = $_POST['password'];
     $server = $_POST['host'];
     $aServer = split(":", $server);
     $serverName = $aServer[0];
     $port = count($aServer) > 1 ? $aServer[1] : "none";
     list($sucess, $msgErr) = testConnection(DB_ADAPTER, $serverName, $user, $passwd, $port);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:appCacheViewAjax.php

示例12: unset

<?php

if (isset($_POST['form'])) {
    $sValue = $_POST['form'];
} else {
    $sValue = $_POST;
}
unset($sValue['SAVE']);
if (!isset($sValue['CT_DERIVATION_HISTORY'])) {
    $sValue['CT_DERIVATION_HISTORY'] = 0;
}
if (!isset($sValue['CT_MESSAGE_HISTORY'])) {
    $sValue['CT_MESSAGE_HISTORY'] = 0;
}
require_once 'classes/model/CaseTracker.php';
$oCaseTracker = new CaseTracker();
$oCaseTracker->update($sValue);
$infoProcess = new Process();
$resultProcess = $infoProcess->load($sValue['PRO_UID']);
if ($sValue['CT_DERIVATION_HISTORY'] == 1) {
    $type[] = "Routing History";
}
if ($sValue['CT_MESSAGE_HISTORY'] == 1) {
    $type[] = "Messages History";
}
G::auditLog('CaseTrackers', 'Save Case Tracker Properties (' . $sValue['CT_MAP_TYPE'] . ' - ' . implode(', ', $type) . ') in Process "' . $resultProcess['PRO_TITLE'] . '"');
开发者ID:emildev35,项目名称:processmaker,代码行数:26,代码来源:tracker_Save.php

示例13: unset

        unset($oClass);
        if ($fVersionOld > $fVersionNew) {
            throw new Exception(G::loadTranslation('ID_RECENT_VERSION_PLUGIN'));
        }
        $res = $tar->extract(PATH_PLUGINS);
    } else {
        throw new Exception(G::loadTranslation('ID_FILE_CONTAIN_CLASS_PLUGIN', SYS_LANG, array("filename" => $filename, "className" => $sClassName)));
    }
    if (!file_exists(PATH_PLUGINS . $sClassName . '.php')) {
        throw new Exception(G::loadTranslation('ID_FILE_PLUGIN_NOT_EXISTS', SYS_LANG, array("pluginFile" => $pluginFile)));
    }
    require_once PATH_PLUGINS . $pluginFile;
    $oPluginRegistry->registerPlugin($sClassName, PATH_PLUGINS . $sClassName . ".php");
    $size = file_put_contents(PATH_DATA_SITE . "plugin.singleton", $oPluginRegistry->serializeInstance());
    $details = $oPluginRegistry->getPluginDetails($pluginFile);
    $oPluginRegistry->installPlugin($details->sNamespace);
    $oPluginRegistry->setupPlugins();
    //get and setup enabled plugins
    $size = file_put_contents(PATH_DATA_SITE . "plugin.singleton", $oPluginRegistry->serializeInstance());
    $response = $oPluginRegistry->verifyTranslation($details->sNamespace);
    G::auditLog("InstallPlugin", "Plugin Name: " . $details->sNamespace);
    //if ($response->recordsCountSuccess <= 0) {
    //throw (new Exception( 'The plugin ' . $details->sNamespace . ' couldn\'t verify any translation item. Verified Records:' . $response->recordsCountSuccess));
    //}
    G::header("Location: pluginsMain");
    die;
} catch (Exception $e) {
    $_SESSION['__PLUGIN_ERROR__'] = $e->getMessage();
    G::header('Location: pluginsMain');
    die;
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:pluginsImportFile.php

示例14: ProcessMap

            G::LoadClass('processMap');
            $oProcessMap = new ProcessMap();
            $oProcessMap->upCaseTrackerObject($_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION']);
            $oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
            $infoProcess = new Process();
            $resultProcess = $infoProcess->load($_POST['PRO_UID']);
            G::auditLog('CaseTrackers', 'Move Up Case Tracker Object (' . $_POST['CTO_UID'] . ') in Process "' . $resultProcess['PRO_TITLE'] . '"');
            break;
        case 'downCaseTrackerObject':
            G::LoadClass('processMap');
            $oProcessMap = new ProcessMap();
            $oProcessMap->downCaseTrackerObject($_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION']);
            $oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
            $infoProcess = new Process();
            $resultProcess = $infoProcess->load($_POST['PRO_UID']);
            G::auditLog('CaseTrackers', 'Move Down Case Tracker Object (' . $_POST['CTO_UID'] . ') in Process "' . $resultProcess['PRO_TITLE'] . '"');
            break;
        case 'editStagesMap':
            $oTemplatePower = new TemplatePower(PATH_TPL . 'tracker/stages_Map.html');
            $oTemplatePower->prepare();
            $G_PUBLISH = new Publisher();
            $G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
            $oHeadPublisher =& headPublisher::getSingleton();
            $oHeadPublisher->addScriptCode('
			  var pb=leimnud.dom.capture("tag.body 0");
			  Sm=new stagesmap();
			  Sm.options = {
			  	target    : "sm_target",
			  	dataServer: "../tracker/tracker_Ajax",
			  	uid       : "' . $_POST['PRO_UID'] . '",
			  	lang      : "' . SYS_LANG . '",
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:tracker_Ajax.php

示例15: removeTranslationEnvironment

    public function removeTranslationEnvironment ($locale)
    {
        $filePath = $this->envFilePath;
        if (strpos( $locale, self::$localeSeparator ) !== false) {
            list ($LAN_ID, $IC_UID) = explode( '-', strtoupper( $locale ) );
        } else {
            $LAN_ID = $locale;
            $IC_UID = '__INTERNATIONAL__';
        }

        if (file_exists( $filePath )) {
            $environments = unserialize( file_get_contents( $filePath ) );
            if (! isset( $environments[$LAN_ID][$IC_UID] )) {
                return null;
            }

            unset( $environments[$LAN_ID][$IC_UID] );
            file_put_contents( $filePath, serialize( $environments ) );

            if (file_exists( PATH_CORE . "META-INF" . PATH_SEP . "translation." . $locale )) {
                G::rm_dir( PATH_DATA . "META-INF" . PATH_SEP . "translation." . $locale );
            }
            if (file_exists( PATH_CORE . PATH_SEP . 'content' . PATH_SEP . 'translations' . PATH_SEP . 'processmaker' . $locale . '.po' )) {
                G::rm_dir( PATH_CORE . PATH_SEP . 'content' . PATH_SEP . 'translations' . PATH_SEP . 'processmaker' . $locale . '.po' );
            }
            G::auditLog("DeleteLanguage", "Language: ".$locale);
        }
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:28,代码来源:Translation.php


注:本文中的G::auditLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。