english/administrator/components/com_content/models/article.php
/**
	 * Method to test whether a record can have its state edited.
	 *
	 * @param	object	$record	A record object.
	 *
	 * @return	boolean	True if allowed to change the state of the record. Defaults to the permission set in the component.
	 * @since	1.6
	 */
Method to test whether a record can have its state edited.
@param       object  $record A record object.

@return      boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
Method to test whether a record can have its state edited . @param object $record A record object . @return boolean True if allowed to change the state of the record . Defaults to the permission set in the component .
protected function canEditState($record)
	{
		$user = JFactory::getUser();
		if (!empty($record->id)) {
			return $user->authorise('core.edit.state', 'com_content.article.'.(int) $record->id);
		}
		else if (!empty($record->catid)) {
			return $user->authorise('core.edit.state', 'com_content.category.'.(int) $record->catid);
		}
		else {
			return parent::canEditState($record);
		}
	}
protected function canEditState ( $ record ) { $ user = JFactory :: getUser ( ) ; if ( ! empty ( $ record -> id ) ) { return $ user -> authorise ( 'core.edit.state' , 'com_content.article.' . ( int ) $ record -> id ) ; } else if ( ! empty ( $ record -> catid ) ) { return $ user -> authorise ( 'core.edit.state' , 'com_content.category.' . ( int ) $ record -> catid ) ; } else { return parent :: canEditState ( $ record ) ; } }
Method to test whether a record can have its state edited.
Method to test whether a record can have its state edited .
// Check for existing article. // New article, so check against the category. // Default to component settings if neither article nor category known.