Correccion de errores stdclass
This commit is contained in:
@@ -188,6 +188,7 @@ class TaskUser extends BaseTaskUser
|
||||
while ($dataset->next()) {
|
||||
$usersTask[] = $dataset->getRow();
|
||||
}
|
||||
$result = new stdClass();
|
||||
$result->data = $usersTask;
|
||||
$result->totalCount = sizeof( $usersTask );
|
||||
|
||||
|
||||
@@ -363,6 +363,7 @@ class Users extends BaseUsers
|
||||
$rows[] = $rs->getRow();
|
||||
}
|
||||
|
||||
$result = new stdClass();
|
||||
$result->data = $rows;
|
||||
$result->totalCount = $totalCount;
|
||||
|
||||
|
||||
@@ -23,16 +23,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (defined('PATH_DB') && defined('SYS_SYS')) {
|
||||
if (defined('PATH_DB') && defined('SYS_SYS')) {
|
||||
|
||||
if (!file_exists(PATH_DB . SYS_SYS . '/db.php'))
|
||||
throw new Exception("Could not find db.php in current workspace " . SYS_SYS);
|
||||
throw new Exception("Could not find db.php in current workspace " . SYS_SYS);
|
||||
|
||||
require_once(PATH_DB . SYS_SYS . '/db.php');
|
||||
|
||||
//to do: enable for other databases
|
||||
$dbType = DB_ADAPTER;
|
||||
|
||||
$dsn = DB_ADAPTER . '://' . DB_USER . ':' . DB_PASS . '@' . DB_HOST . '/' . DB_NAME;
|
||||
|
||||
//to do: enable a mechanism to select RBAC Database
|
||||
@@ -42,18 +40,19 @@
|
||||
$dsnReport = DB_ADAPTER . '://' . DB_REPORT_USER . ':' . DB_REPORT_PASS . '@' . DB_REPORT_HOST . '/' . DB_REPORT_NAME;
|
||||
|
||||
switch (DB_ADAPTER) {
|
||||
case 'mysql':
|
||||
$dsn .= '?encoding=utf8';
|
||||
$dsnRbac .= '?encoding=utf8';
|
||||
$dsnReport .= '?encoding=utf8';
|
||||
break;
|
||||
case 'mssql':
|
||||
//$dsn .= '?sendStringAsUnicode=false';
|
||||
//$dsnRbac .= '?sendStringAsUnicode=false';
|
||||
//$dsnReport .= '?sendStringAsUnicode=false';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case 'mysql':
|
||||
$dsn .= '?encoding=utf8';
|
||||
$dsnRbac .= '?encoding=utf8';
|
||||
$dsnReport .= '?encoding=utf8';
|
||||
break;
|
||||
case 'mssql':
|
||||
case 'sqlsrv':
|
||||
//$dsn .= '?sendStringAsUnicode=false';
|
||||
//$dsnRbac .= '?sendStringAsUnicode=false';
|
||||
//$dsnReport .= '?sendStringAsUnicode=false';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
$pro ['datasources']['workflow']['connection'] = $dsn;
|
||||
@@ -65,9 +64,9 @@
|
||||
$pro ['datasources']['rp']['connection'] = $dsnReport;
|
||||
$pro ['datasources']['rp']['adapter'] = DB_ADAPTER;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$pro ['datasources']['dbarray']['connection'] = 'dbarray://user:pass@localhost/pm_os';
|
||||
$pro ['datasources']['dbarray']['adapter'] = 'dbarray';
|
||||
$pro ['datasources']['dbarray']['connection'] = 'dbarray://user:pass@localhost/pm_os';
|
||||
$pro ['datasources']['dbarray']['adapter'] = 'dbarray';
|
||||
|
||||
return $pro;
|
||||
return $pro;
|
||||
|
||||
@@ -145,6 +145,7 @@ class Dashboard extends Controller
|
||||
$oConfiguration->aConfig = $dataDashboard;
|
||||
$oConfiguration->saveConfig('Dashboard', '', '', $_SESSION['USER_LOGGED']);
|
||||
|
||||
$result = new stdClass();
|
||||
$result->success = '1';
|
||||
return $result;
|
||||
} catch (Exception $error) {
|
||||
|
||||
@@ -48,7 +48,7 @@ try {
|
||||
} else {
|
||||
$sfunction = $_POST['functions'];
|
||||
}
|
||||
|
||||
$result = new stdclass();
|
||||
switch ($sfunction) {
|
||||
case 'getRelationInfDoc':
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user