Fix the test data / unused function removed

This commit is contained in:
Michael 2021-01-17 22:20:46 +00:00
parent 270d1aeb41
commit ff8b578cde
2 changed files with 44 additions and 67 deletions

View File

@ -370,31 +370,6 @@ class Item
return $retval;
}
/**
* Retrieve a single record from the item table and returns it in an associative array
*
* @param array $fields
* @param array $condition
* @param array $params
* @return bool|array
* @throws \Exception
* @see DBA::select
*/
public static function selectFirst(array $fields = [], array $condition = [], $params = [])
{
$params['limit'] = 1;
$result = self::select($fields, $condition, $params);
if (is_bool($result)) {
return $result;
} else {
$row = self::fetch($result);
DBA::close($result);
return $row;
}
}
/**
* Select rows from the item table and returns them as an array
*

View File

@ -180,47 +180,49 @@ return [
],
],
'item-content' => [
'id' => 1,
'uri-id' => 1,
'uri-plink-hash' => '1',
'body' => 'Parent status',
'plink' => 'http://localhost/display/1',
],
'item-content' => [
'id' => 2,
'uri-id' => 2,
'uri-plink-hash' => '2',
'body' => 'Reply',
'plink' => 'http://localhost/display/2',
],
'item-content' => [
'id' => 3,
'uri-id' => 3,
'uri-plink-hash' => '3',
'body' => 'Other user status',
'plink' => 'http://localhost/display/3',
],
'item-content' => [
'id' => 4,
'uri-id' => 4,
'uri-plink-hash' => '4',
'body' => 'Friend user reply',
'plink' => 'http://localhost/display/4',
],
'item-content' => [
'id' => 5,
'uri-id' => 5,
'uri-plink-hash' => '5',
'body' => '[share]Shared status[/share]',
'plink' => 'http://localhost/display/5',
],
'item-content' => [
'id' => 6,
'uri-id' => 6,
'uri-plink-hash' => '6',
'body' => 'Friend user status',
'plink' => 'http://localhost/display/6',
],
[
'id' => 1,
'uri-id' => 1,
'uri-plink-hash' => '1',
'body' => 'Parent status',
'plink' => 'http://localhost/display/1',
],
[
'id' => 2,
'uri-id' => 2,
'uri-plink-hash' => '2',
'body' => 'Reply',
'plink' => 'http://localhost/display/2',
],
[
'id' => 3,
'uri-id' => 3,
'uri-plink-hash' => '3',
'body' => 'Other user status',
'plink' => 'http://localhost/display/3',
],
[
'id' => 4,
'uri-id' => 4,
'uri-plink-hash' => '4',
'body' => 'Friend user reply',
'plink' => 'http://localhost/display/4',
],
[
'id' => 5,
'uri-id' => 5,
'uri-plink-hash' => '5',
'body' => '[share]Shared status[/share]',
'plink' => 'http://localhost/display/5',
],
[
'id' => 6,
'uri-id' => 6,
'uri-plink-hash' => '6',
'body' => 'Friend user status',
'plink' => 'http://localhost/display/6',
],
],
'item' => [
[
'id' => 1,
@ -267,8 +269,8 @@ return [
'starred' => 0,
'origin' => 1,
'guid' => '2',
],
[
'id' => 3,
'uri-id' => 3,
'visible' => 1,