english/administrator/components/com_aicontactsafe/models/default.php
// function to read the records to delete
function to read the records to delete
function to read the records to delete
function readDeleteRows() {
		if(!$this->delete_rowlist) {
			$db = &JFactory::getDBO();
			$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
			JArrayHelper::toInteger($cid);
			if (count($cid) > 0) {
				$cids = implode(',', $cid);
			} else {
				$cids = '-1';
			}
			$where = $this->getDeleteWhere($cids);
			$query = str_replace('%where%', $where, $this->delete_select_sql);
			$this->delete_rowlist = $this->_getList($query, 0, 0);
			if (!is_array($this->delete_rowlist)) {
				$this->delete_rowlist = array();
			}
		}
		return $this->delete_rowlist;
	}
function readDeleteRows ( ) { if ( ! $ this -> delete_rowlist ) { $ db = & JFactory :: getDBO ( ) ; $ cid = JRequest :: getVar ( 'cid' , array ( ) , 'post' , 'array' ) ; JArrayHelper :: toInteger ( $ cid ) ; if ( count ( $ cid ) > 0 ) { $ cids = implode ( ',' , $ cid ) ; } else { $ cids = '-1' ; } $ where = $ this -> getDeleteWhere ( $ cids ) ; $ query = str_replace ( '%where%' , $ where , $ this -> delete_select_sql ) ; $ this -> delete_rowlist = $ this -> _getList ( $ query , 0 , 0 ) ; if ( ! is_array ( $ this -> delete_rowlist ) ) { $ this -> delete_rowlist = array ( ) ; } } return $ this -> delete_rowlist ; }
function to read the records to delete
function to read the records to delete
// initialize the database // get the condition for the selected records // get the records to delete