Merge branch '2.0' of git.colosa.net:processmaker into 2.0

This commit is contained in:
Carlos Pacha
2011-03-25 13:05:44 -04:00
4 changed files with 102 additions and 84 deletions

View File

@@ -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) {
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;
// }
}

View File

@@ -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']);

View File

@@ -19,7 +19,8 @@ img {
{
font :normal 8pt sans-serif,Tahoma,MiscFixed;
color :#000;
height :150px;
height :0px;
padding-top: 100px;
text-align :center;
}
.Footer .image

View File

@@ -51,7 +51,6 @@
</td>
</tr>
{/if}
<tr>
<td width="100%" align="center">
{php}
@@ -64,7 +63,7 @@
</td>
</tr>
<tr height="100%">
<td height="100%" valign="bottom">
<td height="100%">
<div class="Footer">
<div class="content">{$footer}</div>
</div>