protected function getPagesForRevertById($oPageGroup, $nRevToChangeId) { //simulate the revert $aoPagesForRevertTmp = AnwStorage::getPageGroupPreviousArchives($nRevToChangeId, $oPageGroup, false); //the changeId is excluded $aoPagesForRevertById = array(); foreach ($aoPagesForRevertTmp as $oPageRev) { // check permission... //TODO people may not understand if they get "permission denied" error, // due to missing permissions on some translations $oPageRev->checkGlobalAndViewActionAllowed($this->getName()); $aoPagesForRevertById[$oPageRev->getId()] = $oPageRev; } unset($aoPagesForRevertTmp); return $aoPagesForRevertById; }