english/libraries/joomla/application/component/modelform.php
/**
	 * Method to checkin a row.
	 *
	 * @param   integer  $pk The numeric id of the primary key.
	 *
	 * @return  boolean  False on failure or error, true otherwise.
	 * @since   11.1
	 */
Method to checkin a row.
@param   integer  $pk The numeric id of the primary key.

@return  boolean  False on failure or error, true otherwise.
Method to checkin a row . @param integer $pk The numeric id of the primary key . @return boolean False on failure or error true otherwise .
public function checkin($pk = null)
	{
		if ($pk) {
			$user = JFactory::getUser();
			$table = $this->getTable();
			if (!$table->load($pk)) {
				$this->setError($table->getError());
				return false;
			}
			if ($table->checked_out > 0 && $table->checked_out != $user->get('id') && !$user->authorise('core.admin', 'com_checkin')) {
				$this->setError(JText::_('JLIB_APPLICATION_ERROR_CHECKIN_USER_MISMATCH'));
				return false;
			}
			if (!$table->checkin($pk)) {
				$this->setError($table->getError());
				return false;
			}
		}
		return true;
	}
public function checkin ( $ pk = null ) { if ( $ pk ) { $ user = JFactory :: getUser ( ) ; $ table = $ this -> getTable ( ) ; if ( ! $ table -> load ( $ pk ) ) { $ this -> setError ( $ table -> getError ( ) ) ; return false ; } if ( $ table -> checked_out > 0 && $ table -> checked_out != $ user -> get ( 'id' ) && ! $ user -> authorise ( 'core.admin' , 'com_checkin' ) ) { $ this -> setError ( JText :: _ ( 'JLIB_APPLICATION_ERROR_CHECKIN_USER_MISMATCH' ) ) ; return false ; } if ( ! $ table -> checkin ( $ pk ) ) { $ this -> setError ( $ table -> getError ( ) ) ; return false ; } } return true ; }
Method to checkin a row.
Method to checkin a row .
// Only attempt to check the row in if it exists. // Get an instance of the row to checkin. // Check if this is the user having previously checked out the row. // Attempt to check the row in.