• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wfReportTime函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wfReportTime函数的典型用法代码示例。如果您正苦于以下问题:PHP wfReportTime函数的具体用法?PHP wfReportTime怎么用?PHP wfReportTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: reject

 function reject()
 {
     global $wgOut, $wgUser;
     $dbw = wfGetDB(DB_MASTER);
     $dbw->insert('rejected_email_links', array('rel_text' => "REJECTED\nuserid: " . $wgUser->getID() . "\n" . wfReportTime() . "\nReferer:" . $_SERVER["HTTP_REFERER"] . "\n" . wfGetIP() . "\n" . print_r($_POST, true)), __METHOD__);
     //be coy
     $this->thanks();
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:8,代码来源:EmailLink.body.php


示例2: prepareQuickTemplate


//.........这里部分代码省略.........
         // escape single quotes
         $attrs = " lang=\"{$escUserlang}\" dir=\"{$escUserdir}\"";
         $tpl->set('userlangattributes', $attrs);
     }
     $tpl->set('newtalk', $this->getNewtalks());
     $tpl->set('logo', $this->logoText());
     $tpl->set('copyright', false);
     // No longer used
     $tpl->set('viewcount', false);
     $tpl->set('lastmod', false);
     $tpl->set('credits', false);
     $tpl->set('numberofwatchingusers', false);
     if ($out->isArticle() && $title->exists()) {
         if ($this->isRevisionCurrent()) {
             if ($wgMaxCredits != 0) {
                 $tpl->set('credits', Action::factory('credits', $this->getWikiPage(), $this->getContext())->getCredits($wgMaxCredits, $wgShowCreditsIfMax));
             } else {
                 $tpl->set('lastmod', $this->lastModified());
             }
         }
         $tpl->set('copyright', $this->getCopyright());
     }
     $tpl->set('copyrightico', $this->getCopyrightIcon());
     $tpl->set('poweredbyico', $this->getPoweredBy());
     $tpl->set('disclaimer', $this->disclaimerLink());
     $tpl->set('privacy', $this->privacyLink());
     $tpl->set('about', $this->aboutLink());
     $tpl->set('footerlinks', array('info' => array('lastmod', 'numberofwatchingusers', 'credits', 'copyright'), 'places' => array('privacy', 'about', 'disclaimer')));
     global $wgFooterIcons;
     $tpl->set('footericons', $wgFooterIcons);
     foreach ($tpl->data['footericons'] as $footerIconsKey => &$footerIconsBlock) {
         if (count($footerIconsBlock) > 0) {
             foreach ($footerIconsBlock as &$footerIcon) {
                 if (isset($footerIcon['src'])) {
                     if (!isset($footerIcon['width'])) {
                         $footerIcon['width'] = 88;
                     }
                     if (!isset($footerIcon['height'])) {
                         $footerIcon['height'] = 31;
                     }
                 }
             }
         } else {
             unset($tpl->data['footericons'][$footerIconsKey]);
         }
     }
     $tpl->set('indicators', $out->getIndicators());
     $tpl->set('sitenotice', $this->getSiteNotice());
     $tpl->set('bottomscripts', $this->bottomScripts());
     $tpl->set('printfooter', $this->printSource());
     # An ID that includes the actual body text; without categories, contentSub, ...
     $realBodyAttribs = array('id' => 'mw-content-text');
     # Add a mw-content-ltr/rtl class to be able to style based on text direction
     # when the content is different from the UI language, i.e.:
     # not for special pages or file pages AND only when viewing AND if the page exists
     # (or is in MW namespace, because that has default content)
     if (!in_array($title->getNamespace(), array(NS_SPECIAL, NS_FILE)) && Action::getActionName($this) === 'view' && ($title->exists() || $title->getNamespace() == NS_MEDIAWIKI)) {
         $pageLang = $title->getPageViewLanguage();
         $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
         $realBodyAttribs['dir'] = $pageLang->getDir();
         $realBodyAttribs['class'] = 'mw-content-' . $pageLang->getDir();
     }
     $out->mBodytext = Html::rawElement('div', $realBodyAttribs, $out->mBodytext);
     $tpl->setRef('bodytext', $out->mBodytext);
     $language_urls = $this->getLanguages();
     if (count($language_urls)) {
         $tpl->setRef('language_urls', $language_urls);
     } else {
         $tpl->set('language_urls', false);
     }
     # Personal toolbar
     $tpl->set('personal_urls', $this->buildPersonalUrls());
     $content_navigation = $this->buildContentNavigationUrls();
     $content_actions = $this->buildContentActionUrls($content_navigation);
     $tpl->setRef('content_navigation', $content_navigation);
     $tpl->setRef('content_actions', $content_actions);
     $tpl->set('sidebar', $this->buildSidebar());
     $tpl->set('nav_urls', $this->buildNavUrls());
     // Set the head scripts near the end, in case the above actions resulted in added scripts
     $tpl->set('headelement', $out->headElement($this));
     $tpl->set('debug', '');
     $tpl->set('debughtml', $this->generateDebugHTML());
     $tpl->set('reporttime', wfReportTime());
     // original version by hansm
     if (!Hooks::run('SkinTemplateOutputPageBeforeExec', array(&$this, &$tpl))) {
         wfDebug(__METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!\n");
     }
     // Set the bodytext to another key so that skins can just output it on its own
     // and output printfooter and debughtml separately
     $tpl->set('bodycontent', $tpl->data['bodytext']);
     // Append printfooter and debughtml onto bodytext so that skins that
     // were already using bodytext before they were split out don't suddenly
     // start not outputting information.
     $tpl->data['bodytext'] .= Html::rawElement('div', array('class' => 'printfooter'), "\n{$tpl->data['printfooter']}") . "\n";
     $tpl->data['bodytext'] .= $tpl->data['debughtml'];
     // allow extensions adding stuff after the page content.
     // See Skin::afterContentHook() for further documentation.
     $tpl->set('dataAfterContent', $this->afterContentHook());
     return $tpl;
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:101,代码来源:SkinTemplate.php


示例3: reportTime

 /**
  * Deprecated, use wfReportTime() instead.
  * @return string
  * @deprecated
  */
 public function reportTime()
 {
     wfDeprecated(__METHOD__);
     $time = wfReportTime();
     return $time;
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:11,代码来源:OutputPage.php


示例4: executeActionWithErrorHandling

 /**
  * Execute an action, and in case of an error, erase whatever partial results
  * have been accumulated, and replace it with an error message and a help screen.
  */
 protected function executeActionWithErrorHandling()
 {
     // In case an error occurs during data output,
     // clear the output buffer and print just the error information
     ob_start();
     try {
         $this->executeAction();
     } catch (Exception $e) {
         // Log it
         if ($e instanceof MWException) {
             wfDebugLog('exception', $e->getLogMessage());
         }
         //
         // Handle any kind of exception by outputing properly formatted error message.
         // If this fails, an unhandled exception should be thrown so that global error
         // handler will process and log it.
         //
         $errCode = $this->substituteResultWithError($e);
         // Error results should not be cached
         $this->setCacheMaxAge(0);
         $headerStr = 'MediaWiki-API-Error: ' . $errCode;
         if ($e->getCode() === 0) {
             header($headerStr);
         } else {
             header($headerStr, true, $e->getCode());
         }
         // Reset and print just the error message
         ob_clean();
         // If the error occured during printing, do a printer->profileOut()
         $this->mPrinter->safeProfileOut();
         $this->printResult(true);
     }
     if ($this->mSquidMaxage == -1) {
         # Nobody called setCacheMaxAge(), use the (s)maxage parameters
         $smaxage = $this->getParameter('smaxage');
         $maxage = $this->getParameter('maxage');
     } else {
         $smaxage = $maxage = $this->mSquidMaxage;
     }
     // Set the cache expiration at the last moment, as any errors may change the expiration.
     // if $this->mSquidMaxage == 0, the expiry time is set to the first second of unix epoch
     $exp = min($smaxage, $maxage);
     $expires = $exp == 0 ? 1 : time() + $exp;
     header('Expires: ' . wfTimestamp(TS_RFC2822, $expires));
     header('Cache-Control: s-maxage=' . $smaxage . ', must-revalidate, max-age=' . $maxage);
     if ($this->mPrinter->getIsHtml()) {
         echo wfReportTime();
     }
     ob_end_flush();
 }
开发者ID:ui-libraries,项目名称:TIRW,代码行数:54,代码来源:ApiMain.php


示例5: outputPage


//.........这里部分代码省略.........
     foreach ($tpl->data['footericons'] as $footerIconsKey => &$footerIconsBlock) {
         if (count($footerIconsBlock) > 0) {
             foreach ($footerIconsBlock as &$footerIcon) {
                 if (isset($footerIcon['src'])) {
                     if (!isset($footerIcon['width'])) {
                         $footerIcon['width'] = 88;
                     }
                     if (!isset($footerIcon['height'])) {
                         $footerIcon['height'] = 31;
                     }
                 }
             }
         } else {
             unset($tpl->data['footericons'][$footerIconsKey]);
         }
     }
     if ($wgDebugComments) {
         $tpl->setRef('debug', $out->mDebugtext);
     } else {
         $tpl->set('debug', '');
     }
     $tpl->set('sitenotice', $this->getSiteNotice());
     $tpl->set('bottomscripts', $this->bottomScripts());
     $tpl->set('printfooter', $this->printSource());
     # An ID that includes the actual body text; without categories, contentSub, ...
     $realBodyAttribs = array('id' => 'mw-content-text');
     # Add a mw-content-ltr/rtl class to be able to style based on text direction
     # when the content is different from the UI language, i.e.:
     # not for special pages or file pages AND only when viewing AND if the page exists
     # (or is in MW namespace, because that has default content)
     if (!in_array($title->getNamespace(), array(NS_SPECIAL, NS_FILE)) && in_array($request->getVal('action', 'view'), array('view', 'historysubmit')) && ($title->exists() || $title->getNamespace() == NS_MEDIAWIKI)) {
         $pageLang = $title->getPageLanguage();
         $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
         $realBodyAttribs['dir'] = $pageLang->getDir();
         $realBodyAttribs['class'] = 'mw-content-' . $pageLang->getDir();
     }
     $out->mBodytext = Html::rawElement('div', $realBodyAttribs, $out->mBodytext);
     $tpl->setRef('bodytext', $out->mBodytext);
     # Language links
     $language_urls = array();
     if (!$wgHideInterlanguageLinks) {
         foreach ($out->getLanguageLinks() as $l) {
             $tmp = explode(':', $l, 2);
             $class = 'interwiki-' . $tmp[0];
             unset($tmp);
             $nt = Title::newFromText($l);
             if ($nt) {
                 $language_urls[] = array('href' => $nt->getFullURL(), 'text' => $wgContLang->getLanguageName($nt->getInterwiki()) != '' ? $wgContLang->getLanguageName($nt->getInterwiki()) : $l, 'title' => $nt->getText(), 'class' => $class, 'lang' => $nt->getInterwiki(), 'hreflang' => $nt->getInterwiki());
             }
         }
     }
     if (count($language_urls)) {
         $tpl->setRef('language_urls', $language_urls);
     } else {
         $tpl->set('language_urls', false);
     }
     wfProfileOut(__METHOD__ . '-stuff4');
     wfProfileIn(__METHOD__ . '-stuff5');
     # Personal toolbar
     $tpl->set('personal_urls', $this->buildPersonalUrls());
     $content_navigation = $this->buildContentNavigationUrls();
     $content_actions = $this->buildContentActionUrls($content_navigation);
     $tpl->setRef('content_navigation', $content_navigation);
     $tpl->setRef('content_actions', $content_actions);
     $tpl->set('sidebar', $this->buildSidebar());
     $tpl->set('nav_urls', $this->buildNavUrls());
     // Set the head scripts near the end, in case the above actions resulted in added scripts
     if ($this->useHeadElement) {
         $tpl->set('headelement', $out->headElement($this));
     } else {
         $tpl->set('headscripts', $out->getHeadScripts() . $out->getHeadItems());
     }
     $tpl->set('debughtml', $this->generateDebugHTML());
     $tpl->set('reporttime', wfReportTime());
     // original version by hansm
     if (!wfRunHooks('SkinTemplateOutputPageBeforeExec', array(&$this, &$tpl))) {
         wfDebug(__METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!\n");
     }
     // Set the bodytext to another key so that skins can just output it on it's own
     // and output printfooter and debughtml separately
     $tpl->set('bodycontent', $tpl->data['bodytext']);
     // Append printfooter and debughtml onto bodytext so that skins that were already
     // using bodytext before they were split out don't suddenly start not outputting information
     $tpl->data['bodytext'] .= Html::rawElement('div', array('class' => 'printfooter'), "\n{$tpl->data['printfooter']}") . "\n";
     $tpl->data['bodytext'] .= $tpl->data['debughtml'];
     // allow extensions adding stuff after the page content.
     // See Skin::afterContentHook() for further documentation.
     $tpl->set('dataAfterContent', $this->afterContentHook());
     wfProfileOut(__METHOD__ . '-stuff5');
     // execute template
     wfProfileIn(__METHOD__ . '-execute');
     $res = $tpl->execute();
     wfProfileOut(__METHOD__ . '-execute');
     // result may be an error
     $this->printOrError($res);
     if ($oldContext) {
         $this->setContext($oldContext);
     }
     wfProfileOut(__METHOD__);
 }
开发者ID:laiello,项目名称:media-wiki-law,代码行数:101,代码来源:SkinTemplate.php


示例6: wfReportTime

<?php

echo wfReportTime();
开发者ID:biribogos,项目名称:wikihow-src,代码行数:3,代码来源:footer-mqg.tmpl.php


示例7: reportTime

 /**
  * Returns a HTML comment with the elapsed time since request.
  * This method has no side effects.
  * Use wfReportTime() instead.
  * @return string
  * @deprecated
  */
 function reportTime()
 {
     $time = wfReportTime();
     return $time;
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:12,代码来源:OutputPage.php


示例8: outputPage


//.........这里部分代码省略.........
             $dbr = wfGetDB(DB_SLAVE);
             $watchlist = $dbr->tableName('watchlist');
             $res = $dbr->select('watchlist', array('COUNT(*) AS n'), array('wl_title' => $dbr->strencode($this->mTitle->getDBkey()), 'wl_namespace' => $this->mTitle->getNamespace()), __METHOD__);
             $x = $dbr->fetchObject($res);
             $numberofwatchingusers = $x->n;
             if ($numberofwatchingusers > 0) {
                 $tpl->set('numberofwatchingusers', wfMsgExt('number_of_watching_users_pageview', array('parseinline'), $wgLang->formatNum($numberofwatchingusers)));
             } else {
                 $tpl->set('numberofwatchingusers', false);
             }
         } else {
             $tpl->set('numberofwatchingusers', false);
         }
         $tpl->set('copyright', $this->getCopyright());
         $this->credits = false;
         if ($wgMaxCredits != 0) {
             $this->credits = Credits::getCredits($wgArticle, $wgMaxCredits, $wgShowCreditsIfMax);
         } else {
             $tpl->set('lastmod', $this->lastModified());
         }
         $tpl->setRef('credits', $this->credits);
     } elseif (isset($oldid) && !isset($diff)) {
         $tpl->set('copyright', $this->getCopyright());
         $tpl->set('viewcount', false);
         $tpl->set('lastmod', false);
         $tpl->set('credits', false);
         $tpl->set('numberofwatchingusers', false);
     } else {
         $tpl->set('copyright', false);
         $tpl->set('viewcount', false);
         $tpl->set('lastmod', false);
         $tpl->set('credits', false);
         $tpl->set('numberofwatchingusers', false);
     }
     wfProfileOut(__METHOD__ . '-stuff3');
     wfProfileIn(__METHOD__ . '-stuff4');
     $tpl->set('copyrightico', $this->getCopyrightIcon());
     $tpl->set('poweredbyico', $this->getPoweredBy());
     $tpl->set('disclaimer', $this->disclaimerLink());
     $tpl->set('privacy', $this->privacyLink());
     $tpl->set('about', $this->aboutLink());
     if ($wgDebugComments) {
         $tpl->setRef('debug', $out->mDebugtext);
     } else {
         $tpl->set('debug', '');
     }
     $tpl->set('reporttime', wfReportTime());
     $tpl->set('sitenotice', wfGetSiteNotice());
     $tpl->set('bottomscripts', $this->bottomScripts());
     $printfooter = "<div class=\"printfooter\">\n" . $this->printSource() . "</div>\n";
     $out->mBodytext .= $printfooter . $this->generateDebugHTML();
     $tpl->setRef('bodytext', $out->mBodytext);
     # Language links
     $language_urls = array();
     if (!$wgHideInterlanguageLinks) {
         foreach ($out->getLanguageLinks() as $l) {
             $tmp = explode(':', $l, 2);
             $class = 'interwiki-' . $tmp[0];
             unset($tmp);
             $nt = Title::newFromText($l);
             if ($nt) {
                 $language_urls[] = array('href' => $nt->getFullURL(), 'text' => $wgContLang->getLanguageName($nt->getInterwiki()) != '' ? $wgContLang->getLanguageName($nt->getInterwiki()) : $l, 'class' => $class);
             }
         }
     }
     if (count($language_urls)) {
         $tpl->setRef('language_urls', $language_urls);
     } else {
         $tpl->set('language_urls', false);
     }
     wfProfileOut(__METHOD__ . '-stuff4');
     wfProfileIn(__METHOD__ . '-stuff5');
     # Personal toolbar
     $tpl->set('personal_urls', $this->buildPersonalUrls());
     $content_actions = $this->buildContentActionUrls();
     $tpl->setRef('content_actions', $content_actions);
     $tpl->set('sidebar', $this->buildSidebar());
     $tpl->set('nav_urls', $this->buildNavUrls());
     // Set the head scripts near the end, in case the above actions resulted in added scripts
     if ($this->useHeadElement) {
         $tpl->set('headelement', $out->headElement($this));
     } else {
         $tpl->set('headscripts', $out->getScript());
     }
     // original version by hansm
     if (!wfRunHooks('SkinTemplateOutputPageBeforeExec', array(&$this, &$tpl))) {
         wfDebug(__METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!\n");
     }
     // allow extensions adding stuff after the page content.
     // See Skin::afterContentHook() for further documentation.
     $tpl->set('dataAfterContent', $this->afterContentHook());
     wfProfileOut(__METHOD__ . '-stuff5');
     // execute template
     wfProfileIn(__METHOD__ . '-execute');
     $res = $tpl->execute();
     wfProfileOut(__METHOD__ . '-execute');
     // result may be an error
     $this->printOrError($res);
     wfProfileOut(__METHOD__);
 }
开发者ID:rocLv,项目名称:conference,代码行数:101,代码来源:SkinTemplate.php


示例9: outputPage


//.........这里部分代码省略.........
         if ($wgPageShowWatchingUsers) {
             $dbr = wfGetDB(DB_SLAVE);
             $watchlist = $dbr->tableName('watchlist');
             $sql = "SELECT COUNT(*) AS n FROM {$watchlist}\n\t\t\t\t\tWHERE wl_title='" . $dbr->strencode($this->mTitle->getDBkey()) . "' AND  wl_namespace=" . $this->mTitle->getNamespace();
             $res = $dbr->query($sql, 'SkinTemplate::outputPage');
             $x = $dbr->fetchObject($res);
             $numberofwatchingusers = $x->n;
             if ($numberofwatchingusers > 0) {
                 $tpl->set('numberofwatchingusers', wfMsgExt('number_of_watching_users_pageview', array('parseinline'), $wgLang->formatNum($numberofwatchingusers)));
             } else {
                 $tpl->set('numberofwatchingusers', false);
             }
         } else {
             $tpl->set('numberofwatchingusers', false);
         }
         $tpl->set('copyright', $this->getCopyright());
         $this->credits = false;
         if ($wgMaxCredits != 0) {
             $this->credits = Credits::getCredits($wgArticle, $wgMaxCredits, $wgShowCreditsIfMax);
         } else {
             $tpl->set('lastmod', $this->lastModified());
         }
         $tpl->setRef('credits', $this->credits);
     } elseif (isset($oldid) && !isset($diff)) {
         $tpl->set('copyright', $this->getCopyright());
         $tpl->set('viewcount', false);
         $tpl->set('lastmod', false);
         $tpl->set('credits', false);
         $tpl->set('numberofwatchingusers', false);
     } else {
         $tpl->set('copyright', false);
         $tpl->set('viewcount', false);
         $tpl->set('lastmod', false);
         $tpl->set('credits', false);
         $tpl->set('numberofwatchingusers', false);
     }
     wfProfileOut(__METHOD__ . "-stuff3");
     wfProfileIn(__METHOD__ . "-stuff4");
     $tpl->set('copyrightico', $this->getCopyrightIcon());
     $tpl->set('poweredbyico', $this->getPoweredBy());
     $tpl->set('disclaimer', $this->disclaimerLink());
     $tpl->set('privacy', $this->privacyLink());
     $tpl->set('about', $this->aboutLink());
     $tpl->setRef('debug', $out->mDebugtext);
     $tpl->set('reporttime', wfReportTime());
     $tpl->set('sitenotice', wfGetSiteNotice());
     $tpl->set('bottomscripts', $this->bottomScripts());
     $printfooter = "<div class=\"printfooter\">\n" . $this->printSource() . "</div>\n";
     $out->mBodytext .= $printfooter;
     $tpl->setRef('bodytext', $out->mBodytext);
     # Language links
     $language_urls = array();
     if (!$wgHideInterlanguageLinks) {
         foreach ($out->getLanguageLinks() as $l) {
             $tmp = explode(':', $l, 2);
             $class = 'interwiki-' . $tmp[0];
             unset($tmp);
             $nt = Title::newFromText($l);
             if ($nt) {
                 $language_urls[] = array('href' => $nt->getFullURL(), 'text' => $wgContLang->getLanguageName($nt->getInterwiki()) != '' ? $wgContLang->getLanguageName($nt->getInterwiki()) : $l, 'class' => $class);
             }
         }
     }
     if (count($language_urls)) {
         $tpl->setRef('language_urls', $language_urls);
     } else {
         $tpl->set('language_urls', false);
     }
     wfProfileOut(__METHOD__ . "-stuff4");
     wfProfileIn(__METHOD__ . "-stuff5");
     # Personal toolbar
     $tpl->set('personal_urls', $this->buildPersonalUrls());
     $content_actions = $this->buildContentActionUrls();
     $tpl->setRef('content_actions', $content_actions);
     // XXX: attach this from javascript, same with section editing
     if ($this->iseditable && $wgUser->getOption("editondblclick")) {
         $encEditUrl = Xml::escapeJsString($this->mTitle->getLocalUrl($this->editUrlOptions()));
         $tpl->set('body_ondblclick', 'document.location = "' . $encEditUrl . '";');
     } else {
         $tpl->set('body_ondblclick', false);
     }
     $tpl->set('body_onload', false);
     $tpl->set('sidebar', $this->buildSidebar());
     $tpl->set('nav_urls', $this->buildNavUrls());
     // original version by hansm
     if (!wfRunHooks('SkinTemplateOutputPageBeforeExec', array(&$this, &$tpl))) {
         wfDebug(__METHOD__ . ': Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!');
     }
     // allow extensions adding stuff after the page content.
     // See Skin::afterContentHook() for further documentation.
     $tpl->set('dataAfterContent', $this->afterContentHook());
     wfProfileOut(__METHOD__ . "-stuff5");
     // execute template
     wfProfileIn(__METHOD__ . "-execute");
     $res = $tpl->execute();
     wfProfileOut(__METHOD__ . "-execute");
     // result may be an error
     $this->printOrError($res);
     wfProfileOut(__METHOD__);
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:101,代码来源:SkinTemplate.php


示例10: execute


//.........这里部分代码省略.........
		<?php 
        if ($wgLanguageCode == 'en' && !$isLoggedIn && class_exists('GoogSearch')) {
            ?>
			<?php 
            echo GoogSearch::getSearchBoxJS();
            ?>
		<?php 
        }
        ?>

<script type="text/javascript">
	(function ($) {
		$(document).ready(function() {
			WH.addScrollEffectToTOC();
		});

		$(window).load(function() {
			if ($('.twitter-share-button').length && (!$.browser.msie || $.browser.version > 7)) {

				$.getScript("https://platform.twitter.com/widgets.js", function() {
					twttr.events.bind('tweet', function(event) {
						if (event) {
							var targetUrl;
							if (event.target && event.target.nodeName == 'IFRAME') {
								targetUrl = extractParamFromUri(event.target.src, 'url');
							}
							_gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
						}
					});

				});
			}

			if (isiPhone < 0 && isiPad < 0 && $('.gplus1_button').length) {
				WH.setGooglePlusOneLangCode();
				var node2 = document.createElement('script');
				node2.type = 'text/javascript';
				node2.async = true;
				node2.src = 'http://apis.google.com/js/plusone.js';
				$('body').append(node2);
			}
			if (typeof WH.FB != 'undefined') WH.FB.init('new');
			if (typeof WH.GP != 'undefined') WH.GP.init();

			if ($('#pinterest').length) {
				var node3 = document.createElement('script');
				node3.type = 'text/javascript';
				node3.async = true;
				node3.src = 'http://assets.pinterest.com/js/pinit.js';
				$('body').append(node3);
			}

			if (typeof WH.imageFeedback != 'undefined') {
				WH.imageFeedback();
			}
			if (typeof WH.uciFeedback != 'undefined') {
				WH.uciFeedback();
			}
		});
	})(jQuery);
</script>
<?php 
        //Temporarily taking down Jane
        /*
        			var r = Math.random();
        			if(r <= .05) {
        				$('#starter_ad').show();
        			}*/
        if ($showStaffStats) {
            ?>
	<?php 
            echo Pagestats::getJSsnippet("article");
        }
        echo $wgOut->getBottomScripts();
        ?>

<?php 
        if (class_exists('GoodRevision')) {
            ?>
	<?php 
            $grevid = $wgTitle ? GoodRevision::getUsedRev($wgTitle->getArticleID()) : '';
            $title = $this->getSkin()->getContext()->getTitle();
            $latestRev = $title->getNamespace() == NS_MAIN ? $title->getLatestRevID() : '';
            ?>
	<!-- shown patrolled revid=<?php 
            echo $grevid;
            ?>
, latest=<?php 
            echo $latestRev;
            ?>
 -->
<?php 
        }
        echo wfReportTime();
        $this->printTrail();
        ?>
</body>
</html>
<?php 
    }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:101,代码来源:WikiHowSkin.php


示例11: executeActionWithErrorHandling

 /**
  * Execute an action, and in case of an error, erase whatever partial results
  * have been accumulated, and replace it with an error message and a help screen.
  */
 protected function executeActionWithErrorHandling()
 {
     // Verify the CORS header before executing the action
     if (!$this->handleCORS()) {
         // handleCORS() has sent a 403, abort
         return;
     }
     // Exit here if the request method was OPTIONS
     // (assume there will be a followup GET or POST)
     if ($this->getRequest()->getMethod() === 'OPTIONS') {
         return;
     }
     // In case an error occurs during data output,
     // clear the output buffer and print just the error information
     ob_start();
     $t = microtime(true);
     try {
         $this->executeAction();
     } catch (Exception $e) {
         $this->handleException($e);
     }
     // Log the request whether or not there was an error
     $this->logRequest(microtime(true) - $t);
     // Send cache headers after any code which might generate an error, to
     // avoid sending public cache headers for errors.
     $this->sendCacheHeaders();
     if ($this->mPrinter->getIsHtml() && !$this->mPrinter->isDisabled()) {
         echo wfReportTime();
     }
     ob_end_flush();
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:35,代码来源:ApiMain.php


示例12: function

		<script src="<?php 
    echo $wg->ResourceBasePath;
    ?>
/resources/wikia/libraries/html5/html5.min.js"></script>
	<![endif]-->

	<!-- Combined JS files and head scripts -->
	<?php 
    echo $jsFiles;
}
?>

<script type="text/javascript">/*<![CDATA[*/ Wikia.LazyQueue.makeQueue(wgAfterContentAndJS, function(fn) {fn();}); wgAfterContentAndJS.start(); /*]]>*/</script>
<?php 
if ($wg->EnableAdEngineExt) {
    ?>
<script type="text/javascript">/*<![CDATA[*/ if (typeof AdEngine_trackPageInteractive === 'function') {wgAfterContentAndJS.push(AdEngine_trackPageInteractive);} /*]]>*/</script>
<?php 
}
echo $bottomScripts;
?>

</body>

<?php 
echo wfReportTime() . "\n";
echo F::app()->renderView('Ad', 'Config');
?>

</html>
开发者ID:Tjorriemorrie,项目名称:app,代码行数:30,代码来源:Oasis_Index.php


示例13: outputPage


//.........这里部分代码省略.........
         $tpl->set('numberofwatchingusers', false);
     }
     wfProfileOut(__METHOD__ . '-stuff3');
     wfProfileIn(__METHOD__ . '-stuff4');
     $tpl->set('copyrightico', $this->getCopyrightIcon());
     $tpl->set('poweredbyico', $this->getPoweredBy());
     $tpl->set('disclaimer', $this->disclaimerLink());
     $tpl->set('privacy', $this->privacyLink());
     $tpl->set('about', $this->aboutLink());
     $tpl->set('footerlinks', array('info' => array('lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright'), 'places' => array('privacy', 'about', 'disclaimer')));
     global $wgFooterIcons;
     $tpl->set('footericons', $wgFooterIcons);
     foreach ($tpl->data['footericons'] as $footerIconsKey => &$footerIconsBlock) {
         if (count($footerIconsBlock) > 0) {
             foreach ($footerIconsBlock as &$footerIcon) {
                 if (isset($footerIcon['src'])) {
                     if (!isset($footerIcon['width'])) {
                         $footerIcon['width'] = 88;
                     }
                     if (!isset($footerIcon['height'])) {
                         $footerIcon['height'] = 31;
                     }
                 }
             }
         } else {
             unset($tpl->data['footericons'][$footerIconsKey]);
         }
     }
     if ($wgDebugComments) {
         $tpl->setRef('debug', $out->mDebugtext);
     } else {
         $tpl->set('debug', '');
     }
     $tpl->set('reporttime', wfReportTime());
     $tpl->set('sitenotice', $this->getSiteNotice());
     $tpl->set('bottomscripts', $this->bottomScripts($out));
     $tpl->set('printfooter', $this->printSource());
     # Add a <div class="mw-content-ltr/rtl"> around the body text
     # not for special pages or file pages AND only when viewing AND if the page exists
     # (or is in MW namespace, because that has default content)
     if (!in_array($this->getTitle()->getNamespace(), array(NS_SPECIAL, NS_FILE)) && in_array($action, array('view', 'historysubmit')) && ($this->getTitle()->exists() || $this->getTitle()->getNamespace() == NS_MEDIAWIKI)) {
         $pageLang = $this->getTitle()->getPageLanguage();
         $realBodyAttribs = array('lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(), 'class' => 'mw-content-' . $pageLang->getDir());
         $out->mBodytext = Html::rawElement('div', $realBodyAttribs, $out->mBodytext);
     }
     $tpl->setRef('bodytext', $out->mBodytext);
     # Language links
     $language_urls = array();
     if (!$wgHideInterlanguageLinks) {
         foreach ($out->getLanguageLinks() as $l) {
             $tmp = explode(':', $l, 2);
             $class = 'interwiki-' . $tmp[0];
             unset($tmp);
             $nt = Title::newFromText($l);
             if ($nt) {
                 $language_urls[] = array('href' => $nt->getFullURL(), 'text' => $wgContLang->getLanguageName($nt->getInterwiki()) != '' ? $wgContLang->getLanguageName($nt->getInterwiki()) : $l, 'title' => $nt->getText(), 'class' => $class, 'lang' => $nt->getInterwiki(), 'hreflang' => $nt->getInterwiki());
             }
         }
     }
     if (count($language_urls)) {
         $tpl->setRef('language_urls', $language_urls);
     } else {
         $tpl->set('language_urls', false);
     }
     wfProfileOut(__METHOD__ . '-stuff4');
     wfProfileIn(__METHOD__ . '-stuff5');
开发者ID:tuxmania87,项目名称:GalaxyAdventures,代码行数:67,代码来源:SkinTemplate.php


示例14: outputPage

 function outputPage(OutputPage $out)
 {
     global $wgDebugComments;
     wfProfileIn(__METHOD__);
     $this->setMembers();
     $this->initPage($out);
     // See self::afterContentHook() for documentation
     $afterContent = $this->afterContentHook();
     $out->out($out->headElement($this));
     $out->out("\n<body");
     $ops = $this->getBodyOptions();
     foreach ($ops as $name => $val) {
         $out->out(" {$name}='{$val}'");
     }
     $out->out(">\n");
     if ($wgDebugComments) {
         $out->out("<!-- Wiki debugging output:\n" . $out->mDebugtext . "-->\n");
     }
     $out->out($this->beforeContent());
     $out->out($out->mBodytext . "\n");
     $out->out($this->afterContent());
     $out->out($afterContent);
     $out->out($this->bottomScripts());
     $out->out(wfReportTime());
     $out->out("\n</body></html>");
     wfProfileOut(__METHOD__);
 }
开发者ID:ruizrube,项目名称:spdef,代码行数:27,代码来源:Skin.php


示例15: executeActionWithErrorHandling

 /**
  * Execute an action, and in case of an error, erase whatever partial results
  * have been accumulated, and replace it with an error message and a help screen.
  */
 protected function executeActionWithErrorHandling()
 {
     // Verify the CORS header before executing the action
     if (!$this->handleCORS()) {
         // handleCORS() has sent a 403, abort
         return;
     }
     // Exit here if the request method was OPTIONS
     // (assume there will be a followup GET or POST)
     if ($this->getRequest()->getMethod() === 'OPTIONS') {
         return;
     }
     // In case an error occurs during data output,
     // clear the output buffer and print just the error information
     ob_start();
     $t = microtime(true);
     try {
         $this->executeAction();
     } catch (Exception $e) {
         // Allow extra cleanup and logging
         wfRunHooks('ApiMain::onException', array($this, $e));
         // Log it
         if ($e instanceof MWException && !$e instanceof UsageException) {
             global $wgLogExceptionBacktrace;
             if ($wgLogExceptionBacktrace) {
                 wfDebugLog('exception', $e->getLogMessage() . "\n" . $e->getTraceAsString() . "\n");
             } else {
                 wfDebugLog('exception', $e->getLogMessage());
             }
         }
         // Handle any kind of exception by outputting properly formatted error message.
         // If this fails, an unhandled exception should be thrown so that global error
         // handler will process and log it.
         $errCode = $this->substituteResultWithError($e);
         // Error results should not be cached
         $this->setCacheMode('private');
         $response = $this->getRequest()->response();
         $headerStr = 'MediaWiki-API-Error: ' . $errCode;
         if ($e->getCode() === 0) {
             $response->header($headerStr);
         } else {
             $response->header($headerStr, true, $e->getCode());
         }
         // Reset and print just the error message
         ob_clean();
         // If the error occurred during printing, do a printer->profileOut()
         $this->mPrinter->safeProfileOut();
         $this->printResult(true);
     }
     // Log the request whether or not there was an error
     $this->logRequest(microtime(true) - $t);
     // Send cache headers after any code which might generate an error, to
     // avoid sending public cache headers for errors.
     $this->sendCacheHeaders();
     if ($this->mPrinter->getIsHtml() && !$this->mPrinter->isDisabled()) {
         echo wfReportTime();
     }
     ob_end_flush();
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:63,代码来源:ApiMain.php


示例16: executeActionWithErrorHandling

 /**
  * Execute an action, and in case of an error, erase whatever partial results
  * have been accumulated, and replace it with an error message and a help screen.
  */
 protected function executeActionWithErrorHandling()
 {
     // In case an error occurs during data output,
     // clear the output buffer and print just the error information
     ob_start();
     try {
         $this->executeAction();
     } catch (Exception $e) {
         // Log it
         if ($e instanceof MWException) {
             wfDebugLog('exception', $e->getLogMessage());
         }
         // Handle any kind of exception by outputing properly formatted error message.
         // If this fails, an unhandled exception should be thrown so that global error
         // handler will process and log it.
         $errCode = $this->substituteResultWithError($e);
         // Error results should not be cached
         $this->setCacheMode('private');
         $response = $this->getRequest()->response();
         $headerStr = 'MediaWiki-API-Error: ' . $errCode;
         if ($e->getCode() === 0) {
             $response->header($headerStr);
         } else {
             $response->header($headerStr, true, $e->getCode());
         }
         // Reset and print just the error message
         ob_clean();
         // If the error occured during printing, do a printer->profileOut()
         $this->mPrinter->safeProfileOut();
         $this->printResult(true);
     }
     // Send cache headers after any code which might generate an error, to
     // avoid sending public cache headers for errors.
     $this->sendCacheHeaders();
     if ($this->mPrinter->getIsHtml() && !$this->mPrinter->isDisabled()) {
         echo wfReportTime();
     }
     ob_end_flush();
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:43,代码来源:ApiMain.php


示例17: wfReportTime

<?= $body ?>

<!-- comScore -->
<?= $comScore ?>

<!-- googleAnalytics -->
<?= $googleAnalytics ?>

<?php
	if($jsAtBottom) {
		print $wikiaScriptLoader; // needed for jsLoader and for the async loading of CSS files.
		print "\n\n\t<!-- Combined JS files and head scripts -->\n";
		print $jsFiles . "\n";
	}
?>

<!-- quantServe -->
<?= $quantServe ?>

<?php
	print '<script type="text/javascript">/*<![CDATA[*/for(var i=0;i<wgAfterContentAndJS.length;i++){wgAfterContentAndJS[i]();}/*]]>*/</script>' . "\n";

	print "<!-- BottomScripts -->\n";
	print $bottomscripts;
	print "<!-- end Bottomscripts -->\n";
?>

<?= wfReportTime()."\n" ?>
</body>
</html>
开发者ID:schwarer2006,项目名称:wikia,代码行数:30,代码来源:Campfire_Index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wfResetOutputBuffers函数代码示例发布时间:2022-05-23
下一篇:
PHP wfReplaceImageServer函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap