/** * @access public */ function browseAttachment() { $attachmentId = (int) $_GET['id']; $wa = new WikiAttachment($this->gid); $wa->initWithId($attachmentId); echo $GLOBALS['Language']->getText('wiki_views_wkserviews', 'browse_attachment_title', array($this->wikiname, $wa->getFilename())); // if($wari->exist()) { print html_build_list_table_top(array($GLOBALS['Language']->getText('wiki_views_wkserviews', 'attachment_revision'), $GLOBALS['Language']->getText('wiki_views_wkserviews', 'attachment_date'), $GLOBALS['Language']->getText('wiki_views_wkserviews', 'attachment_author'), $GLOBALS['Language']->getText('wiki_views_wkserviews', 'attachment_size'))); $wari =& WikiAttachmentRevision::getRevisionIterator($this->gid, $attachmentId); $wari->rewind(); while ($wari->valid()) { $war =& $wari->current(); print ' <tr> <td><a href="/wiki/uploads/' . $this->gid . '/' . $wa->getFilename() . '/' . ($war->getRevision() + 1) . '">' . ($war->getRevision() + 1) . '</a></td> <td>' . strftime("%e %b %Y %H:%M", $war->getDate()) . '</td> <td><a href="/users/' . user_getname($war->getOwnerId()) . '/">' . user_getname($war->getOwnerId()) . '</td> <td>' . $war->getSize() . '</td> </tr>'; $wari->next(); } print '</table>'; // } // else { // print 'not found'; // } print '<hr/><p><a href="' . $this->wikiAdminLink . '&view=wikiAttachments">' . $GLOBALS['Language']->getText('wiki_views_wkserviews', 'back_admin') . '</a></p>' . "\n"; }
function count() { if ($this->revisionCounter === null) { $this->getId(); $waIter =& WikiAttachmentRevision::getRevisionIterator($this->gid, $this->id); $this->revisionCounter = $waIter->count(); } return $this->revisionCounter; }