This commit is contained in:
Paminger
2016-04-07 15:17:26 +02:00
parent c124348484
commit bcfae6b009
14 changed files with 57 additions and 39 deletions
-17
View File
@@ -1,17 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
//require APPPATH . '/libraries/REST_Controller.php';
class API_Controller extends REST_Controller
{
function __construct()
{
parent::__construct();
//$this->load->library('session'); -> autoload
//$this->load->library('database'); -> autoload
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ class FHC_Controller extends CI_Controller
require_once APPPATH . '/libraries/REST_Controller.php';
class API_Controller extends REST_Controller
class APIv1_Controller extends REST_Controller
{
function __construct()
{
+4 -2
View File
@@ -3,6 +3,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
class FHC_Model extends CI_Model
{
//protected errormsg;
function __construct()
{
parent::__construct();
@@ -31,12 +32,13 @@ class FHC_Model extends CI_Model
*
* @return array
*/
protected function _general_error()
protected function _general_error($retval = '', $message = FHC_ERR_GENERAL)
{
return array(
'err' => 1,
'code' => FHC_ERR_GENERAL,
'msg' => lang('fhc_'.FHC_ERR_GENERAL)
'msg' => lang('fhc_'.$message),
'retval' => $retval
);
}
}