Fixed order in entry/update, fixed a lot of codestyle

This commit is contained in:
Andrey
2013-06-19 16:09:31 +02:00
parent c8b62c02db
commit 1764d5f5c4
31 changed files with 719 additions and 306 deletions

View File

@@ -292,16 +292,31 @@ class FeedEntry
return $this->feed;
}
/**
* Returns a boolean indicating whether the given User_Adapter is the publisher of the entry.
*
* @param \User_Adapter $user
*
* @return boolean
*/
public function isPublisher(\User_Adapter $user)
{
if ($this->publisher) {
if ($this->publisher->getUsrId() === $user->get_id())
if ($this->publisher->getUsrId() === $user->get_id()) {
return true;
}
}
return false;
}
/**
* Returns the item from a given id.
*
* @param int $id
*
* @return null
*/
public function getItem($id)
{
foreach ($this->items as $item) {