当前位置: 首页>>代码示例>>PHP>>正文


PHP ArchivedFile::getTimestamp方法代码示例

本文整理汇总了PHP中ArchivedFile::getTimestamp方法的典型用法代码示例。如果您正苦于以下问题:PHP ArchivedFile::getTimestamp方法的具体用法?PHP ArchivedFile::getTimestamp怎么用?PHP ArchivedFile::getTimestamp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ArchivedFile的用法示例。


在下文中一共展示了ArchivedFile::getTimestamp方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showFileConfirmationForm

 /**
  * Show a form confirming whether a tokenless user really wants to see a file
  * @param string $key
  */
 private function showFileConfirmationForm($key)
 {
     $out = $this->getOutput();
     $lang = $this->getLanguage();
     $user = $this->getUser();
     $file = new ArchivedFile($this->mTargetObj, '', $this->mFilename);
     $out->addWikiMsg('undelete-show-file-confirm', $this->mTargetObj->getText(), $lang->userDate($file->getTimestamp(), $user), $lang->userTime($file->getTimestamp(), $user));
     $out->addHTML(Xml::openElement('form', array('method' => 'POST', 'action' => $this->getPageTitle()->getLocalURL(array('target' => $this->mTarget, 'file' => $key, 'token' => $user->getEditToken($key))))) . Xml::submitButton($this->msg('undelete-show-file-submit')->text()) . '</form>');
 }
开发者ID:raymondzhangl,项目名称:mediawiki,代码行数:13,代码来源:SpecialUndelete.php

示例2: archivedfileLine

 /**
  * @param ArchivedFile $file
  * @returns string
  */
 private function archivedfileLine($file)
 {
     global $wgLang;
     $target = $this->page->getPrefixedText();
     $date = $wgLang->timeanddate($file->getTimestamp(), true);
     $undelete = SpecialPage::getTitleFor('Undelete');
     $pageLink = $this->skin->makeKnownLinkObj($undelete, $date, "target={$target}&file={$file->getKey()}");
     $del = '';
     if ($file->isDeleted(File::DELETED_FILE)) {
         $del = ' <tt>' . wfMsgHtml('deletedrev') . '</tt>';
     }
     $data = wfMsg('widthheight', $wgLang->formatNum($file->getWidth()), $wgLang->formatNum($file->getHeight())) . ' (' . wfMsgExt('nbytes', 'parsemag', $wgLang->formatNum($file->getSize())) . ')';
     $data = htmlspecialchars($data);
     return "<li> {$pageLink} " . $this->fileUserTools($file) . " {$data} " . $this->fileComment($file) . "{$del}</li>";
 }
开发者ID:ruizrube,项目名称:spdef,代码行数:19,代码来源:SpecialRevisiondelete.php

示例3: scrubVersion

 protected function scrubVersion(ArchivedFile $archivedFile)
 {
     $key = $archivedFile->getStorageKey();
     $name = $archivedFile->getName();
     $ts = $archivedFile->getTimestamp();
     $repo = RepoGroup::singleton()->getLocalRepo();
     $path = $repo->getZonePath('deleted') . '/' . $repo->getDeletedHashPath($key) . $key;
     if ($this->hasOption('delete')) {
         $status = $repo->getBackend()->delete(['src' => $path]);
         if ($status->isOK()) {
             $this->output("Deleted version '{$key}' ({$ts}) of file '{$name}'\n");
         } else {
             $this->output("Failed to delete version '{$key}' ({$ts}) of file '{$name}'\n");
             $this->output(print_r($status->getErrorsArray(), true));
         }
     } else {
         $this->output("Would delete version '{$key}' ({$ts}) of file '{$name}'\n");
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:19,代码来源:eraseArchivedFile.php

示例4: showFileConfirmationForm

 /**
  * Show a form confirming whether a tokenless user really wants to see a file
  */
 private function showFileConfirmationForm($key)
 {
     $file = new ArchivedFile($this->mTargetObj, '', $this->mFilename);
     $this->getOutput()->addWikiMsg('undelete-show-file-confirm', $this->mTargetObj->getText(), $this->getLang()->date($file->getTimestamp()), $this->getLang()->time($file->getTimestamp()));
     $this->getOutput()->addHTML(Xml::openElement('form', array('method' => 'POST', 'action' => $this->getTitle()->getLocalURL('target=' . urlencode($this->mTarget) . '&file=' . urlencode($key) . '&token=' . urlencode($this->getUser()->editToken($key))))) . Xml::submitButton(wfMsg('undelete-show-file-submit')) . '</form>');
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:9,代码来源:SpecialUndelete.php

示例5: showFileConfirmationForm

 /**
  * Show a form confirming whether a tokenless user really wants to see a file
  */
 private function showFileConfirmationForm($key)
 {
     global $wgOut, $wgUser, $wgLang;
     $file = new ArchivedFile($this->mTargetObj, '', $this->mFile);
     $wgOut->addWikiMsg('undelete-show-file-confirm', $this->mTargetObj->getText(), $wgLang->date($file->getTimestamp()), $wgLang->time($file->getTimestamp()));
     $wgOut->addHTML(Xml::openElement('form', array('method' => 'POST', 'action' => SpecialPage::getTitleFor('Undelete')->getLocalUrl('target=' . urlencode($this->mTarget) . '&file=' . urlencode($key) . '&token=' . urlencode($wgUser->editToken($key))))) . Xml::submitButton(wfMsg('undelete-show-file-submit')) . '</form>');
 }
开发者ID:rocLv,项目名称:conference,代码行数:10,代码来源:SpecialUndelete.php


注:本文中的ArchivedFile::getTimestamp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。