english/administrator/components/com_categories/models/category.php
/**
	 * Method to test whether a record can be deleted.
	 *
	 * @param	object	A record object.
	 * @return	boolean	True if allowed to delete the record. Defaults to the permission set in the component.
	 * @since	1.6
	 */
Method to test whether a record can be deleted.
@param       object  A record object.
@return      boolean True if allowed to delete the record. Defaults to the permission set in the component.
Method to test whether a record can be deleted . @param object A record object . @return boolean True if allowed to delete the record . Defaults to the permission set in the component .
protected function canDelete($record)
	{
		if (!empty($record->id)) {
			if ($record->published != -2) {
				return ;
			}
			$user = JFactory::getUser();
			return $user->authorise('core.delete', $record->extension.'.category.'.(int) $record->id);
		}
	}
protected function canDelete ( $ record ) { if ( ! empty ( $ record -> id ) ) { if ( $ record -> published != - 2 ) { return ; } $ user = JFactory :: getUser ( ) ; return $ user -> authorise ( 'core.delete' , $ record -> extension . '.category.' . ( int ) $ record -> id ) ; } }
Method to test whether a record can be deleted.
Method to test whether a record can be deleted .