예제 #1
0
 /**
  * @see	\wcf\page\IPage::show()
  */
 public function show()
 {
     parent::show();
     if (!$this->tiny && !$this->thumbnail) {
         // update download count
         $editor = new AttachmentEditor($this->attachment);
         $editor->update(array('downloads' => $this->attachment->downloads + 1, 'lastDownloadTime' => TIME_NOW));
     }
     // send file to client
     $this->fileReader->send();
     exit;
 }
 /**
  * @see	\wcf\page\IPage::show()
  */
 public function show()
 {
     parent::show();
     // update download counter
     if (!WCF::getUser()->userID || WCF::getUser()->userID != $this->entry->userID) {
         $editor = new EntryEditor($this->entry);
         $editor->updateCounters(array('downloads' => 1));
         $editor = new EntryFileEditor($this->file);
         $editor->updateCounters(array('downloads' => 1));
     }
     // send file to client
     $this->fileReader->send();
     exit;
 }
예제 #3
0
 /**
  * @see	\wcf\page\IPage::show()
  */
 public function show()
 {
     parent::show();
     $this->fileReader->send();
     exit;
 }