function count()
 {
     if ($this->revisionCounter === null) {
         $this->getId();
         $waIter =& PHPWikiAttachmentRevision::getRevisionIterator($this->gid, $this->id);
         $this->revisionCounter = $waIter->count();
     }
     return $this->revisionCounter;
 }
    /**
     * @access public
     */
    function browseAttachment()
    {
        $attachmentId = (int) $_GET['id'];
        $wa = new PHPWikiAttachment($this->gid);
        $wa->initWithId($attachmentId);
        echo $GLOBALS['Language']->getText('plugin_phpwiki_views_wkserviews', 'browse_attachment_title', array($this->wikiname, $wa->getFilename()));
        // if($wari->exist()) {
        print html_build_list_table_top(array($GLOBALS['Language']->getText('plugin_phpwiki_views_wkserviews', 'attachment_revision'), $GLOBALS['Language']->getText('plugin_phpwiki_views_wkserviews', 'attachment_date'), $GLOBALS['Language']->getText('plugin_phpwiki_views_wkserviews', 'attachment_author'), $GLOBALS['Language']->getText('plugin_phpwiki_views_wkserviews', 'attachment_size')));
        $wari =& PHPWikiAttachmentRevision::getRevisionIterator($this->gid, $attachmentId);
        $wari->rewind();
        while ($wari->valid()) {
            $war =& $wari->current();
            print '
             <tr>
	       <td><a href="' . PHPWIKI_PLUGIN_BASE_URL . '/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('plugin_phpwiki_views_wkserviews', 'back_admin') . '</a></p>' . "\n";
    }