Skip to content
Snippets Groups Projects
Commit a56abd3f authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Typehint and check $ids parameter.

parent d838a3b3
Branches
No related tags found
No related merge requests found
......@@ -541,9 +541,13 @@ class OC_VCategories {
* Defaults to the type set in the instance
* @returns boolean Returns false on error.
*/
public function purgeObjects($ids, $type = null) {
public function purgeObjects(array $ids, $type = null) {
$type = is_null($type) ? $this->type : $type;
$updates = array();
if(count($ids) === 0) {
// job done ;)
return true;
}
$updates = $ids();
try {
$query = 'DELETE FROM `' . self::RELATION_TABLE . '` ';
$query .= 'WHERE `objid` IN (' . str_repeat('?,', count($ids)-1) . '?) ';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment