| @@ 30-41 (lines=12) @@ | ||
| 27 | // _context[0] => entry id to delete |
|
| 28 | // _context[1] => fieldId |
|
| 29 | // _context[2] => current entry id (parent of entry id to delete) |
|
| 30 | if (!is_array($this->_context) || empty($this->_context)) { |
|
| 31 | $this->_Result['error'] = __('Parameters not found'); |
|
| 32 | return; |
|
| 33 | } |
|
| 34 | else if (count($this->_context) < self::NUMBER_OF_URL_PARAMETERS) { |
|
| 35 | $this->_Result['error'] = __('Not enough parameters'); |
|
| 36 | return; |
|
| 37 | } |
|
| 38 | else if (count($this->_context) > self::NUMBER_OF_URL_PARAMETERS) { |
|
| 39 | $this->_Result['error'] = __('Too many parameters'); |
|
| 40 | return; |
|
| 41 | } |
|
| 42 | ||
| 43 | // Validate to delete entry ID |
|
| 44 | $rawToDeleteEntryId = MySQL::cleanValue($this->_context[0]); |
|
| @@ 30-41 (lines=12) @@ | ||
| 27 | // _context[0] => entry values |
|
| 28 | // _context[1] => fieldId |
|
| 29 | // _context[2] => current entry id |
|
| 30 | if (!is_array($this->_context) || empty($this->_context)) { |
|
| 31 | $this->_Result['error'] = __('Parameters not found'); |
|
| 32 | return; |
|
| 33 | } |
|
| 34 | else if (count($this->_context) < self::NUMBER_OF_URL_PARAMETERS) { |
|
| 35 | $this->_Result['error'] = __('Not enough parameters'); |
|
| 36 | return; |
|
| 37 | } |
|
| 38 | else if (count($this->_context) > self::NUMBER_OF_URL_PARAMETERS) { |
|
| 39 | $this->_Result['error'] = __('Too many parameters'); |
|
| 40 | return; |
|
| 41 | } |
|
| 42 | ||
| 43 | // Validate ALL entries ID |
|
| 44 | $rawEntriesId = array_filter(explode(',', MySQL::cleanValue(urldecode($this->_context[0])))); |
|