use BadMethodCallException;
use Friendica\Core\Logger;
-use Friendica\Core\System;
use Friendica\Database\Database;
use Friendica\Database\DBA;
use Friendica\DI;
return self::selectViewForUser('post-view', $uid, $selected, $condition, $params);
}
+ /**
+ * Select rows from the post-timeline-view view for a given user
+ * This function is used for API calls.
+ *
+ * @param integer $uid User ID
+ * @param array $selected Array of selected fields, empty for all
+ * @param array $condition Array of fields for condition
+ * @param array $params Array of several parameters
+ *
+ * @return boolean|object
+ * @throws \Exception
+ */
+ public static function selectTimelineForUser(int $uid, array $selected = [], array $condition = [], array $params = [])
+ {
+ return self::selectViewForUser('post-timeline-view', $uid, $selected, $condition, $params);
+ }
+
/**
* Select rows from the post-thread-user-view view for a given user
*
{
$affected = 0;
- Logger::info('Start Update', ['fields' => $fields, 'condition' => $condition, 'uid' => DI::userSession()->getLocalUserId(),'callstack' => System::callstack(10)]);
+ Logger::info('Start Update', ['fields' => $fields, 'condition' => $condition, 'uid' => DI::userSession()->getLocalUserId()]);
// Don't allow changes to fields that are responsible for the relation between the records
unset($fields['id']);