Merge branch '2.0' of git.colosa.net:processmaker into 2.0
This commit is contained in:
@@ -717,14 +717,29 @@ class database extends database_base {
|
||||
/**
|
||||
* Determining the existence of a table
|
||||
*/
|
||||
function tableExists ($table, $db) {
|
||||
$tables = mysql_list_tables ($db);
|
||||
while (list ($temp) = @mysql_fetch_array ($tables)) {
|
||||
if ($temp == $table) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
function tableExists($tableName, $database)
|
||||
{
|
||||
@mysql_select_db($database);
|
||||
$tables = array();
|
||||
$tablesResult = mysql_query("SHOW TABLES FROM $database;");
|
||||
while ($row = @mysql_fetch_row($tablesResult)) $tables[] = $row[0];
|
||||
if(in_array($tableName, $tables)) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Determining the existence of a table (Depricated)
|
||||
*/
|
||||
// function tableExists ($table, $db) {
|
||||
// $tables = mysql_list_tables ($db);
|
||||
// while (list ($temp) = @mysql_fetch_array ($tables)) {
|
||||
// if ($temp == $table) {
|
||||
// return TRUE;
|
||||
// }
|
||||
// }
|
||||
// return FALSE;
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -61,6 +61,7 @@ $G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher;
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
// Check if these code needs to be removed since the interface ar now moving to ExtJS
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
@@ -76,6 +77,7 @@ $oHeadPublisher->addScriptCode('
|
||||
'.(isset($_SESSION['showCasesWindow'])?'try{'.$_SESSION['showCasesWindow'].'}catch(e){}':'').'
|
||||
});
|
||||
');
|
||||
// Check if these code needs to be removed since the interface ar now moving to ExtJS
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
|
||||
if(!isset($_GET['position'])) $_GET['position'] = 1;
|
||||
@@ -144,6 +146,7 @@ G::RenderPage('publish', 'blank');
|
||||
|
||||
<script>
|
||||
/*------------------------------ To Revise Routines ---------------------------*/
|
||||
//Deprecated Section since the interface are now movig to ExtJS
|
||||
function setSelect()
|
||||
{
|
||||
var ex=<?=$_GET['ex']?>;
|
||||
@@ -194,6 +197,8 @@ function toRevisePanel(APP_UID,DEL_INDEX)
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
}
|
||||
//Deprecated Section since the interface are now movig to ExtJS
|
||||
//Remove this Jscript code
|
||||
//toRevisePanel('<?=$_GET['APP_UID']?>','<?=$_GET['DEL_INDEX']?>');
|
||||
|
||||
toRevisePanel('<?=$_GET['APP_UID']?>','<?=$_GET['DEL_INDEX']?>');
|
||||
</script>
|
||||
@@ -52,6 +52,7 @@ $oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher;
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
// check if the code for the addScriptCode is necessary since the interface is now based in ExtJs
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
@@ -76,6 +77,7 @@ if(!isset($_GET['ex'])) $_GET['ex']=0;
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
/*------------------------------ To Revise Routines ---------------------------*/
|
||||
//Deprecated Section since the interface are now movig to ExtJS
|
||||
function setSelect()
|
||||
{
|
||||
var ex=<?=$_GET['ex']?>;
|
||||
@@ -94,6 +96,7 @@ function setSelect()
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//Deprecated Section since the interface are now movig to ExtJS
|
||||
function toRevisePanel(APP_UID,DEL_INDEX)
|
||||
{
|
||||
oPanel = new leimnud.module.panel();
|
||||
@@ -126,5 +129,5 @@ function toRevisePanel(APP_UID,DEL_INDEX)
|
||||
oRPC.make();
|
||||
}
|
||||
|
||||
toRevisePanel('<?=$_GET['APP_UID']?>','<?=$_GET['DEL_INDEX']?>');
|
||||
//toRevisePanel('<?=$_GET['APP_UID']?>','<?=$_GET['DEL_INDEX']?>');
|
||||
</script>
|
||||
@@ -161,7 +161,10 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
|
||||
if(G::LoadSystemExist($sDataBase)){
|
||||
G::LoadSystem($sDataBase);
|
||||
$oDataBase = new database();
|
||||
$tableExists = $oDataBase->tableExists('USERS', $Fields['PME_SQLCONNECTION']);
|
||||
$dataBase = $Fields['PME_SQLCONNECTION'];
|
||||
if($Fields['PME_SQLCONNECTION']=='workflow')
|
||||
$dataBase = DB_NAME;
|
||||
$tableExists = $oDataBase->tableExists('USERS', $dataBase);
|
||||
}
|
||||
if($tableExists) {
|
||||
$con = Propel::getConnection($Fields['PME_SQLCONNECTION']);
|
||||
|
||||
Reference in New Issue
Block a user