• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

PukiWiki


Commit MetaInfo

Revisão2ec8d297ee2528b4d193f03564b6d06631364271 (tree)
Hora2016-02-07 10:04:51
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Mensagem de Log

BugTrack2/376 Keep prev spec: return value of AttachFile::getstatus

* Return TRUE if a target file exists
* Return FAlSE if not exists
* Read status file(.log) regardless of active file existance

Mudança Sumário

Diff

--- a/plugin/attach.inc.php
+++ b/plugin/attach.inc.php
@@ -1,7 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
3-// $Id: attach.inc.php,v 1.92 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C)
3+// attach.inc.php
4+// Copyright
55 // 2003-2016 PukiWiki Development Team
66 // 2002-2003 PANDA <panda@arino.jp> http://home.arino.jp/
77 // 2002 Y.MASUI <masui@hisec.co.jp> http://masui.net/pukiwiki/
@@ -453,8 +453,6 @@ class AttachFile
453453 // ファイル情報取得
454454 function getstatus()
455455 {
456- if (! file_exists($this->logname)) return FALSE;
457-
458456 // ログファイル取得
459457 if (file_exists($this->logname)) {
460458 $data = file($this->logname);
@@ -463,11 +461,11 @@ class AttachFile
463461 }
464462 $this->status['count'] = explode(',', $this->status['count']);
465463 }
464+ if (! $this->exist) return FALSE;
466465 $this->time_str = get_date('Y/m/d H:i:s', $this->time);
467466 $this->size = filesize($this->filename);
468467 $this->size_str = sprintf('%01.1f', round($this->size/1024, 1)) . 'KB';
469468 $this->type = attach_mime_content_type($this->filename, $this->file);
470-
471469 return TRUE;
472470 }
473471