Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/controller/PhrictionHistoryController.php
Show All 23 Lines | $document = id(new PhrictionDocumentQuery()) | ||||
->needContent(true) | ->needContent(true) | ||||
->executeOne(); | ->executeOne(); | ||||
if (!$document) { | if (!$document) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$current = $document->getContent(); | $current = $document->getContent(); | ||||
$pager = new AphrontPagerView(); | $pager = new PHUIPagerView(); | ||||
$pager->setOffset($request->getInt('page')); | $pager->setOffset($request->getInt('page')); | ||||
$pager->setURI($request->getRequestURI(), 'page'); | $pager->setURI($request->getRequestURI(), 'page'); | ||||
$history = id(new PhrictionContent())->loadAllWhere( | $history = id(new PhrictionContent())->loadAllWhere( | ||||
'documentID = %d ORDER BY version DESC LIMIT %d, %d', | 'documentID = %d ORDER BY version DESC LIMIT %d, %d', | ||||
$document->getID(), | $document->getID(), | ||||
$pager->getOffset(), | $pager->getOffset(), | ||||
$pager->getPageSize() + 1); | $pager->getPageSize() + 1); | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |