<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>http://kamelopedia.net/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AEmpfehlungen.class.php</id>
	<title>MediaWiki:Empfehlungen.class.php - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="http://kamelopedia.net/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AEmpfehlungen.class.php"/>
	<link rel="alternate" type="text/html" href="http://kamelopedia.net/index.php?title=MediaWiki:Empfehlungen.class.php&amp;action=history"/>
	<updated>2026-11-02T05:47:05Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Kamelopedia</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://kamelopedia.net/index.php?title=MediaWiki:Empfehlungen.class.php&amp;diff=462984&amp;oldid=prev</id>
		<title>WiMu: AZ: Die Seite wurde neu angelegt.</title>
		<link rel="alternate" type="text/html" href="http://kamelopedia.net/index.php?title=MediaWiki:Empfehlungen.class.php&amp;diff=462984&amp;oldid=prev"/>
		<updated>2011-09-22T21:38:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/KP:AZ&quot; class=&quot;mw-redirect&quot; title=&quot;KP:AZ&quot;&gt;AZ&lt;/a&gt;: Die Seite wurde neu angelegt.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class Empfehlungen {&lt;br /&gt;
	private $empfNs;&lt;br /&gt;
	private $empfArray = array();&lt;br /&gt;
	private $empfUsers = array();&lt;br /&gt;
&lt;br /&gt;
	function __construct() {&lt;br /&gt;
		global $wgEmpfSubpath;&lt;br /&gt;
		&lt;br /&gt;
		// &amp;quot;erlaubte&amp;quot; Namensräume auslesen&lt;br /&gt;
		if( wfEmptyMsg(&amp;#039;empfehlungen-namespaces&amp;#039;) ) {&lt;br /&gt;
			$empfNs = array(&amp;#039;Artikel&amp;#039;); // Durchfallwert, falls MediaWiki:Empfehlungen-namespaces leer oder nicht vorhanden&lt;br /&gt;
		} else {&lt;br /&gt;
			$message = wfMsg( &amp;#039;empfehlungen-namespaces&amp;#039; );&lt;br /&gt;
			preg_match_all(&amp;#039;/(\d+)\s*\|\s*(.+)/&amp;#039;, $message, $namespaces);&lt;br /&gt;
			foreach($namespaces[1] as $key =&amp;gt; $value) {&lt;br /&gt;
				$empfNs[$value] = trim($namespaces[2][$key]);&lt;br /&gt;
			}&lt;br /&gt;
		}	&lt;br /&gt;
		$this-&amp;gt;empfNs = $empfNs;&lt;br /&gt;
		&lt;br /&gt;
		$dbr = wfGetDB( DB_SLAVE );&lt;br /&gt;
		$empfehlungen = array();&lt;br /&gt;
		// Alle Seiten im Kamelnamensraum, die auf /$wgEmpfSubpath enden auslesen&lt;br /&gt;
		$empfehlungsseiten = $dbr-&amp;gt;select( &amp;#039;page&amp;#039;, array( &amp;#039;page_id&amp;#039;, &amp;#039;page_title&amp;#039; ), &amp;quot;page_namespace = 2 AND page_title LIKE &amp;#039;%/&amp;quot;.$wgEmpfSubpath.&amp;quot;&amp;#039;&amp;quot;, __METHOD__ );&lt;br /&gt;
		foreach( $empfehlungsseiten as $row ) {&lt;br /&gt;
			$empfehlungsseite  = Title::makeTitle( 2, $row-&amp;gt;page_title );&lt;br /&gt;
			$user 			   = $empfehlungsseite-&amp;gt;getBaseText();&lt;br /&gt;
			&lt;br /&gt;
			// existiert überhaupt ein zugehöriges Kamelkonto (man kennt ja seine Pappenheimer)?			&lt;br /&gt;
			//if(User::idFromName($user) == NULL) continue;&lt;br /&gt;
			&lt;br /&gt;
			$userlink		   = Linker::linkKnown( $empfehlungsseite, $user );&lt;br /&gt;
			$this-&amp;gt;empfUsers[] = $user;&lt;br /&gt;
			// Jetzt von jeder Empfehlungsseite die links auslesen&lt;br /&gt;
			$empf = $dbr-&amp;gt;select( &amp;#039;pagelinks&amp;#039;, array( &amp;#039;pl_namespace&amp;#039;, &amp;#039;pl_title&amp;#039; ),	&amp;quot;pl_from = {$row-&amp;gt;page_id}&amp;quot;, __METHOD__	);&lt;br /&gt;
			foreach( $empf as $empfehlung ) {&lt;br /&gt;
				if(!isset($empfNs[$empfehlung-&amp;gt;pl_namespace])) continue;&lt;br /&gt;
				$title = Title::makeTitle( $empfehlung-&amp;gt;pl_namespace, $empfehlung-&amp;gt;pl_title );&lt;br /&gt;
				// Empfehlungen nicht existierender Seiten rausschmeißen&lt;br /&gt;
				if(!$title-&amp;gt;exists()) continue;&lt;br /&gt;
				// der (eindeutige) Index dient der alphabetischen Sortierung nach Titel + Namensraum&lt;br /&gt;
				$index = $title-&amp;gt;getText().$title-&amp;gt;getNsText();&lt;br /&gt;
				$link  = Linker::linkKnown( $title );&lt;br /&gt;
				if( !isset($empfArray[$index]) ) {&lt;br /&gt;
					$empfArray[$index][&amp;#039;link&amp;#039;] = Linker::link( $title );&lt;br /&gt;
					$empfArray[$index][&amp;#039;ns&amp;#039;]   = $title-&amp;gt;getNamespace();&lt;br /&gt;
				}&lt;br /&gt;
				$empfArray[$index][&amp;#039;users&amp;#039;][] = $userlink;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		$this-&amp;gt;empfArray = $empfArray;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	function getEmpfNs() {&lt;br /&gt;
		return $this-&amp;gt;empfNs;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function getEmpfArray() {&lt;br /&gt;
		return $this-&amp;gt;empfArray;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	function getEmpfUsers() {&lt;br /&gt;
		return $this-&amp;gt;empfUsers;&lt;br /&gt;
	}	&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>WiMu</name></author>
	</entry>
</feed>