Browse Source

remove doc create time from views

master
filesite 4 weeks ago
parent
commit
0c4ea178a9
  1. 5
      themes/manual/controller/SiteController.php
  2. 5
      themes/manual/controller/ViewController.php
  3. 3
      themes/manual/views/site/index.php
  4. 3
      themes/manual/views/view/index.php

5
themes/manual/controller/SiteController.php

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
*/
require_once __DIR__ . '/../../../lib/DirScanner.php';
require_once __DIR__ . '/../../../plugins/Parsedown.php';
require_once __DIR__ . '/../../../plugins/Common.php';
Class SiteController extends Controller {
@ -28,8 +29,8 @@ Class SiteController extends Controller { @@ -28,8 +29,8 @@ Class SiteController extends Controller {
$html = $Parsedown->text($content);
$html = $scanner->fixMDUrls($readmeFile['realpath'], $html);
$publishTime = min($readmeFile['fstat']['ctime'], $readmeFile['fstat']['atime']);
$updateTime = $readmeFile['fstat']['mtime'];
$publishTime = Common::getFileCreateTime($readmeFile);
$updateTime = $readmeFile['fstat']['atime'];
if (!empty($readmeFile['author'])) {
$author = $readmeFile['author'];
}

5
themes/manual/controller/ViewController.php

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
*/
require_once __DIR__ . '/../../../lib/DirScanner.php';
require_once __DIR__ . '/../../../plugins/Parsedown.php';
require_once __DIR__ . '/../../../plugins/Common.php';
Class ViewController extends Controller {
@ -34,8 +35,8 @@ Class ViewController extends Controller { @@ -34,8 +35,8 @@ Class ViewController extends Controller {
$html = $Parsedown->text($content);
$html = $scanner->fixMDUrls($readmeFile['realpath'], $html);
$publishTime = min($readmeFile['fstat']['ctime'], $readmeFile['fstat']['atime']);
$updateTime = $readmeFile['fstat']['mtime'];
$publishTime = Common::getFileCreateTime($readmeFile);
$updateTime = $readmeFile['fstat']['atime'];
if (!empty($readmeFile['author'])) {
$author = $readmeFile['author'];
}

3
themes/manual/views/site/index.php

@ -18,8 +18,7 @@ eof; @@ -18,8 +18,7 @@ eof;
eof;
}
?>
发布:<small><?php echo date('Y-m-d H:i:s', $viewData['publishTime']); ?></small>
<br>修改:<small><?php echo date('Y-m-d H:i:s', $viewData['updateTime']); ?></small>
修改:<small><?php echo date('Y-m-d H:i:s', $viewData['updateTime']); ?></small>
</div>
</div>

3
themes/manual/views/view/index.php

@ -19,8 +19,7 @@ eof; @@ -19,8 +19,7 @@ eof;
eof;
}
?>
发布:<small><?php echo date('Y-m-d H:i:s', $viewData['publishTime']); ?></small>
<br>修改:<small><?php echo date('Y-m-d H:i:s', $viewData['updateTime']); ?></small>
修改:<small><?php echo date('Y-m-d H:i:s', $viewData['updateTime']); ?></small>
</div>
</div>

Loading…
Cancel
Save