Example #1
0
                }
            }
            if (class_exists($sNamespace . "plugin")) {
                if (!$aPreviousStep) {
                    $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
                } else {
                    $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = $aPreviousStep['PAGE'];
                    $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = G::loadTranslation("ID_PREVIOUS_STEP");
                }
                $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = $aNextStep['PAGE'];
                $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = G::loadTranslation("ID_NEXT_STEP");
                /** Added By erik date: 16-05-08
                 * Description: this was added for the additional database connections */
                G::LoadClass('dbConnections');
                $oDbConnections = new dbConnections($_SESSION['PROCESS']);
                $oDbConnections->loadAdditionalConnections();
                $stepFilename = "{$sNamespace}/{$sStepName}";
                G::evalJScript("\n        if (parent.setCurrent) {\n          parent.setCurrent('" . $_GET['UID'] . "');\n        }");
                $G_PUBLISH->AddContent('content', $stepFilename);
            } else {
                $aMessage['MESSAGE'] = G::loadTranslation('ID_EXTERNAL_STEP_MISSING', SYS_LANG, array("plugin" => $sNamespace));
                $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
            }
            break;
    }
    //Add content content step - End
} catch (Exception $e) {
    G::SendTemporalMessage(G::LoadTranslation('ID_PROCESS_DEF_PROBLEM'), 'error', 'string', 3, 100);
    $aMessage = array();
    $aMessage['MESSAGE'] = $e->getMessage();
    $G_PUBLISH = new Publisher();
Example #2
0
 /**
  *
  * @param      string $name The database name.
  * @return     Connection A database connection
  * @throws     PropelException - if no conneciton params, or SQLException caught when trying to connect.
  */
 public static function getConnection($name = null)
 {
     if ($name === null) {
         $name = self::getDefaultDB();
     }
     $con = isset(self::$connectionMap[$name]) ? self::$connectionMap[$name] : null;
     if ($con === null || $name === 'dbarray') {
         $dsn = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['connection'] : null;
         if ($dsn === null) {
             if (isset($_SESSION['PROCESS'])) {
                 /** Added By Erik Amaru <erik@colosa.com *******************************
                  * @date: 27-05-08 11:48                                                *
                  * @Description: this was added for the additional database connections *
                  ***********************************************************************/
                 G::LoadClass('dbConnections');
                 $oDbConnections = new dbConnections($_SESSION['PROCESS']);
                 $oDbConnections->loadAdditionalConnections();
                 $dsn = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['connection'] : null;
             } else {
                 throw new PropelException("No connection params set for " . $name);
             }
         }
         include_once 'creole/Creole.php';
         // if specified, use custom driver
         if (isset(self::$configuration['datasources'][$name]['driver'])) {
             Creole::registerDriver($dsn['phptype'], self::$configuration['datasources'][$name]['driver']);
         }
         try {
             $con = Creole::getConnection($dsn);
         } catch (SQLException $e) {
             throw new PropelException($e);
         }
         self::$connectionMap[$name] = $con;
     }
     return $con;
 }