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; 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 * Select rows from the item table and returns them as an array
* *

View File

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