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

PHP wfArrayToCGI函数代码示例

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

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



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

示例1: execute

 public function execute($sub)
 {
     global $wgOut, $wgRequest;
     global $wgLandingPageBase, $wgChapterLandingPages, $wgLandingPageDefaultTarget;
     $lang = preg_match('/^[A-Za-z-]+$/', $wgRequest->getVal('lang')) ? $wgRequest->getVal('lang') : 'en';
     $utm_source = $wgRequest->getVal('utm_source');
     $utm_medium = $wgRequest->getVal('utm_medium');
     $utm_campaign = $wgRequest->getVal('utm_campaign');
     $referrer = $wgRequest->getHeader('referer');
     $target = $wgRequest->getVal('target', null);
     if (!$target) {
         $target = $wgLandingPageDefaultTarget;
     }
     $tracking = '?' . wfArrayToCGI(array('utm_source' => "{$utm_source}", 'utm_medium' => "{$utm_medium}", 'utm_campaign' => "{$utm_campaign}", 'referrer' => "{$referrer}", 'target' => "{$target}"));
     $ip = $wgRequest->getVal('ip') ? $wgRequest->getVal('ip') : wfGetIP();
     if (IP::isValid($ip)) {
         $country = geoip_country_code_by_name($ip);
         if (is_string($country) && array_key_exists($country, $wgChapterLandingPages)) {
             $wgOut->redirect($this->getDestination($utm_source) . '/' . $wgChapterLandingPages[$country] . $tracking);
             return;
         }
     }
     // No valid IP or chapter page - let's just go for the passed in url or our fallback
     if (Http::isValidURI($target)) {
         $wgOut->redirect($target . '/' . $lang . $tracking);
         return;
     } else {
         $wgOut->redirect($wgLandingPageBase . $target . '/' . $lang . $tracking);
     }
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:30,代码来源:GeoLite_body.php


示例2: getGoogleChartParams

 function getGoogleChartParams($stats)
 {
     global $wgPrefStatsChartDimensions;
     $max = max($stats[0]) + max($stats[1]);
     $min = min(min($stats[0]), min($stats[1]));
     return "http://chart.apis.google.com/chart?" . wfArrayToCGI(array('chs' => implode('x', $wgPrefStatsChartDimensions), 'cht' => 'bvs', 'chds' => '0,' . $max, 'chd' => 't:' . implode(',', $stats[0]) . '|' . implode(',', $stats[1]), 'chxt' => 'x,y,x', 'chxr' => '1,' . $min . ',' . $max, 'chxl' => '2:|' . wfMsg('prefstats-xaxis') . '|0:|' . implode('|', array_keys($stats[0])), 'chm' => 'N*f0zy*,000000,0,-1,11|N*f0zy*,000000,1,-1,11', 'chco' => '4D89F9,C6D9FD', 'chbh' => 'a', 'chdl' => wfMsg('prefstats-legend-out') . '|' . wfMsg('prefstats-legend-in')));
 }
开发者ID:BackupTheBerlios,项目名称:swahili-dict,代码行数:7,代码来源:SpecialPrefStats.php


示例3: personalUrls

 public static function personalUrls(&$personal_urls, &$title)
 {
     global $wgUser, $wgOptInAlwaysShowPersonalLink;
     global $wgOptInNeverShowPersonalLink, $wgRequest;
     if ($wgOptInNeverShowPersonalLink || !SpecialOptIn::isOptedIn($wgUser) && !$wgOptInAlwaysShowPersonalLink) {
         // Don't show the link
         return true;
     }
     // Loads opt-in messages
     wfLoadExtensionMessages('OptInLink');
     $fromquery = array();
     if (!$wgRequest->wasPosted()) {
         $fromquery = $wgRequest->getValues();
         unset($fromquery['title']);
     }
     $query = array('from' => $title->getPrefixedDBKey(), 'fromquery' => wfArrayToCGI($fromquery));
     // Make sure we don't create links that return to
     // Special:UsabilityOptIn itself
     if ($title->equals(SpecialPage::getTitleFor('OptIn'))) {
         $query['from'] = $wgRequest->getVal('from');
         $query['fromquery'] = $wgRequest->getVal('fromquery');
     }
     $addLinks = array();
     // For opted-in users, add a feedback link
     if (SpecialOptIn::isOptedIn($wgUser)) {
         $addLinks['optin-feedback'] = array('text' => wfMsg('optin-feedback'), 'key' => 'optin-feedback', 'href' => SpecialPage::getTitleFor('OptIn')->getFullURL(array_merge($query, array('opt' => 'feedback'))), 'class' => 'no-text-transform');
     }
     // Inserts a link into personal tools
     $key = SpecialOptIn::isOptedIn($wgUser) ? 'optin-leave' : 'optin-try';
     $addLinks[$key] = array('text' => wfMsg($key), 'href' => SpecialPage::getTitleFor('OptIn')->getFullURL($query), 'class' => 'no-text-transform');
     // Add the links
     $personal_urls = array_merge($addLinks, $personal_urls);
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:swahili-dict,代码行数:34,代码来源:OptIn.hooks.php


示例4: run

 /**
  * Run a refreshLinks job
  * @return boolean success
  */
 function run()
 {
     global $wgTitle, $wgUser, $wgLang, $wrGedcomExportDirectory;
     $wgTitle = $this->title;
     // FakeTitle (the default) generates errors when accessed, and sometimes I log wgTitle, so set it to something else
     $wgUser = User::newFromName('WeRelate agent');
     // set the user
     $treeId = $this->params['tree_id'];
     $treeName = $this->params['name'];
     $treeUser = $this->params['user'];
     $filename = "{$wrGedcomExportDirectory}/{$treeId}.ged";
     $ge = new GedcomExporter();
     $error = $ge->exportGedcom($treeId, $filename);
     if ($error) {
         $this->error = $error;
         return false;
     }
     // leave a message for the tree requester
     $userTalkTitle = Title::newFromText($treeUser, NS_USER_TALK);
     $article = new Article($userTalkTitle, 0);
     if ($article->getID() != 0) {
         $text = $article->getContent();
     } else {
         $text = '';
     }
     $title = Title::makeTitle(NS_SPECIAL, 'Trees');
     $msg = wfMsg('GedcomExportReady', $wgLang->date(wfTimestampNow(), true, false), $treeName, $title->getFullURL(wfArrayToCGI(array('action' => 'downloadExport', 'user' => $treeUser, 'name' => $treeName))));
     $text .= "\n\n" . $msg;
     $success = $article->doEdit($text, 'GEDCOM export ready');
     if (!$success) {
         $this->error = 'Unable to edit user talk page: ' . $treeUser;
         return false;
     }
     return true;
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:39,代码来源:GedcomExportJob.php


示例5: testArrayToCGI

	function testArrayToCGI() {
		$this->assertEquals(
			"baz=AT%26T&foo=bar",
			wfArrayToCGI(
				array( 'baz' => 'AT&T', 'ignore' => '' ),
				array( 'foo' => 'bar', 'baz' => 'overridden value' ) ) );
	}
开发者ID:schwarer2006,项目名称:wikia,代码行数:7,代码来源:GlobalTest.php


示例6: setSyndicated

 protected function setSyndicated()
 {
     $request = $this->getRequest();
     $queryParams = array('namespace' => $request->getIntOrNull('namespace'), 'level' => $request->getIntOrNull('level'), 'category' => $request->getVal('category'));
     $this->getOutput()->setSyndicated(true);
     $this->getOutput()->setFeedAppendQuery(wfArrayToCGI($queryParams));
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:7,代码来源:PendingChanges_body.php


示例7: performUploadInit

 public function performUploadInit($comment, $pageText, $watch, $user)
 {
     $check = $this->mUpload->validateNameAndOverwrite();
     if ($check !== true) {
         $this->getVerificationError($check);
     }
     $session = $this->mUpload->setupChunkSession($comment, $pageText, $watch);
     return array('uploadUrl' => wfExpandUrl(wfScript('api')) . "?" . wfArrayToCGI(array('action' => 'firefoggupload', 'token' => $user->editToken(), 'format' => 'json', 'chunksession' => $session, 'filename' => $this->mUpload->getDesiredName())));
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:9,代码来源:ApiFirefoggChunkedUpload.php


示例8: loadLinks

 /**
  * Add a link to central:Special:Phalanx from Special:Contributions/USERNAME
  * if the user has 'phalanx' permission
  *
  * @param $id Integer: user ID
  * @param $nt Title: user page title
  * @param $links Array: tool links
  * @return boolean true
  */
 public static function loadLinks($id, $nt, &$links)
 {
     wfProfileIn(__METHOD__);
     $user = RequestContext::getMain()->getUser();
     if ($user->isAllowed('phalanx')) {
         $links[] = Linker::makeKnownLinkObj(GlobalTitle::newFromText('Phalanx', NS_SPECIAL, WikiFactory::COMMUNITY_CENTRAL), 'PhalanxBlock', wfArrayToCGI(['type' => Phalanx::TYPE_USER, 'wpPhalanxCheckBlocker' => $nt->getText(), 'target' => $nt->getText()]));
     }
     wfProfileOut(__METHOD__);
     return true;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:19,代码来源:PhalanxHooks.class.php


示例9: buildUrl

 /**
  * @param string $url uri for blob resource
  */
 private function buildUrl($url)
 {
     wfProfileIn(__METHOD__);
     $app = F::app();
     $path = explode('/', $url);
     $cluster = $path[2];
     $id = $path[3];
     $query = wfArrayToCGI(array("action" => "blob", "blobid" => $id, "cluster" => $cluster));
     $url = sprintf("%s/api.php?%s", $app->getGlobal("wgServer"), $query);
     wfProfileOut(__METHOD__);
     return $url;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:15,代码来源:FakeExternalStoreDB.php


示例10: testUrlsPolishWiki

 function testUrlsPolishWiki()
 {
     $title = GlobalTitle::newFromText("WikiFactory", NS_SPECIAL, 1686);
     # pl.wikia.com
     $url = "http://spolecznosc.wikia.com/wiki/Special:WikiFactory";
     $this->assertTrue($title->getFullURL() === $url, sprintf("%s = %s, NOT MATCH", $title->getFullURL(), $url));
     $url = "http://spolecznosc.wikia.com/wiki/Special:WikiFactory?diff=0&oldid=500";
     $this->assertTrue($title->getFullURL(wfArrayToCGI(array("diff" => 0, "oldid" => 500))) === $url, sprintf("%s = %s, NOT MATCH", $title->getFullURL(), $url));
     $title = GlobalTitle::newFromText("Strona główna", false, 1686);
     # pl.wikia.com
     $url = "http://spolecznosc.wikia.com/wiki/Strona_g%C5%82%C3%B3wna?diff=0&oldid=500";
     $this->assertTrue($title->getFullURL(wfArrayToCGI(array("diff" => 0, "oldid" => 500))) === $url, "NOT MATCH");
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:13,代码来源:GlobalTitleTest.php


示例11: doQuery

 /**
  * As with QueryPage, this is the actual workhorse. It does everything
  * needed to make a real, honest-to-gosh query page.
  *
  * @param $offset database query offset
  * @param $limit database query limit
  * @param $shownavigation show navigation like "next 200"?
  */
 function doQuery($offset, $limit, $shownavigation = true)
 {
     global $wgUser, $wgOut, $wgContLang;
     $this->offset = $offset;
     $this->limit = $limit;
     $sname = $this->getName();
     $fname = get_class($this) . '::doQuery';
     $sk = $wgUser->getSkin();
     $wgOut->setSyndicated($this->isSyndicated());
     $query = MwRdf::Query($this->getQuery(), $this->getBaseUrl(), $this->getQueryLanguage());
     $librdf_res = $query->execute(MwRdf::StoredModel());
     # let's just dump the tuples into a normal php array shall
     # we?  This will avoid memory management hassels.
     $res = array();
     foreach ($librdf_res as $tuple) {
         $res[] = $tuple;
     }
     $num = count($res);
     $res = $this->preprocessResults($res);
     if ($shownavigation) {
         $wgOut->addHTML($this->getPageHeader());
         $top = wfShowingResults($offset, $num);
         $wgOut->addHTML("<p>{$top}\n");
         # often disable 'next' link when we reach the end
         $atend = $num < $limit;
         $sl = wfViewPrevNext($offset, $limit, $wgContLang->specialPage($sname), wfArrayToCGI($this->linkParameters()), $atend);
         $wgOut->addHTML("<br />{$sl}</p>\n");
     }
     if ($num > 0) {
         $s = array();
         if (!$this->listoutput) {
             $s[] = "<ol start='" . ($offset + 1) . "' class='special'>";
         }
         # here's where we do the offset and limit
         for ($i = $offset; $i < $num && $i < $offset + $limit; $i++) {
             $format = $this->formatResult($sk, $res[$i]);
             if ($format) {
                 $s[] = $this->listoutput ? $format : "<li>{$format}</li>\n";
             }
         }
         if (!$this->listoutput) {
             $s[] = '</ol>';
         }
         $str = $this->listoutput ? $wgContLang->listToText($s) : implode('', $s);
         $wgOut->addHTML($str);
     }
     if ($shownavigation) {
         $wgOut->addHTML("<p>{$sl}</p>\n");
     }
     return $num;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:59,代码来源:QueryPage.php


示例12: performUploadInit

	public function performUploadInit($comment, $pageText, $watchlist, $user) {
		// Verify the initial upload request
		$this->verifyUploadInit();
		
		$session = $this->mUpload->setupChunkSession( $comment, $pageText, $watchlist );
		return array('uploadUrl' =>
			wfExpandUrl( wfScript( 'api' ) ) . "?" .
			wfArrayToCGI( array(
				'action' => 'resumableupload',
				'token' => $user->editToken(),
				'format' => 'json',
				'chunksession' => $session,
				'filename' => $this->mUpload->getDesiredName(),
			) ) );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:15,代码来源:ApiResumableUpload.php


示例13: personalUrls

	/**
	 * PersonalUrls hook
	 */
	public static function personalUrls( &$personal_urls, &$title ) {
		global $wgUser, $wgRequest, $wgPrefSwitchShowLinks;
		if ( !$wgPrefSwitchShowLinks ) {
			return true;
		}

		// Figure out the orgin to include in the link
		$fromquery = array();
		if ( !( $wgRequest->wasPosted() ) ) {
			$fromquery = $wgRequest->getValues();
			unset( $fromquery['title'] );
		}
		// Make sure we don't create links that return to Special:UsabilityPrefSwitch itself
		if ( $title->equals( SpecialPage::getTitleFor( 'PrefSwitch' ) ) ) {
			$query = array( 'from' => $wgRequest->getVal( 'from' ), 'fromquery' => $wgRequest->getVal( 'fromquery' ) );
		} else {
			$query = array(	'from' => $title->getPrefixedDBKey(), 'fromquery' => wfArrayToCGI( $fromquery ) );
		}
		$state = SpecialPrefSwitch::userState( $wgUser );
		if ( $state == 'on' ) {
			// Inserts a link into personal tools - this just gets people to the generic new features page
			$personal_urls = array_merge(
				array(
					"prefswitch-link-anon" => array(
						'text' => wfMsg( 'prefswitch-link-anon' ),
						'href' => SpecialPage::getTitleFor( 'PrefSwitch' )->getFullURL( $query ),
						'class' => 'no-text-transform',
					),
				),
				$personal_urls
			);
			// Make the next link go to the opt-out page
			$query['mode'] = 'off';
		}
		// Inserts a link into personal tools - Uses prefswitch-link-anon, prefswitch-link-on and prefswitch-link-off
		$personal_urls = array_merge(
			array(
				"prefswitch-link-{$state}" => array(
					'text' => wfMsg( 'prefswitch-link-' . $state ),
					'href' => SpecialPage::getTitleFor( 'PrefSwitch' )->getFullURL( $query ),
					'class' => 'no-text-transform',
				),
			),
			$personal_urls
		);
		return true;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:50,代码来源:PrefSwitch.hooks.php


示例14: onView

 public function onView()
 {
     $title = $this->getTitle();
     $redirectParams = wfArrayToCGI(array_diff_key($this->getRequest()->getQueryValues(), ['title' => null, 'action' => null]));
     if (!$title->exists()) {
         $this->addBannerNotificationMessage('templatedraft-approval-no-page-error');
         $redirectTitle = $title;
     } elseif (!TemplateDraftHelper::isTitleDraft($title)) {
         $this->addBannerNotificationMessage('templatedraft-approval-no-templatedraft-error');
         $redirectTitle = $title;
     } else {
         $this->approveDraft($title);
         $redirectTitle = $title->getBaseText();
         $redirectTitle = Title::newFromText($redirectTitle, $title->getNamespace());
     }
     $this->getOutput()->redirect($redirectTitle->getFullUrl($redirectParams));
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:17,代码来源:ApprovedraftAction.php


示例15: show

 /**
  * purge is slightly weird because it can be either formed or formless depending
  * on user permissions
  */
 public function show()
 {
     $this->setHeaders();
     // This will throw exceptions if there's a problem
     $this->checkCanExecute($this->getUser());
     if ($this->getUser()->isAllowed('purge')) {
         $this->redirectParams = wfArrayToCGI(array_diff_key($this->getRequest()->getQueryValues(), array('title' => null, 'action' => null)));
         $this->onSubmit(array());
         $this->onSuccess();
     } else {
         $this->redirectParams = $this->getRequest()->getVal('redirectparams', '');
         $form = $this->getForm();
         if ($form->show()) {
             $this->onSuccess();
         }
     }
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:21,代码来源:PurgeAction.php


示例16: doQuery

 /**
  * This is the actual workhorse. It does everything needed to make a
  * real, honest-to-gosh query page.
  * Alas, we need to overwrite the whole beast since we do not assume
  * an SQL-based storage backend.
  *
  * @param $offset database query offset
  * @param $limit database query limit
  */
 function doQuery($offset = false, $limit = false)
 {
     global $wgOut, $wgContLang;
     $options = new SMWRequestOptions();
     $options->limit = $limit;
     $options->offset = $offset;
     $options->sort = true;
     $res = $this->getResults($options);
     $num = count($res);
     $sk = $this->getSkin();
     $sname = $this->getName();
     $wgOut->addHTML($this->getPageHeader());
     // if list is empty, show it
     if ($num == 0) {
         $wgOut->addHTML('<p>' . wfMsgHTML('specialpage-empty') . '</p>');
         return;
     }
     $top = wfShowingResults($offset, $num);
     $wgOut->addHTML("<p>{$top}\n");
     // often disable 'next' link when we reach the end
     $atend = $num < $limit;
     $sl = wfViewPrevNext($offset, $limit, $wgContLang->specialPage($sname), wfArrayToCGI($this->linkParameters()), $atend);
     $wgOut->addHTML("<br />{$sl}</p>\n");
     if ($num > 0) {
         $s = array();
         if (!$this->listoutput) {
             $s[] = $this->openList($offset);
         }
         foreach ($res as $r) {
             $format = $this->formatResult($sk, $r);
             if ($format) {
                 $s[] = $this->listoutput ? $format : "<li>{$format}</li>\n";
             }
         }
         if (!$this->listoutput) {
             $s[] = $this->closeList();
         }
         $str = $this->listoutput ? $wgContLang->listToText($s) : implode('', $s);
         $wgOut->addHTML($str);
     }
     $wgOut->addHTML("<p>{$sl}</p>\n");
     return $num;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:52,代码来源:SMW_QueryPage.php


示例17: run

 /**
  * Execute the job
  *
  * @return bool
  */
 public function run()
 {
     //sleep() could be added here to reduce unnecessary use
     $ill = $this->params['ill'];
     foreach ($ill as $lang => $pages) {
         $iw = Interwiki::fetch($lang);
         if (!$iw) {
             continue;
         }
         $apiUrl = $iw->getAPI();
         if (!$apiUrl) {
             continue;
         }
         $apiUrl .= '?' . wfArrayToCGI(array('action' => 'purge', 'format' => 'json', 'titles' => implode('|', array_keys($pages))));
         Http::post($apiUrl);
         //TODO: error handling
     }
     return true;
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:24,代码来源:InterlanguageCentralExtensionPurgeJob.php


示例18: getSiteCSS

 public static function getSiteCSS($combine, $minify = null, $params = null, $skinname = 'oasis', $articleName = 'Wikia.css')
 {
     wfProfileIn(__METHOD__);
     $srcs = array();
     global $wgSquidMaxage;
     $siteargs = array('action' => 'raw', 'maxage' => $wgSquidMaxage);
     // BugId:20929 tell (or trick) varnish to store the latest revisions of Wikia.css and Common.css.
     $oTitleCommonCss = Title::newFromText('Common.css', NS_MEDIAWIKI);
     $oTitleWikiaCss = Title::newFromText('Wikia.css', NS_MEDIAWIKI);
     $siteargs['maxrev'] = max((int) $oTitleWikiaCss->getLatestRevID(), (int) $oTitleCommonCss->getLatestRevID());
     unset($oTitleWikiaCss, $oTitleCommonCss);
     $query = wfArrayToCGI(array('usemsgcache' => 'yes', 'ctype' => 'text/css', 'smaxage' => $wgSquidMaxage) + $siteargs);
     $srcs[] = Title::newFromText($articleName, NS_MEDIAWIKI)->getFullURL($query);
     // user specific CSS based on user preferences (if logged-in)
     $siteargs['gen'] = 'css';
     $siteargs['useskin'] = $skinname;
     $srcs[] = Title::newFromText('-')->getFullURL(wfArrayToCGI($siteargs));
     wfProfileOut(__METHOD__);
     return $srcs;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:20,代码来源:AssetsConfig.class.php


示例19: wfSpecialFavoritelist

 function wfSpecialFavoritelist($par)
 {
     global $wgUser, $wgOut, $wgLang, $wgRequest;
     global $wgRCShowFavoritingUsers, $wgEnotifFavoritelist, $wgShowUpdatedMarker;
     // Add feed links
     $flToken = $wgUser->getOption('favoritelisttoken');
     if (!$flToken) {
         $flToken = sha1(mt_rand() . microtime(true));
         $wgUser->setOption('favoritelisttoken', $flToken);
         $wgUser->saveSettings();
     }
     global $wgServer, $wgScriptPath, $wgFeedClasses;
     $apiParams = array('action' => 'feedfavoritelist', 'allrev' => 'allrev', 'flowner' => $wgUser->getName(), 'fltoken' => $flToken);
     $feedTemplate = wfScript('api') . '?';
     foreach ($wgFeedClasses as $format => $class) {
         $theseParams = $apiParams + array('feedformat' => $format);
         $url = $feedTemplate . wfArrayToCGI($theseParams);
         $wgOut->addFeedLink($format, $url);
     }
     $skin = $wgUser->getSkin();
     $specialTitle = SpecialPage::getTitleFor('Favoritelist');
     $wgOut->setRobotPolicy('noindex,nofollow');
     # Anons don't get a favoritelist
     if ($wgUser->isAnon()) {
         $wgOut->setPageTitle(wfMsg('favoritenologin'));
         $llink = $skin->linkKnown(SpecialPage::getTitleFor('Userlogin'), wfMsgHtml('loginreqlink'), array(), array('returnto' => $specialTitle->getPrefixedText()));
         $wgOut->addHTML(wfMsgWikiHtml('favoritelistanontext', $llink));
         return;
     }
     $wgOut->setPageTitle(wfMsg('favoritelist'));
     $sub = wfMsgExt('favoritelistfor', 'parseinline', $wgUser->getName());
     $sub .= '<br />' . FavoritelistEditor::buildTools($wgUser->getSkin());
     $wgOut->setSubtitle($sub);
     if (($mode = FavoritelistEditor::getMode($wgRequest, $par)) !== false) {
         $editor = new FavoritelistEditor();
         $editor->execute($wgUser, $wgOut, $wgRequest, $mode);
         return;
     }
     $this->viewFavList($wgUser, $wgOut, $wgRequest, $mode);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:40,代码来源:SpecialFavoritelist.php


示例20: getNavigationLinks

 protected function getNavigationLinks($query = array())
 {
     global $wgUser, $wgLang, $smwgPropertyPagingLimit;
     $sk = $this->getSkin();
     $limitText = $wgLang->formatNum($this->limit);
     $ac = count($this->articles);
     if ($this->until != '') {
         if ($ac > $this->limit) {
             // (we assume that limit is at least 1)
             $first = $this->articles[1]->getSortkey();
         } else {
             $first = '';
         }
         $last = $this->until;
     } elseif ($ac > $this->limit || $this->from != '') {
         $first = $this->from;
         if ($ac > $this->limit) {
             $last = $this->articles[$ac - 1]->getSortkey();
         } else {
             $last = '';
         }
     } else {
         return '';
     }
     $prevLink = htmlspecialchars(wfMsg('prevn', $limitText));
     $this->mTitle->setFragment('#SMWResults');
     // make navigation point to the result list
     if ($first != '') {
         $prevLink = $sk->makeLinkObj($this->mTitle, $prevLink, wfArrayToCGI($query + array('until' => $first)));
     }
     $nextLink = htmlspecialchars(wfMsg('nextn', $limitText));
     if ($last != '') {
         $nextLink = $sk->makeLinkObj($this->mTitle, $nextLink, wfArrayToCGI($query + array('from' => $last, 'offset' => $this->offset + $smwgPropertyPagingLimit)));
     }
     return "({$prevLink}) ({$nextLink})";
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:36,代码来源:SMW_TS_PropertyPage.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wfArrayToCgi函数代码示例发布时间:2022-05-23
下一篇:
PHP wfArrayDiff2函数代码示例发布时间: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