Various settings in the Suggest
This commit is contained in:
@@ -155,15 +155,25 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
|
||||
if( $type == 'suggest' && isset($Fields['PME_SQLCONNECTION']) && $Fields['PME_SQLCONNECTION']!='') {
|
||||
//define the dbArray with the table fields
|
||||
//g::pr($Fields);
|
||||
$con = Propel::getConnection($Fields['PME_SQLCONNECTION']);
|
||||
$rs = $con->executeQuery("SHOW COLUMNS FROM USERS");
|
||||
$result = Array();
|
||||
$i=0;
|
||||
while ($rs->next()) {
|
||||
$result[$i++] = $rs->getRow();
|
||||
}
|
||||
//g::pr($result);
|
||||
|
||||
$tableExists = true;
|
||||
$sDataBase = 'database_' . strtolower(DB_ADAPTER);
|
||||
if(G::LoadSystemExist($sDataBase)){
|
||||
G::LoadSystem($sDataBase);
|
||||
$oDataBase = new database();
|
||||
$tableExists = $oDataBase->tableExists('USERS', $Fields['PME_SQLCONNECTION']);
|
||||
}
|
||||
if($tableExists) {
|
||||
$con = Propel::getConnection($Fields['PME_SQLCONNECTION']);
|
||||
$rs = $con->executeQuery("SHOW COLUMNS FROM USERS");
|
||||
$result = Array();
|
||||
$i=0;
|
||||
while ($rs->next()) {
|
||||
$result[$i++] = $rs->getRow();
|
||||
}
|
||||
}
|
||||
}
|
||||
//g::pr($result);
|
||||
|
||||
|
||||
if( isset($Fields['PME_HINT']) ) {
|
||||
|
||||
@@ -59,7 +59,7 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
|
||||
$_POST['form']['PME_SAVELABEL'] = 0;
|
||||
}
|
||||
|
||||
if (isset($_POST['form']['PME_SAVELABEL'])){
|
||||
if (isset($_POST['form']['PME_SAVELABEL']) && isset($_POST['form']['PME_CODE'])){
|
||||
$pmeCode = $_POST['form']['PME_CODE'];
|
||||
$pmeCode = str_replace("'", "''", $pmeCode);
|
||||
$pmeCode = str_replace('"', '""', $pmeCode);
|
||||
|
||||
Reference in New Issue
Block a user