Subversion Repositories SmartDukaan

Rev

Rev 14434 | Rev 14661 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14434 Rev 14654
Line 130... Line 130...
130
 */
130
 */
131
	public function admin_index() {
131
	public function admin_index() {
132
		$this->UserUrl->recursive = 0;
132
		$this->UserUrl->recursive = 0;
133
		$q = $this->request->query('q');
133
		$q = $this->request->query('q');
134
		if(isset($q) && !empty($q)){
134
		if(isset($q) && !empty($q)){
135
			$this->Paginator->settings = array('conditions' => array('UserUrl.url LIKE'=>'%'.$q.'%'));
135
			$this->Paginator->settings = array('conditions' => array('UserUrl.url LIKE'=>'%'.$q.'%'),'order' => array('id'=>'desc'));
136
			$this->set(compact('q'));
136
 			$this->set(compact('q'));
-
 
137
		} else {
-
 
138
			$this->Paginator->settings = array('order' => array('id'=>'desc'));
137
		}
139
 		}
138
		$this->set('userUrls', $this->Paginator->paginate());
140
		$this->set('userUrls', $this->Paginator->paginate());
139
	}
141
	}
140
 
142
 
141
/**
143
/**
142
 * admin_view method
144
 * admin_view method