Merge pull request #2298 from luisfernandosl/BUG-14414

BUG 14414 "No se puede realizar la import,..." SOLVED
This commit is contained in:
julceslauhub
2014-03-19 16:08:38 -03:00
2 changed files with 10 additions and 2 deletions

View File

@@ -689,7 +689,7 @@ class G
* @param string $strClass * @param string $strClass
* @return void * @return void
*/ */
public function LoadClass ($strClass) public static function LoadClass ($strClass)
{ {
$classfile = G::ExpandPath( "classes" ) . 'class.' . $strClass . '.php'; $classfile = G::ExpandPath( "classes" ) . 'class.' . $strClass . '.php';
if (! file_exists( $classfile )) { if (! file_exists( $classfile )) {
@@ -3294,7 +3294,7 @@ class G
* *
* @author Erik A.O. <erik@colosa.com> * @author Erik A.O. <erik@colosa.com>
*/ */
public function json_encode($Json) public static function json_encode($Json)
{ {
if ( function_exists('json_encode') ) { if ( function_exists('json_encode') ) {
return json_encode($Json); return json_encode($Json);

View File

@@ -198,6 +198,7 @@ class pmTablesProxy extends HttpProxyController
//require_once 'classes/model/Fields.php'; //require_once 'classes/model/Fields.php';
try { try {
$result = new stdClass();
ob_start(); ob_start();
$data = (array) $httpData; $data = (array) $httpData;
$data['PRO_UID'] = trim( $data['PRO_UID'] ); $data['PRO_UID'] = trim( $data['PRO_UID'] );
@@ -326,6 +327,7 @@ class pmTablesProxy extends HttpProxyController
$result->success = true; $result->success = true;
$result->message = $result->msg = $buildResult; $result->message = $result->msg = $buildResult;
} catch (Exception $e) { } catch (Exception $e) {
$result = new stdClass();
$buildResult = ob_get_contents(); $buildResult = ob_get_contents();
ob_end_clean(); ob_end_clean();
$result->success = false; $result->success = false;
@@ -352,6 +354,7 @@ class pmTablesProxy extends HttpProxyController
*/ */
public function delete ($httpData) public function delete ($httpData)
{ {
$result = new stdClass();
$rows = G::json_decode( stripslashes( $httpData->rows ) ); $rows = G::json_decode( stripslashes( $httpData->rows ) );
$errors = ''; $errors = '';
$count = 0; $count = 0;
@@ -735,6 +738,7 @@ class pmTablesProxy extends HttpProxyController
{ {
require_once 'classes/model/AdditionalTables.php'; require_once 'classes/model/AdditionalTables.php';
try { try {
$result = new stdClass();
$errors = ''; $errors = '';
$overWrite = isset( $_POST['form']['OVERWRITE'] ) ? true : false; $overWrite = isset( $_POST['form']['OVERWRITE'] ) ? true : false;
@@ -962,6 +966,7 @@ class pmTablesProxy extends HttpProxyController
$result->message = $msg; $result->message = $msg;
} catch (Exception $e) { } catch (Exception $e) {
$result = new stdClass();
$result->errorType = 'error'; $result->errorType = 'error';
$result->buildResult = ob_get_contents(); $result->buildResult = ob_get_contents();
ob_end_clean(); ob_end_clean();
@@ -993,6 +998,7 @@ class pmTablesProxy extends HttpProxyController
$tablesToExport = G::json_decode( stripslashes( $httpData->rows ) ); $tablesToExport = G::json_decode( stripslashes( $httpData->rows ) );
try { try {
$result = new stdClass();
G::LoadCLass( 'net' ); G::LoadCLass( 'net' );
$net = new NET( G::getIpAddress() ); $net = new NET( G::getIpAddress() );
@@ -1093,6 +1099,7 @@ class pmTablesProxy extends HttpProxyController
$result->link = $link; $result->link = $link;
$result->message = "Generated file: $filenameOnly, size: $size"; $result->message = "Generated file: $filenameOnly, size: $size";
} catch (Exception $e) { } catch (Exception $e) {
$result = new stdClass();
$result->success = false; $result->success = false;
$result->message = $e->getMessage(); $result->message = $e->getMessage();
} }
@@ -1225,6 +1232,7 @@ class pmTablesProxy extends HttpProxyController
public function genDataReport ($httpData) public function genDataReport ($httpData)
{ {
$result = new stdClass();
G::loadClass( 'pmTable' ); G::loadClass( 'pmTable' );
require_once 'classes/model/AdditionalTables.php'; require_once 'classes/model/AdditionalTables.php';
$result->message = ''; $result->message = '';