Example #1
0
 /**
  * Given a set of conditions, return a ResultWrapper
  * which will return matching database rows with the
  * fields necessary to build Revision objects.
  *
  * @param Database $db
  * @param array $conditions
  * @return ResultWrapper
  * @static
  * @access private
  */
 static function fetchFromConds(&$db, $conditions)
 {
     $res = $db->select(array('page', 'revision'), array('page_namespace', 'page_title', 'page_latest', 'rev_id', 'rev_page', 'rev_text_id', 'rev_comment', 'rev_user_text', 'rev_user', 'rev_minor_edit', 'rev_timestamp', 'rev_deleted'), $conditions, 'Revision::fetchRow', array('LIMIT' => 1));
     $ret = $db->resultObject($res);
     return $ret;
 }
Example #2
0
 /**
  * Given a set of conditions, return a ResultWrapper
  * which will return matching database rows with the
  * fields necessary to build Revision objects.
  *
  * @param Database $db
  * @param array $conditions
  * @return ResultWrapper
  * @access private
  * @static
  */
 private static function fetchFromConds($db, $conditions)
 {
     $fields = self::selectFields();
     $fields[] = 'page_namespace';
     $fields[] = 'page_title';
     $fields[] = 'page_latest';
     $res = $db->select(array('page', 'revision'), $fields, $conditions, __METHOD__, array('LIMIT' => 1));
     $ret = $db->resultObject($res);
     return $ret;
 }
Example #3
0
 /**
  * Given a set of conditions, return a ResultWrapper
  * which will return matching database rows with the
  * fields necessary to build the group.
  *
  * @param Database $db
  * @param array $conditions
  *
  * @return ResultWrapper|false
  */
 protected static function fetchMembersFromConds($db, $conditions)
 {
     $fields = MapsLayers::databaseFields();
     $res = $db->select(array('maps_layers'), $fields, $conditions, __METHOD__);
     return $db->resultObject($res);
 }