Exemplo n.º 1
0
 /**
  * Remove the row
  *
  * @param array $aData or string $ProUid
  * @return string
  *
  */
 public function remove($ProUid)
 {
     if (is_array($ProUid)) {
         $ProUid = isset($ProUid['DEP_UID']) ? $ProUid['DEP_UID'] : '';
     }
     try {
         $oCriteria = new Criteria('workflow');
         $oCriteria->addSelectColumn(UsersPeer::USR_UID);
         $oCriteria->add(UsersPeer::DEP_UID, $ProUid, Criteria::EQUAL);
         $oDataset = UsersPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         $aFields = array();
         while ($aRow = $oDataset->getRow()) {
             $aFields['USR_UID'] = $aRow['USR_UID'];
             $aFields['DEP_UID'] = '';
             $oDepto = UsersPeer::retrieveByPk($aFields['USR_UID']);
             if (is_object($oDepto) && get_class($oDepto) == 'UsersPeer') {
                 return true;
             } else {
                 $oDepto = new Users();
                 $oDepto->update($aFields);
             }
             $oDataset->next();
         }
         $oPro = DepartmentPeer::retrieveByPK($ProUid);
         if (!is_null($oPro)) {
             $dptoTitle = $this->Load($oPro->getDepUid());
             Content::removeContent('DEPO_TITLE', '', $oPro->getDepUid());
             Content::removeContent('DEPO_DESCRIPTION', '', $oPro->getDepUid());
             G::auditLog("DeleteDepartament", "Departament Name: " . $dptoTitle['DEPO_TITLE'] . " Departament ID: (" . $oPro->getDepUid() . ") ");
             return $oPro->delete();
         } else {
             throw new Exception("The row '{$ProUid}' in table Group doesn't exist!");
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
Exemplo n.º 2
0
 function removeRole($ROL_UID)
 {
     $con = Propel::getConnection(RolesPeer::DATABASE_NAME);
     try {
         $con->begin();
         $this->setRolUid($ROL_UID);
         $rol_name = $this->load($ROL_UID);
         Content::removeContent('ROL_NAME', '', $this->getRolUid());
         $result = $this->delete();
         $con->commit();
         G::auditLog("DeleteRole", "Role Name: " . $rol_name['ROL_NAME'] . " Role UID: (" . $ROL_UID . ") ");
         return $result;
     } catch (exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemplo n.º 3
0
 public function remove($TriUid)
 {
     $con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
     try {
         $result = false;
         $con->begin();
         $oTri = TriggersPeer::retrieveByPK($TriUid);
         if (!is_null($oTri)) {
             Content::removeContent("TRI_TITLE", "", $TriUid);
             Content::removeContent("TRI_DESCRIPTION", "", $TriUid);
             $result = $oTri->delete();
             $con->commit();
             //Add Audit Log
             G::auditLog("DeleteTrigger", "Trigger Name: " . $oTri->getTriTitle() . ", Trigger Uid: " . $TriUid . ", Description: " . $oTri->getTriDescription());
         }
         return $result;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemplo n.º 4
0
 /**
  * Delete DataBaseConnection
  * @var string $pro_uid. Uid for Process
  * @var string $dbs_uid. Uid for DataBase Connection
  *
  * @author Brayan Pereyra (Cochalo) <*****@*****.**>
  * @copyright Colosa - Bolivia
  *
  * @return void
  */
 public function deleteDataBaseConnection($pro_uid, $dbs_uid)
 {
     $pro_uid = $this->validateProUid($pro_uid);
     $dbs_uid = $this->validateDbsUid($dbs_uid, $pro_uid);
     $oDBSource = new DbSource();
     $oContent = new \Content();
     $oDBSource->remove($dbs_uid, $pro_uid);
     $oContent->removeContent('DBS_DESCRIPTION', "", $dbs_uid);
 }
Exemplo n.º 5
0
     if (strpos($_POST['server'], "\\")) {
         $_POST['port'] = 'none';
     }
     $aData = array('PRO_UID' => $_SESSION['PROCESS'], 'DBS_TYPE' => $_POST['type'], 'DBS_SERVER' => $_POST['server'], 'DBS_DATABASE_NAME' => $_POST['db_name'], 'DBS_USERNAME' => $_POST['user'], 'DBS_PASSWORD' => ($_POST['passwd'] == 'none' ? "" : G::encrypt($_POST['passwd'], $_POST['db_name'])) . "_2NnV3ujj3w", 'DBS_PORT' => $_POST['port'] == 'none' ? "" : $_POST['port'], 'DBS_ENCODE' => $_POST['enc']);
     $newid = $oDBSource->create($aData);
     $sDelimiter = DBAdapter::getStringDelimiter();
     $oContent->addContent('DBS_DESCRIPTION', '', $newid, SYS_LANG, $_POST['desc']);
     break;
 case 'deleteDbConnection':
     try {
         $oDBSource = new DbSource();
         $oContent = new Content();
         $DBS_UID = $_POST['dbs_uid'];
         $PRO_UID = $_SESSION['PROCESS'];
         $oDBSource->remove($DBS_UID, $PRO_UID);
         $oContent->removeContent('DBS_DESCRIPTION', "", $DBS_UID);
         $result->success = true;
         $result->msg = G::LoadTranslation('ID_DBCONNECTION_REMOVED');
     } catch (Exception $e) {
         $result->success = false;
         $result->msg = $e->getMessage();
     }
     print G::json_encode($result);
     break;
 case 'showTestConnection':
     $G_PUBLISH = new Publisher();
     $G_PUBLISH->AddContent('view', 'dbConnections/dbConnections');
     G::RenderPage('publish', 'raw');
     break;
 case 'testConnection':
     sleep(0);
Exemplo n.º 6
0
 public function remove($StgUid)
 {
     $con = Propel::getConnection(StagePeer::DATABASE_NAME);
     try {
         $con->begin();
         $oStage = StagePeer::retrieveByPK($StgUid);
         if (!is_null($oStage)) {
             Content::removeContent('STG_TITLE', '', $this->getStgUid());
             $result = $oStage->delete();
             $con->commit();
         }
         return $result;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemplo n.º 7
0
$t = new lime_test(12, new lime_output_color());
$t->diag('class Content');
$t->isa_ok($obj, 'Content', 'class Content created');
$t->todo('review all combinations of is_utf8 ');
$t->todo('review is_utf8 should be in another class');
//Initialize the global domain (It is optional)
$testDomain = new ymlDomain();
$test = new ContentTest('content.yml', $t, $testDomain);
//check if an row exists,
$test->load('loadContent');
$test->runSingle();
//check if an row exists,
$test->load('deleteContent');
$test->runAll();
$test->load('addContentAcentos');
$test->runSingle();
//add the same row twice, the first time goes good, but the second the class throw an error
$test->load('addContent1');
$test->runSingle();
$test->load('addContentTwice');
$test->runSingle();
$test->load('loadContent');
$test->runSingle();
$obj = new Content();
$res = $obj->addContent('1', '2', '3', 'en', 'language1');
$res = $obj->addContent('1', '2', '3', 'es', 'language2');
$res = $obj->addContent('1', '2', '3', 'pt', 'language3');
$res = $obj->addContent('1', '2', '3', 'fr', 'language4');
$res = $obj->addContent('1', '2', '3', 'it', 'language5');
$res = $obj->removeContent('1', '2', '3');
//$t->can_ok( $res,      'getAppTitle',   'removeContent.' );
Exemplo n.º 8
0
    /**

     * Create DB Connections rows from an array of data

     *

     * @param array $aConnections

     * @return void

     */

    public function createDBConnectionsRows ($aConnections)

    {

        foreach ($aConnections as $sKey => $aRow) {

            $oConnection = new DbSource();

            if ($oConnection->Exists( $aRow['DBS_UID'], $aRow['PRO_UID'] )) {

                $oConnection->remove( $aRow['DBS_UID'], $aRow['PRO_UID'] );

            }

            $oConnection->create( $aRow );



            // Update information in the table of contents

            $oContent = new Content();

            $ConCategory = 'DBS_DESCRIPTION';

            $ConParent = '';

            $ConId = $aRow['DBS_UID'];

            $ConLang = SYS_LANG;

            if ($oContent->Exists( $ConCategory, $ConParent, $ConId, $ConLang )) {

                $oContent->removeContent( $ConCategory, $ConParent, $ConId );

            }

            $oContent->addContent( $ConCategory, $ConParent, $ConId, $ConLang, $aRow['DBS_DESCRIPTION'] );

        }

    } #@!neyek
Exemplo n.º 9
0
 /**
  * Remove the application document registry
  *
  * @param array $aData
  * @return string
  *
  */
 public function remove($sInpDocUid)
 {
     $oConnection = Propel::getConnection(InputDocumentPeer::DATABASE_NAME);
     try {
         $oInputDocument = InputDocumentPeer::retrieveByPK($sInpDocUid);
         if (!is_null($oInputDocument)) {
             $nameInput = $this->getInpDocTitle();
             $descInput = $this->getInpDocDescription();
             $oConnection->begin();
             Content::removeContent('INP_DOC_TITLE', '', $oInputDocument->getInpDocUid());
             Content::removeContent('INP_DOC_DESCRIPTION', '', $oInputDocument->getInpDocUid());
             $iResult = $oInputDocument->delete();
             $oConnection->commit();
             //Add Audit Log
             $nameInput = $this->getInpDocTitle();
             $descInput = $this->getInpDocDescription();
             G::auditLog("DeleteInputDocument", "Input Document Name: " . $nameInput . ", Input Document Uid: " . $sInpDocUid . ", Description: " . $descInput);
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
Exemplo n.º 10
0
    /**
     * Remove the Prolication document registry
     *
     * @param array $aData or string $ProUid
     * @return string
     *
     */
    public function remove ($ProUid)
    {
        if (is_array( $ProUid )) {
            $ProUid = (isset( $ProUid['DYN_UID'] ) ? $ProUid['DYN_UID'] : '');
        }
        try {
            $oPro = DynaformPeer::retrieveByPK( $ProUid );
            if (! is_null( $oPro )) {
                $title = $oPro->getDynTitle();
                $type  = $oPro->getDynType(); 
                $description = $oPro->getDynDescription();

                Content::removeContent( 'DYN_TITLE', '', $oPro->getDynUid() );
                Content::removeContent( 'DYN_DESCRIPTION', '', $oPro->getDynUid() );
                $iResult = $oPro->delete();
                
                //Add Audit Log
                G::auditLog("DeleteDynaform", "Dynaform Title: ".$title.", Type: ".$type.", Description: ".$description);

                if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml' )) {
                    unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml' );
                }
                if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.xml' )) {
                    unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.xml' );
                }
                if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.html' )) {
                    unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.html' );
                }
                if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.html' )) {
                    unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.html' );
                }
                return $iResult;
            } else {
                throw (new Exception( "The row '$ProUid' in table Dynaform doesn't exist!" ));
            }
        } catch (Exception $oError) {
            throw ($oError);
        }
    }
Exemplo n.º 11
0
 /**
  * Remove the Prolication document registry
  *
  * @param array $aData or string $ProUid
  * @return string
  *
  */
 public function remove($ProUid)
 {
     if (is_array($ProUid)) {
         $ProUid = isset($ProUid['GRP_UID']) ? $ProUid['GRP_UID'] : '';
     }
     try {
         $oPro = GroupwfPeer::retrieveByPK($ProUid);
         if (!is_null($oPro)) {
             Content::removeContent('GRP_TITLE', '', $oPro->getGrpUid());
             Content::removeContent('GRP_DESCRIPTION', '', $oPro->getGrpUid());
             return $oPro->delete();
         } else {
             throw new Exception("The row '{$ProUid}' in table Group doesn't exist!");
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
Exemplo n.º 12
0
 public function remove($TasUid)
 {
     $oConnection = Propel::getConnection(TaskPeer::DATABASE_NAME);
     try {
         $oTask = TaskPeer::retrieveByPK($TasUid);
         if (!is_null($oTask)) {
             $oConnection->begin();
             Content::removeContent('TAS_TITLE', '', $oTask->getTasUid());
             Content::removeContent('TAS_DESCRIPTION', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_TITLE', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_DESCRIPTION', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_PROC_CODE', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_MESSAGE', '', $oTask->getTasUid());
             Content::removeContent('TAS_DEF_SUBJECT_MESSAGE', '', $oTask->getTasUid());
             $iResult = $oTask->delete();
             $oConnection->commit();
             return $iResult;
         } else {
             throw new Exception("The row '" . $TasUid . "' in table TASK doesn't exist!");
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
Exemplo n.º 13
0
    /**
     * Remove the application document registry
     * @param array $aData
     * @return string
     * */
    public function remove($sOutDocUid)
    {
        $oConnection = Propel::getConnection(OutputDocumentPeer::DATABASE_NAME);

        try {
            $oOutputDocument = OutputDocumentPeer::retrieveByPK($sOutDocUid);

            if (!is_null($oOutputDocument)) {
                $oConnection->begin();
                Content::removeContent('OUT_DOC_TITLE', '', $oOutputDocument->getOutDocUid());
                Content::removeContent('OUT_DOC_DESCRIPTION', '', $oOutputDocument->getOutDocUid());
                Content::removeContent('OUT_DOC_FILENAME', '', $oOutputDocument->getOutDocUid());
                Content::removeContent('OUT_DOC_TEMPLATE', '', $oOutputDocument->getOutDocUid());
                $iResult = $oOutputDocument->delete();
                $oConnection->commit();

                //Add Audit Log
                G::auditLog("DeleteOutputDocument", "Output Document Name: " . $oOutputDocument->getOutDocTitle() . ", Output Document Uid: " . $sOutDocUid . ", Description: " . $oOutputDocument->getOutDocDescription() . ", Filename generated: " . $oOutputDocument->getOutDocFilename());

                //Return
                return $iResult;
            } else {
                throw (new Exception('This row doesn\'t exist!'));
            }
        } catch (Exception $oError) {
            $oConnection->rollback();

            throw ($oError);
        }
    }
Exemplo n.º 14
0
 function remove($sUID)
 {
     $oConnection = Propel::getConnection(EventPeer::DATABASE_NAME);
     try {
         $oEvent = EventPeer::retrieveByPK($sUID);
         if (!is_null($oEvent)) {
             /* with the new feature for events, a event can to relate a existing trigger
                      or more of one events can be reusing the same trigger
                      so, in this point we should't to delete the trigger
             
                     $oConnection->begin();
                     $oTrigger = new Triggers();
                     $oAppEvent = new AppEvent();
             
                     $oCriteria = new Criteria('workflow');
                     $oCriteria->clearSelectColumns();
                     $oCriteria->addSelectColumn( AppEventPeer::EVN_UID );
                     $oCriteria->addSelectColumn( EventPeer::TRI_UID );
                     $oCriteria->addSelectColumn( AppEventPeer::APP_UID );
                     $oCriteria->addSelectColumn( AppEventPeer::DEL_INDEX );
                     $oCriteria->add(AppEventPeer::EVN_UID, $sUID );
                     $oCriteria->addJoin(EventPeer::EVN_UID, AppEventPeer::EVN_UID, Criteria::JOIN);
                     $oDataset = AppEventPeer::doSelectRs($oCriteria);
                     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
                     $oDataset->next();
             
                     while ($row = $oDataset->getRow()) {
                       $oTrigger->remove($row['TRI_UID']);
                       $oAppEvent->remove( $row['APP_UID'], $row['DEL_INDEX'], $sUID );
                       $oDataset->next();
                     }*/
             Content::removeContent('EVN_DESCRIPTION', '', $oEvent->getEvnUid());
             $iResult = $oEvent->delete();
             $oConnection->commit();
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
Exemplo n.º 15
0
 /**
  * Delete Web Entry
  *
  * @param string $webEntryUid Unique id of Web Entry
  *
  * return void
  */
 public function delete($webEntryUid)
 {
     try {
         //Verify data
         $this->throwExceptionIfNotExistsWebEntry($webEntryUid, $this->arrayFieldNameForException["webEntryUid"]);
         //Set variables
         $arrayWebEntryData = $this->getWebEntry($webEntryUid, true);
         //Delete content
         \Content::removeContent("WE_TITLE", "", $webEntryUid);
         \Content::removeContent("WE_DESCRIPTION", "", $webEntryUid);
         //Delete web entry
         $criteria = new \Criteria("workflow");
         $criteria->add(\WebEntryPeer::WE_UID, $webEntryUid);
         $result = \WebEntryPeer::doDelete($criteria);
         //Delete files
         if ($arrayWebEntryData["WE_METHOD"] == "WS") {
             $pathDataPublicProcess = PATH_DATA_PUBLIC . $arrayWebEntryData["PRO_UID"];
             $fileName = str_replace(".php", "", trim($arrayWebEntryData["WE_DATA"]));
             $file = $pathDataPublicProcess . PATH_SEP . $fileName . ".php";
             if (is_file($file) && file_exists($file)) {
                 unlink($file);
                 unlink($pathDataPublicProcess . PATH_SEP . $fileName . "Post.php");
             }
         }
     } catch (\Exception $e) {
         throw $e;
     }
 }
Exemplo n.º 16
0
 public function remove($RepTabUid)
 {
     $con = Propel::getConnection(ReportTablePeer::DATABASE_NAME);
     try {
         $con->begin();
         $oRepTab = ReportTablePeer::retrieveByPK($RepTabUid);
         if (!is_null($oRepTab)) {
             Content::removeContent('REP_TAB_TITLE', '', $this->getRepTabUid());
             $result = $oRepTab->delete();
             $con->commit();
         }
         return $result;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemplo n.º 17
0
 function removeRole($ROL_UID)
 {
     $con = Propel::getConnection(RolesPeer::DATABASE_NAME);
     try {
         $con->begin();
         $this->setRolUid($ROL_UID);
         Content::removeContent('ROL_NAME', '', $this->getRolUid());
         $result = $this->delete();
         $con->commit();
         return $result;
     } catch (exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemplo n.º 18
0
 /**
  * Remove the Prolication document registry
  *
  * @param array $aData or string $ProUid
  * @return string
  *
  */
 public function remove($ProUid)
 {
     if (is_array($ProUid)) {
         $ProUid = isset($ProUid['PRO_UID']) ? $ProUid['PRO_UID'] : '';
     }
     try {
         $oPro = ProcessPeer::retrieveByPK($ProUid);
         if (!is_null($oPro)) {
             Content::removeContent('PRO_TITLE', '', $oPro->getProUid());
             Content::removeContent('PRO_DESCRIPTION', '', $oPro->getProUid());
             $this->memcachedDelete();
             return $oPro->delete();
         } else {
             throw new Exception("The row '{$ProUid}' in table Process doesn't exist!");
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
Exemplo n.º 19
0
 /**
  * Remove the application document registry
  * @param     array $aData or string $appUid
  * @return    string
  **/
 public function remove($appUid)
 {
     if (is_array($appUid)) {
         $appUid = isset($appUid['APP_UID']) ? $appUid['APP_UID'] : '';
     }
     try {
         $oApp = ApplicationPeer::retrieveByPK($appUid);
         if (!is_null($oApp)) {
             Content::removeContent('APP_TITLE', '', $oApp->getAppUid());
             Content::removeContent('APP_DESCRIPTION', '', $oApp->getAppUid());
             //Content::removeContent('APP_PROC_CODE', '', $oApp->getAppUid());
             return $oApp->delete();
         } else {
             throw new Exception("The row '{$appUid}' in table Application doesn't exist!");
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
Exemplo n.º 20
0
 /**
  * Remove the application document registry
  * @param array $aData
  * @return string
  * */
 public function remove($sOutDocUid)
 {
     $oConnection = Propel::getConnection(OutputDocumentPeer::DATABASE_NAME);
     try {
         $oOutputDocument = OutputDocumentPeer::retrieveByPK($sOutDocUid);
         if (!is_null($oOutputDocument)) {
             $oConnection->begin();
             Content::removeContent('OUT_DOC_TITLE', '', $oOutputDocument->getOutDocUid());
             Content::removeContent('OUT_DOC_DESCRIPTION', '', $oOutputDocument->getOutDocUid());
             Content::removeContent('OUT_DOC_FILENAME', '', $oOutputDocument->getOutDocUid());
             Content::removeContent('OUT_DOC_TEMPLATE', '', $oOutputDocument->getOutDocUid());
             $iResult = $oOutputDocument->delete();
             $oConnection->commit();
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
Exemplo n.º 21
0
 public function remove($TriUid)
 {
     $con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
     try {
         $result = false;
         $con->begin();
         $oTri = TriggersPeer::retrieveByPK($TriUid);
         if (!is_null($oTri)) {
             Content::removeContent('TRI_TITLE', '', $this->getTriUid());
             Content::removeContent('TRI_DESCRIPTION', '', $this->getTriUid());
             $result = $oTri->delete();
             $con->commit();
         }
         return $result;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemplo n.º 22
0
 /**
  * Remove the Prolication document registry
  *
  * @param array $aData or string $ProUid
  * @return string
  *
  */
 public function remove($ProUid)
 {
     if (is_array($ProUid)) {
         $ProUid = isset($ProUid['DYN_UID']) ? $ProUid['DYN_UID'] : '';
     }
     try {
         $oPro = DynaformPeer::retrieveByPK($ProUid);
         if (!is_null($oPro)) {
             Content::removeContent('DYN_TITLE', '', $oPro->getDynUid());
             Content::removeContent('DYN_DESCRIPTION', '', $oPro->getDynUid());
             $iResult = $oPro->delete();
             if (file_exists(PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml')) {
                 unlink(PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml');
             }
             if (file_exists(PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.xml')) {
                 unlink(PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.xml');
             }
             if (file_exists(PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.html')) {
                 unlink(PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.html');
             }
             if (file_exists(PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.html')) {
                 unlink(PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '_tmp0.html');
             }
             return $iResult;
         } else {
             throw new Exception("The row '{$ProUid}' in table Dynaform doesn't exist!");
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
Exemplo n.º 23
0
 /**
  * Remove the application document registry
  * @param array $aData
  * @return string
  **/
 public function remove($sSwiEleUid)
 {
     $oConnection = Propel::getConnection(SwimlanesElementsPeer::DATABASE_NAME);
     try {
         $oSwimlanesElements = SwimlanesElementsPeer::retrieveByPK($sSwiEleUid);
         if (!is_null($oSwimlanesElements)) {
             $oConnection->begin();
             Content::removeContent('SWI_TEXT', '', $oSwimlanesElements->getSwiUid());
             $iResult = $oSwimlanesElements->delete();
             $oConnection->commit();
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }