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