Fix 403s in Phrequent by rendering actions as forms, and make properties fancier
Summary:
Also cleans up some stuff like logged out users a bit. This provides a more subtle alternative to {D5485}.
(This is fairly rough, and the icons need to be sprited if we stick with this approach.)
Test Plan:
{F38047}
{F38048}
Reviewers: hach-que, btrahan
Reviewed By: hach-que
CC: aran, chad
Maniphest Tasks: T2857
Differential Revision: https://secure.phabricator.com/D5494
This commit is contained in:
@@ -114,6 +114,17 @@ final class PhrequentUserTimeQuery extends PhabricatorOffsetPagedQuery {
|
||||
return $count['N'] > 0;
|
||||
}
|
||||
|
||||
public static function loadUserStack(PhabricatorUser $user) {
|
||||
if (!$user->isLoggedIn()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
return id(new PhrequentUserTime())->loadAllWhere(
|
||||
'userPHID = %s AND dateEnded IS NULL
|
||||
ORDER BY dateStarted DESC, id DESC',
|
||||
$user->getPHID());
|
||||
}
|
||||
|
||||
public static function getTotalTimeSpentOnObject($phid) {
|
||||
$usertime_dao = new PhrequentUserTime();
|
||||
$conn = $usertime_dao->establishConnection('r');
|
||||
|
||||
Reference in New Issue
Block a user