Subversion Repositories SmartDukaan

Rev

Rev 14517 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14517 Rev 14561
Line 59... Line 59...
59
 *
59
 *
60
 * @return void
60
 * @return void
61
 */
61
 */
62
	public function admin_new() {
62
	public function admin_new() {
63
		if ($this->request->is('post')) {
63
		if ($this->request->is('post')) {
-
 
64
			$data = $this->request->data['NegativeDeal'];
64
			$url = $this->apihost."negativeDeals/addNegativeDeals";
65
			$url = $this->apihost."negativeDeals/addNegativeDeals";
-
 
66
			$url = $this->generateMultiUrl($url,$data);
65
			$jsonVar = json_encode($this->request->data['NegativeDeal'], JSON_NUMERIC_CHECK );
67
			$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
66
			$response = $this->make_request($url,$jsonVar);
68
			$response = $this->make_request($url,$jsonVar);
67
			if (key($response)) {
69
			if (key($response)) {
68
				$this->Session->setFlash(current($response));
70
				$this->Session->setFlash(current($response));
69
				return $this->redirect(array('action' => 'index'));
71
				return $this->redirect(array('action' => 'index'));
70
			} else {
72
			} else {