DB CHANGES
This commit is contained in:
parent
35f2a136d5
commit
7a6e01e562
@ -86,7 +86,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
|
|||||||
|
|
||||||
// define login route name for token verification
|
// define login route name for token verification
|
||||||
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
|
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
|
||||||
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getListOfPDAllocationTypes'); // no errors
|
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'saveCompany'); // no errors
|
||||||
|
|
||||||
/*********************AWS resources Constants*************************************************/
|
/*********************AWS resources Constants*************************************************/
|
||||||
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
|
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
|
||||||
|
|||||||
@ -100,10 +100,10 @@ $db['dev'] = array(
|
|||||||
|
|
||||||
$db['test'] = array(
|
$db['test'] = array(
|
||||||
'dsn' => '',
|
'dsn' => '',
|
||||||
'hostname' => 'apollodec.com',
|
'hostname' => 'sine-edge-dev.cya6cheplup2.ap-south-1.rds.amazonaws.com',
|
||||||
'username' => 'apollod4_DEV',
|
'username' => 'asparqdev_mas001',
|
||||||
'password' => 'apollo1234',
|
'password' => 'sparqvenba',
|
||||||
'database' => 'apollod4_ApolloDECDev',
|
'database' => 'sine_edge_test',
|
||||||
'dbdriver' => 'mysqli',
|
'dbdriver' => 'mysqli',
|
||||||
'dbprefix' => '',
|
'dbprefix' => '',
|
||||||
'pconnect' => FALSE,
|
'pconnect' => FALSE,
|
||||||
|
|||||||
@ -538,16 +538,15 @@ class Common_Masters_Controller extends REST_Controller {
|
|||||||
* Company File Upload
|
* Company File Upload
|
||||||
*/
|
*/
|
||||||
public function saveCompany_post(){
|
public function saveCompany_post(){
|
||||||
//echo "function in";
|
|
||||||
$records = json_decode($this->post('records'),true);
|
|
||||||
|
|
||||||
|
$records = json_decode($this->post('records'),true);
|
||||||
if(!empty($_FILES['logo']['tmp_name']))
|
if(!empty($_FILES['logo']['tmp_name']))
|
||||||
{
|
{
|
||||||
|
|
||||||
$logo = $_FILES['logo']['tmp_name'];
|
$logo = $_FILES['logo']['tmp_name'];
|
||||||
$logoname = $_FILES['logo']['name'];
|
$logoname = $_FILES['logo']['name'];
|
||||||
$logoname = strtolower($logoname);
|
$logoname = strtolower($logoname);
|
||||||
$logos3path = "";
|
//$logos3path = "";
|
||||||
$logos3path = 'sineedge/'.$logoname;
|
$logos3path = 'sineedge/'.$logoname;
|
||||||
$bucketname = PROFILE_PICTURE_BUCKET_NAME;
|
$bucketname = PROFILE_PICTURE_BUCKET_NAME;
|
||||||
$key = $logos3path;
|
$key = $logos3path;
|
||||||
@ -555,7 +554,7 @@ class Common_Masters_Controller extends REST_Controller {
|
|||||||
|
|
||||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$sourcefile);
|
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$sourcefile);
|
||||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||||
|
print_r($s3result);
|
||||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||||
{
|
{
|
||||||
$records['logo'] = $logoname;
|
$records['logo'] = $logoname;
|
||||||
@ -571,11 +570,9 @@ class Common_Masters_Controller extends REST_Controller {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$result = $this->Common_Masters_Model->saveRecords($records,COMPANY);
|
$result = $this->Common_Masters_Model->saveRecords($records,COMPANY);
|
||||||
|
|
||||||
if(count($result) > 0)
|
if($result != "" || $result != null)
|
||||||
{
|
{
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user