[ros-diffs] [gvg] 19936: MediaWiki 1.4.8 vendor import

gvg at svn.reactos.com gvg at svn.reactos.com
Tue Dec 6 20:41:39 CET 2005


MediaWiki 1.4.8 vendor import
Added: trunk/web/reactos.org/htdocs/wiki/
Modified: trunk/web/reactos.org/htdocs/wiki/includes/OutputPage.php
Modified:
trunk/web/reactos.org/htdocs/wiki/includes/SpecialPreferences.php
Modified:
trunk/web/reactos.org/htdocs/wiki/includes/SpecialUserlogin.php
Modified:
trunk/web/reactos.org/htdocs/wiki/includes/SpecialUserlogout.php
Modified: trunk/web/reactos.org/htdocs/wiki/includes/User.php
Added: trunk/web/reactos.org/htdocs/wiki/skins/RosCms.php
Added: trunk/web/reactos.org/htdocs/wiki/skins/common/images/reactos.png
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/IE50Fixes.css
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/IE55Fixes.css
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/IE60Fixes.css
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/IEMacFixes.css
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/KHTMLFixes.css
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/Opera6Fixes.css
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/Opera7Fixes.css
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/bullet.gif
Added:
trunk/web/reactos.org/htdocs/wiki/skins/roscms/discussionitem_icon.gif
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/external.png
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/file_icon.gif
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/headbg.jpg
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/link_icon.gif
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/lock_icon.gif
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/magnify-clip.png
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/mail_icon.gif
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/main.css
Added:
trunk/web/reactos.org/htdocs/wiki/skins/roscms/main_frik85_2005-11-04.cs
s
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/news_icon.png
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/required.gif
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/rtl.css
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/user.gif
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/wiki-indexed.png
Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/wiki.png
  _____  

Copied: trunk/web/reactos.org/htdocs/wiki (from rev 19934,
vendor/mediawiki/current)
  _____  

Modified: trunk/web/reactos.org/htdocs/wiki/includes/OutputPage.php
--- vendor/mediawiki/current/includes/OutputPage.php	2005-12-06
19:30:16 UTC (rev 19934)
+++ trunk/web/reactos.org/htdocs/wiki/includes/OutputPage.php
2005-12-06 19:41:09 UTC (rev 19936)
@@ -354,7 +354,9 @@

 				header( "Expires: -1" );
 				header( "Cache-Control: private,
must-revalidate, max-age=0" );
 			}
+/* TODO
 			if($this->mLastModified) header( "Last-modified:
{$this->mLastModified}" );
+*/
 		} else {
 			wfDebug( "** no caching **\n", false );
 
  _____  

Modified:
trunk/web/reactos.org/htdocs/wiki/includes/SpecialPreferences.php
--- vendor/mediawiki/current/includes/SpecialPreferences.php
2005-12-06 19:30:16 UTC (rev 19934)
+++ trunk/web/reactos.org/htdocs/wiki/includes/SpecialPreferences.php
2005-12-06 19:41:09 UTC (rev 19936)
@@ -174,26 +174,6 @@

 	function savePreferences() {
 		global $wgUser, $wgLang, $wgOut;
 
-		if ( '' != $this->mNewpass ) {
-			if ( $this->mNewpass != $this->mRetypePass ) {
-				$this->mainPrefsForm( wfMsg( 'badretype'
) );			
-				return;
-			}
-
-			if (!$wgUser->checkPassword( $this->mOldpass ))
{
-				$this->mainPrefsForm( wfMsg(
'wrongpassword' ) );
-				return;
-			}
-			$wgUser->setPassword( $this->mNewpass );
-		}
-		global $wgEnableEmail;
-		if( $wgEnableEmail ) {
-			$wgUser->setEmail( $this->mUserEmail );
-		}
-		$wgUser->setRealName( $this->mRealName );
-		$wgUser->setOption( 'language', $this->mUserLanguage );
-        $wgUser->setOption( 'variant', $this->mUserVariant );
-		$wgUser->setOption( 'nickname', $this->mNick );
 		$wgUser->setOption( 'quickbar', $this->mQuickbar );
 		$wgUser->setOption( 'skin', $this->mSkin );
 		$wgUser->setOption( 'math', $this->mMath );
@@ -407,84 +387,14 @@
 
 		$wgOut->addHTML( "<fieldset>
 		<legend>".wfMsg('prefs-personal')."</legend>");
-			if ($wgAllowRealName) {
-			$wgOut->addHTML("<div><label>$yrn: <input
type='text' name=\"wpRealName\" value=\"{$this->mRealName}\" size='20'
/></label></div>");
-		}
-		
-		global $wgEnableEmail, $wgEnableUserEmail;
-		if( $wgEnableEmail ) {
-			$wgOut->addHTML("
-			<div><label>$yem: <input type='text'
name=\"wpUserEmail\" value=\"{$this->mUserEmail}\" size='20'
/></label></div>" );
-			if( $wgEnableUserEmail ) {
-				$wgOut->addHTML("
-				<div><label><input type='checkbox' $emfc
value=\"1\" name=\"wpEmailFlag\" />$emf</label></div>" );
-			}
-		}
-		
-		$fancysig = $this->getToggle( 'fancysig' );
-		$wgOut->addHTML("
-		<div><label>$ynn: <input type='text' name=\"wpNick\"
value=\"{$this->mNick}\" size='25' /></label></div>
-		<div>$fancysig<br /></div>
-		<div><label>$yl: <select name=\"wpUserLanguage\">\n");
+		$wgOut->addHTML("<br><br><br>You can change your general
" .
+		                "account settings (password, email
address " .
+		                'etc.) <a href="' .
+		                htmlentities('/roscms/?page=user') .
+		                '">in myReactOS</a><br><br><br><br>'.
+		                "\n");
+		$wgOut->addHTML("</fieldset>\n");
 
-		/**
-		 * If a bogus value is set, default to the content
language.
-		 * Otherwise, no default is selected and the user ends
up
-		 * with an Afrikaans interface since it's first in the
list.
-		 */
-		if( isset( $wgLanguageNames[$this->mUserLanguage] ) ) {
-			$selectedLang = $this->mUserLanguage;
-		} else {
-			$selectedLang = $wgContLanguageCode;
-		}
-		foreach($wgLanguageNames as $code => $name) {
-			global $IP;
-			/* only add languages that have a file */
-
$langfile="$IP/languages/Language".str_replace('-', '_',
ucfirst($code)).".php";
-			if(file_exists($langfile) || $code ==
$wgContLanguageCode) {
-				$sel = ($code == $selectedLang)?
'selected="selected"' : '';
-				$wgOut->addHtml("\t<option
value=\"$code\" $sel>$code - $name</option>\n");
-			}
-		}
-		$wgOut->addHtml("</select></label></div>\n" );
-
-		/* see if there are multiple language variants to choose
from*/
-		if(!$wgDisableLangConversion) {
-			$variants = $wgContLang->getVariants();
-		
-			$variantArray=array();
-			foreach($variants as $v) {
-				$v = str_replace( '_', '-',
strtolower($v));
-				if($name=$wgLanguageNames[$v]) {
-					$variantArray[$v] = $name;
-				}
-			}
-		
-			if(sizeof($variantArray) > 1) {
-			$wgOut->addHtml("
-				<div><label>$yv: <select
name=\"wpUserVariant\">\n");
-				foreach($variantArray as $code => $name)
{
-					$sel =
($code==$this->mUserVariant)? 'selected="selected"' : '';
-					$wgOut->addHtml("\t<option
value=\"$code\" $sel>$code - $name</option>\n");
-				}
-			$wgOut->addHtml("</select></label></div>\n");
-			}
-		}
-		# Fields for changing password
-		#
-		$this->mOldpass = htmlspecialchars( $this->mOldpass );
-		$this->mNewpass = htmlspecialchars( $this->mNewpass );
-		$this->mRetypePass = htmlspecialchars(
$this->mRetypePass );
-
-		$wgOut->addHTML( "<fieldset>
-	<legend>$cp</legend>
-	<div><label>$opw: <input type='password' name=\"wpOldpass\"
value=\"{$this->mOldpass}\" size='20' /></label></div>
-	<div><label>$npw: <input type='password' name=\"wpNewpass\"
value=\"{$this->mNewpass}\" size='20' /></label></div>
-	<div><label>$rpw: <input type='password' name=\"wpRetypePass\"
value=\"{$this->mRetypePass}\" size='20' /></label></div>
-	" . $this->getToggle( "rememberpassword" ) . "
-	</fieldset>
-	<div
class='prefsectiontip'>".wfMsg('prefs-help-userdata')."</div>\n</fieldse
t>\n" );
-
 	
 		# Quickbar setting
 		#
  _____  

Modified:
trunk/web/reactos.org/htdocs/wiki/includes/SpecialUserlogin.php
--- vendor/mediawiki/current/includes/SpecialUserlogin.php
2005-12-06 19:30:16 UTC (rev 19934)
+++ trunk/web/reactos.org/htdocs/wiki/includes/SpecialUserlogin.php
2005-12-06 19:41:09 UTC (rev 19936)
@@ -9,482 +9,18 @@

  *
  */
 require_once('UserMailer.php');
+require_once( '/web/reactos.org/htdocs/roscms/inc/subsys_login.php' );
 
 /**
- * consutrctor
+ * constructor
  */
 function wfSpecialUserlogin() {
-	global $wgCommandLineMode;
-	global $wgRequest;
-	if( !$wgCommandLineMode && !isset(
$_COOKIE[ini_get('session.name')] )  ) {
-		User::SetupSession();
-	}
-	
-	$form = new LoginForm( $wgRequest );
-	$form->execute();
-}
+  $target = "/wiki";
+  roscms_subsys_login('wiki', ROSCMS_LOGIN_REQUIRED, $target);
 
-/**
- *
- * @package MediaWiki
- * @subpackage SpecialPage
- */
-class LoginForm {
-	var $mName, $mPassword, $mRetype, $mReturnto, $mCookieCheck,
$mPosted;
-	var $mAction, $mCreateaccount, $mCreateaccountMail,
$mMailmypassword;
-	var $mLoginattempt, $mRemember, $mEmail;
-	
-	function LoginForm( &$request ) {
-		global $wgLang, $wgAllowRealName, $wgEnableEmail;
-
-		$this->mName = $request->getText( 'wpName' );
-		$this->mPassword = $request->getText( 'wpPassword' );
-		$this->mRetype = $request->getText( 'wpRetype' );
-		$this->mReturnto = $request->getVal( 'returnto' );
-		$this->mCookieCheck = $request->getVal( 'wpCookieCheck'
);
-		$this->mPosted = $request->wasPosted();
-		$this->mCreateaccount = $request->getCheck(
'wpCreateaccount' );
-		$this->mCreateaccountMail = $request->getCheck(
'wpCreateaccountMail' )
-		                            && $wgEnableEmail;
-		$this->mMailmypassword = $request->getCheck(
'wpMailmypassword' )
-		                         && $wgEnableEmail;
-		$this->mLoginattempt = $request->getCheck(
'wpLoginattempt' );
-		$this->mAction = $request->getVal( 'action' );
-		$this->mRemember = $request->getCheck( 'wpRemember' );
-		
-		if( $wgEnableEmail ) {
-			$this->mEmail = $request->getText( 'wpEmail' );
-		} else {
-			$this->mEmail = '';
-		}
-		if( $wgAllowRealName ) {
-		    $this->mRealName = $request->getText( 'wpRealName'
);
-		} else {
-		    $this->mRealName = '';
-		}
-	    
-		# When switching accounts, it sucks to get automatically
logged out
-		if( $this->mReturnto == $wgLang->specialPage(
'Userlogout' ) ) {
-			$this->mReturnto = '';
-		}
-	}
-
-	function execute() {
-		if ( !is_null( $this->mCookieCheck ) ) {
-			$this->onCookieRedirectCheck(
$this->mCookieCheck );
-			return;
-		} else if( $this->mPosted ) {
-			if( $this->mCreateaccount ) {
-				return $this->addNewAccount();
-			} else if ( $this->mCreateaccountMail ) {
-				return
$this->addNewAccountMailPassword();
-			} else if ( $this->mMailmypassword ) {
-				return $this->mailPassword();
-			} else if ( ( 'submitlogin' == $this->mAction )
|| $this->mLoginattempt ) {
-				return $this->processLogin();
-			}
-		}
-		$this->mainLoginForm( '' );
-	}
-
-	/**
-	 * @access private
-	 */
-	function addNewAccountMailPassword() {
-		global $wgOut;
-		
-		if ('' == $this->mEmail) {
-			$this->mainLoginForm( wfMsg( 'noemail',
htmlspecialchars( $this->mName ) ) );
-			return;
-		}
-
-		$u = $this->addNewaccountInternal();
-
-		if ($u == NULL) {
-			return;
-		}
-
-		$u->saveSettings();
-		$error = $this->mailPasswordInternal($u);
-
-		$wgOut->setPageTitle( wfMsg( 'accmailtitle' ) );
-		$wgOut->setRobotpolicy( 'noindex,nofollow' );
-		$wgOut->setArticleRelated( false );
-	
-		if ( $error === '' ) {
-			$wgOut->addWikiText( wfMsg( 'accmailtext',
$u->getName(), $u->getEmail() ) );
-			$wgOut->returnToMain( false );
-		} else {
-			$this->mainLoginForm( wfMsg( 'mailerror', $error
) );
-		}
-
-		$u = 0;
-	}
-
-
-	/**
-	 * @access private
-	 */
-	function addNewAccount() {
-		global $wgUser, $wgOut;
-
-		$u = $this->addNewAccountInternal();
-
-		if ($u == NULL) {
-			return;
-		}
-
-		$wgUser = $u;
-		$wgUser->setCookies();
-
-		$wgUser->saveSettings();
-
-		if( $this->hasSessionCookie() ) {
-			return $this->successfulLogin( wfMsg(
'welcomecreation', $wgUser->getName() ) );
-		} else {
-			return $this->cookieRedirectCheck( 'new' );
-		}
-	}
-
-	/**
-	 * @access private
-	 */
-	function addNewAccountInternal() {
-		global $wgUser, $wgOut;
-		global $wgMaxNameChars, $wgUseLatin1, $wgEnableSorbs,
$wgProxyWhitelist;
-		global $wgMemc, $wgAccountCreationThrottle, $wgDBname,
$wgIP;
-
-		if (!$wgUser->isAllowedToCreateAccount()) {
-			$this->userNotPrivilegedMessage();
-			return;
-		}
-
-		if ( $wgEnableSorbs && !in_array( $wgIP,
$wgProxyWhitelist ) && 
-		  $wgUser->inSorbsBlacklist( $wgIP ) ) 
-		{
-			$this->mainLoginForm( wfMsg(
'sorbs_create_account_reason' ) );
-			return;
-		}
-
-
-		if ( 0 != strcmp( $this->mPassword, $this->mRetype ) ) {
-			$this->mainLoginForm( wfMsg( 'badretype' ) );
-			return;
-		}
-		
-		$name = trim( $this->mName );
-		$u = User::newFromName( $name );
-		if ( is_null( $u ) ||
-		  ( '' == $name ) ||
-		  preg_match(
"/\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}/", $name ) ||
-		  (strpos( $name, "/" ) !== false) ||
-		  (strlen( $name ) > $wgMaxNameChars) ||
-                  ($wgUseLatin1 && preg_match( "/[\x80-\xA0]/", $name
)) ||
-		  ucFirst($name) != $u->getName() ) 
-		{
-			$this->mainLoginForm( wfMsg( 'noname' ) );
-			return;
-		}
-		if ( wfReadOnly() ) {
-			$wgOut->readOnlyPage();
-			return;
-		}
-		
-		if ( 0 != $u->idForName() ) {
-			$this->mainLoginForm( wfMsg( 'userexists' ) );
-			return;
-		}
-
-		if ( $wgAccountCreationThrottle ) {
-			$key = $wgDBname.':acctcreate:ip:'.$wgIP;
-			$value = $wgMemc->incr( $key );
-			if ( !$value ) {
-				$wgMemc->set( $key, 1, 86400 );
-			}
-			if ( $value > $wgAccountCreationThrottle ) {
-				$this->throttleHit(
$wgAccountCreationThrottle );
-				return;
-			}
-		}
-
-		# Update user count
-		$ssUpdate = new SiteStatsUpdate( 0, 0, 0, 0, 1 );
-		$ssUpdate->doUpdate();
-
-		return $this->initUser( $u );
-	}
-	
-	/**
-	 * Actually add a user to the database.
-	 * Give it a User object that has been initialised with a name.
-	 *
-	 * @param User $u
-	 * @return User
-	 * @access private
-	 */
-	function &initUser( &$u ) {
-		$u->addToDatabase();
-		$u->setPassword( $this->mPassword );
-		$u->setEmail( $this->mEmail );
-		$u->setRealName( $this->mRealName );
-		$u->setToken();
-		
-		global $wgAuth;
-		$wgAuth->initUser( $u );
-
-		if ( $this->mRemember ) { $r = 1; }
-		else { $r = 0; }
-		$u->setOption( 'rememberpassword', $r );
-		
-		return $u;
-	}
-
-	/**
-	 * @access private
-	 */
-	function processLogin() {
-		global $wgUser;
-
-		if ( '' == $this->mName ) {
-			$this->mainLoginForm( wfMsg( 'noname' ) );
-			return;
-		}
-		$u = User::newFromName( $this->mName );
-		if( is_null( $u ) ) {
-			$this->mainLoginForm( wfMsg( 'noname' ) );
-			return;
-		}
-		if ( 0 == $u->getID() ) {
-			global $wgAuth;
-			/**
-			 * If the external authentication plugin allows
it,
-			 * automatically create a new account for users
that
-			 * are externally defined but have not yet
logged in.
-			 */
-			if ( $wgAuth->autoCreate() &&
$wgAuth->userExists( $u->getName() ) ) {
-				if ( $wgAuth->authenticate(
$u->getName(), $this->mPassword ) ) {
-					$u =& $this->initUser( $u );
-				} else {
-					$this->mainLoginForm( wfMsg(
'wrongpassword' ) );
-					return;
-				}
-			} else {
-				$this->mainLoginForm( wfMsg(
'nosuchuser', $u->getName() ) );
-				return;
-			}
-		} else {
-			$u->loadFromDatabase();
-		}
-		if (!$u->checkPassword( $this->mPassword )) {
-			$this->mainLoginForm( wfMsg( 'wrongpassword' )
);
-			return;
-		}
-
-		# We've verified now, update the real record
-		#
-		if ( $this->mRemember ) {
-			$r = 1;
-		} else {
-			$r = 0;
-		}
-		$u->setOption( 'rememberpassword', $r );
-
-		$wgUser = $u;
-		$wgUser->setCookies();
-
-		$wgUser->saveSettings();
-		
-		if( $this->hasSessionCookie() ) {
-			return $this->successfulLogin( wfMsg(
'loginsuccess', $wgUser->getName() ) );
-		} else {
-			return $this->cookieRedirectCheck( 'login' );
-		}
-	}
-
-	/**
-	 * @access private
-	 */
-	function mailPassword() {
-		global $wgUser, $wgDeferredUpdateList,
$wgOutputEncoding;
-		global $wgCookiePath, $wgCookieDomain, $wgDBname;
-
-		if ( '' == $this->mName ) {
-			$this->mainLoginForm( wfMsg( 'noname' ) );
-			return;
-		}
-		$u = User::newFromName( $this->mName );
-		if( is_null( $u ) ) {
-			$this->mainLoginForm( wfMsg( 'noname' ) );
-			return;
-		}
-		if ( 0 == $u->getID() ) {
-			$this->mainLoginForm( wfMsg( 'nosuchuser',
$u->getName() ) );
-			return;
-		}
-
-		$u->loadFromDatabase();
-
-		$error = $this->mailPasswordInternal( $u );
-		if ($error === '') {
-			$this->mainLoginForm( wfMsg( 'passwordsent',
$u->getName() ) );
-		} else {
-			$this->mainLoginForm( wfMsg( 'mailerror', $error
) );
-		}
-
-	}
-
-
-	/**
-	 * @access private
-	 */
-	function mailPasswordInternal( $u ) {
-		global $wgDeferredUpdateList, $wgOutputEncoding;
-		global $wgPasswordSender, $wgDBname, $wgIP;
-		global $wgCookiePath, $wgCookieDomain;
-
-		if ( '' == $u->getEmail() ) {
-			return wfMsg( 'noemail', $u->getName() );
-		}
-		$np = User::randomPassword();
-		$u->setNewpassword( $np );
-
-		setcookie( "{$wgDBname}Token", '', time() - 3600,
$wgCookiePath, $wgCookieDomain );
-		$u->saveSettings();
-
-		$ip = $wgIP;
-		if ( '' == $ip ) { $ip = '(Unknown)'; }
-
-		$m = wfMsg( 'passwordremindertext', $ip, $u->getName(),
$np );
-
-		$error = userMailer( $u->getEmail(), $wgPasswordSender,
wfMsg( 'passwordremindertitle' ), $m );
-		
-		return htmlspecialchars( $error );
-	}
-
-
-	/**
-	 * @access private
-	 */
-	function successfulLogin( $msg ) {
-		global $wgUser;
-		global $wgDeferredUpdateList;
-		global $wgOut;
-
-		# Run any hooks; ignore results
-		
-		wfRunHooks('UserLoginComplete', array(&$wgUser));
-		
-		$wgOut->setPageTitle( wfMsg( 'loginsuccesstitle' ) );
-		$wgOut->setRobotpolicy( 'noindex,nofollow' );
-		$wgOut->setArticleRelated( false );
-		$wgOut->addWikiText( $msg );
-		$wgOut->returnToMain();
-	}
-
-	function userNotPrivilegedMessage() {
-		global $wgOut, $wgUser, $wgLang;
-		
-		$wgOut->setPageTitle( wfMsg( 'whitelistacctitle' ) );
-		$wgOut->setRobotpolicy( 'noindex,nofollow' );
-		$wgOut->setArticleRelated( false );
-
-		$wgOut->addWikiText( wfMsg( 'whitelistacctext' ) );
-		
-		$wgOut->returnToMain( false );
-	}
-
-	/**
-	 * @access private
-	 */
-	function mainLoginForm( $err ) {
-		global $wgUser, $wgOut, $wgLang;
-		global $wgDBname, $wgAllowRealName, $wgEnableEmail;
-
-		if ( '' == $this->mName ) {
-			if ( 0 != $wgUser->getID() ) {
-				$this->mName = $wgUser->getName();
-			} else {
-				$this->mName =
@$_COOKIE[$wgDBname.'UserName'];
-			}
-		}
-
-		$q = 'action=submitlogin';
-		if ( !empty( $this->mReturnto ) ) {
-			$q .= '&returnto=' . wfUrlencode(
$this->mReturnto );
-		}
-		$titleObj = Title::makeTitle( NS_SPECIAL, 'Userlogin' );
-
-
-		require_once( 'templates/Userlogin.php' );
-		$template =& new UserloginTemplate();
-		
-		$template->set( 'name', $this->mName );
-		$template->set( 'password', $this->mPassword );
-		$template->set( 'retype', $this->mRetype );
-		$template->set( 'email', $this->mEmail );
-		$template->set( 'realname', $this->mRealName );
-
-		$template->set( 'action', $titleObj->getLocalUrl( $q )
);
-		$template->set( 'error', $err );
-		$template->set( 'create',
$wgUser->isAllowedToCreateAccount() );
-		$template->set( 'createemail', $wgEnableEmail &&
$wgUser->getID() != 0 );
-		$template->set( 'userealname', $wgAllowRealName );
-		$template->set( 'useemail', $wgEnableEmail );
-		$template->set( 'remember', $wgUser->getOption(
'rememberpassword' ) );
-		
-		$wgOut->setPageTitle( wfMsg( 'userlogin' ) );
-		$wgOut->setRobotpolicy( 'noindex,nofollow' );
-		$wgOut->setArticleRelated( false );
-		$wgOut->addTemplate( $template );
-	}
-
-	/**
-	 * @access private
-	 */
-	function hasSessionCookie() {
-		global $wgDisableCookieCheck;
-		return ( $wgDisableCookieCheck ) ? true : ( '' !=
$_COOKIE[session_name()] );
-	}
-	  
-	/**
-	 * @access private
-	 */
-	function cookieRedirectCheck( $type ) {
-		global $wgOut, $wgLang;
-
-		$titleObj = Title::makeTitle( NS_SPECIAL, 'Userlogin' );
-		$check = $titleObj->getFullURL( 'wpCookieCheck='.$type
);
-
-		return $wgOut->redirect( $check );
-	}
-
-	/**
-	 * @access private
-	 */
-	function onCookieRedirectCheck( $type ) {
-		global $wgUser;
-
-		if ( !$this->hasSessionCookie() ) {
-			if ( $type == 'new' ) {
-				return $this->mainLoginForm( wfMsg(
'nocookiesnew' ) );
-			} else if ( $type == 'login' ) {
-				return $this->mainLoginForm( wfMsg(
'nocookieslogin' ) );
-			} else {
-				# shouldn't happen
-				return $this->mainLoginForm( wfMsg(
'error' ) );
-			}
-		} else {
-			return $this->successfulLogin( wfMsg(
'loginsuccess', $wgUser->getName() ) );
-		}
-	}
-
-	/**
-	 * @access private
-	 */
-	function throttleHit( $limit ) {
-		global $wgOut;
-
-		$wgOut->addWikiText( wfMsg(
'acct_creation_throttle_hit', $limit ) );
-	}
+  /* We should never end up here, but in case we do... */
+  header("Location: $target");
+  exit;
 }
+
 ?>
  _____  

Modified:
trunk/web/reactos.org/htdocs/wiki/includes/SpecialUserlogout.php
--- vendor/mediawiki/current/includes/SpecialUserlogout.php
2005-12-06 19:30:16 UTC (rev 19934)
+++ trunk/web/reactos.org/htdocs/wiki/includes/SpecialUserlogout.php
2005-12-06 19:41:09 UTC (rev 19936)
@@ -16,12 +16,8 @@

 		$wgUser->logout();
 
 		wfRunHooks('UserLogoutComplete', array(&$wgUser));
-		
-		$wgOut->mCookies = array();
-		$wgOut->setRobotpolicy( 'noindex,nofollow' );
-		$wgOut->addHTML( wfMsg( 'logouttext' ) );
-		$wgOut->returnToMain();
-		
+
+		header("Location: /roscms/?page=logout");
 	}
 }
 
  _____  

Modified: trunk/web/reactos.org/htdocs/wiki/includes/User.php
--- vendor/mediawiki/current/includes/User.php	2005-12-06 19:30:16 UTC
(rev 19934)
+++ trunk/web/reactos.org/htdocs/wiki/includes/User.php	2005-12-06
19:41:09 UTC (rev 19936)
@@ -9,6 +9,7 @@

  *
  */
 require_once( 'WatchedItem.php' );
+require_once( '/web/reactos.org/htdocs/roscms/inc/subsys_login.php' );
 
 # Number of characters in user_token field
 define( 'USER_TOKEN_LENGTH', 32 );
@@ -453,6 +454,7 @@
 	function loadFromSession() {
 		global $wgMemc, $wgDBname;
 
+/*
 		if ( isset( $_SESSION['wsUserID'] ) ) {
 			if ( 0 != $_SESSION['wsUserID'] ) {
 				$sId = $_SESSION['wsUserID'];
@@ -473,6 +475,11 @@
 		} else {
 			return new User();
 		}
+*/
+$sId = roscms_subsys_login('wiki', ROSCMS_LOGIN_OPTIONAL, "");
+if (0 == $sId) {
+	return new User();
+}
 
 		$passwordCorrect = FALSE;
 		$user = $wgMemc->get( $key = "$wgDBname:user:id:$sId" );
@@ -484,7 +491,10 @@
 		} else {
 			wfDebug( "User::loadFromSession() got from
cache!\n" );
 		}
+$userid = $user->getID();
+//print "#1 $userid\n";
 
+/*
 		if ( isset( $_SESSION['wsToken'] ) ) {
 			$passwordCorrect = $_SESSION['wsToken'] ==
$user->mToken;
 		} else if ( isset( $_COOKIE["{$wgDBname}Token"] ) ) {
@@ -492,8 +502,13 @@
 		} else {
 			return new User(); # Can't log in from session
 		}
+*/
+$passwordCorrect = TRUE;
 
+/*
 		if ( ( $sName == $user->mName ) && $passwordCorrect ) {
+*/
+{
 			if($makenew) {
 				if($wgMemc->set( $key, $user ))
 					wfDebug(
"User::loadFromSession() successfully saved user\n" );
@@ -502,6 +517,7 @@
 			}
 			return $user;
 		}
+die("failed");
 		return new User(); # Can't log in from session
 	}
 
  _____  

Added: trunk/web/reactos.org/htdocs/wiki/skins/RosCms.php
--- vendor/mediawiki/current/skins/RosCms.php	2005-12-06 19:30:16 UTC
(rev 19934)
+++ trunk/web/reactos.org/htdocs/wiki/skins/RosCms.php	2005-12-06
19:41:09 UTC (rev 19936)
@@ -0,0 +1,239 @@

+<?php
+/**
+ * RosCms nouveau
+ *
+ * Translated from gwicke's previous TAL template version to remove
+ * dependency on PHPTAL.
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+	die();
+
+/** */
+require_once('includes/SkinTemplate.php');
+
+/**
+ * Inherit main code from SkinTemplate, set the CSS and template
filter.
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Skins
+ */
+class SkinRosCms extends SkinTemplate {
+	/** Using roscms. */
+	function initPage( &$out ) {
+		SkinTemplate::initPage( $out );
+		$this->skinname  = 'roscms';
+		$this->stylename = 'roscms';
+		$this->template  = 'RosCmsTemplate';
+	}
+}
+	
+class RosCmsTemplate extends QuickTemplate {
+	/**
+	 * Template filter callback for RosCms skin.
+	 * Takes an associative array of data set from a
SkinTemplate-based
+	 * class, and a wrapper for MediaWiki's localization database,
and
+	 * outputs a formatted page.
+	 *
+	 * @access private
+	 */
+	function execute() {
+		global $wgUser, $wgTitle;
+echo "<?xml version='1.0'?>\n";?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php
$this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php
$this->text('dir') ?>">
+  <head>
+    <meta http-equiv="Content-Type" content="<?php
$this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
+    <?php $this->html('headlinks') ?>
+    <title><?php $this->text('pagetitle') ?></title>
+    <link href="/style.css" type="text/css" rel="stylesheet" />
+    <style type="text/css" media="screen,projection">/*<![CDATA[*/
@import "<?php $this->text('stylepath') ?>/<?php
$this->text('stylename') ?>/main.css"; /*]]>*/</style>
+    <link rel="stylesheet" type="text/css" media="print" href="<?php
$this->text('stylepath') ?>/common/commonPrint.css" />
+    <!--[if lt IE 5.5000]><style type="text/css">@import "<?php
$this->text('stylepath') ?>/<?php $this->text('stylename')
?>/IE50Fixes.css";</style><![endif]-->
+    <!--[if IE 5.5000]><style type="text/css">@import "<?php
$this->text('stylepath') ?>/<?php $this->text('stylename')
?>/IE55Fixes.css";</style><![endif]-->
+    <!--[if gte IE 6]><style type="text/css">@import "<?php
$this->text('stylepath') ?>/<?php $this->text('stylename')
?>/IE60Fixes.css";</style><![endif]-->
+    <!--[if IE]><script type="text/javascript" src="<?php
$this->text('stylepath') ?>/common/IEFixes.js"></script>
+    <meta http-equiv="imagetoolbar" content="no" /><![endif]-->
+    <?php if($this->data['jsvarurl'  ]) { ?><script
type="text/javascript" src="<?php $this->text('jsvarurl'  )
?>"></script><?php } ?>
+    <script type="text/javascript" src="<?php
$this->text('stylepath' ) ?>/common/wikibits.js"></script>
+    <?php if($this->data['usercss'   ]) { ?><style
type="text/css"><?php              $this->html('usercss'   )
?></style><?php    } ?>
+    <?php if($this->data['userjs'    ]) { ?><script
type="text/javascript" src="<?php $this->text('userjs'    )
?>"></script><?php } ?>
+    <?php if($this->data['userjsprev']) { ?><script
type="text/javascript"><?php      $this->html('userjsprev')
?></script><?php   } ?>
+  </head>
+  <body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php
$this->text('body_ondblclick') ?>"<?php } ?>
+        <?php if($this->data['nsclass'        ]) { ?>class="<?php
$this->text('nsclass')         ?>"<?php } ?>>
+<div id="top">
+  <div id="topMenu"> 
+    <!-- 
+       Use <p> to align things for links/lynx, then in the css make it
+	   margin: 0; and use text-align: left/right/etc;.
+   -->
+	<p align="center"> 
+		<a href="/?page=index">Home</a> <font
color="#ffffff">|</font> 
+		<a href="/?page=community">Community</a> <font
color="#ffffff">|</font> 
+		<a href="/?page=support">Support</a> <font
color="#ffffff">|</font> 
+		<a href="/?page=dev">Development</a> <font
color="#ffffff">|</font> 
+		<a href="/roscms/?page=user">myReactOS</a> </p>
+	 </div>
+	</div>
+
+<table border="0" width="100%" cellpadding="0" cellspacing="0">
+ <tr valign="top">
+    <td width="147" id="leftNav"> 
+      <div class="navTitle">Navigation</div>
+   <ol>
+        <li><a href="/?page=index">Home</a></li>
+        <li><a href="/?page=community">Community</a></li>
+        <li><a href="/?page=support">Support</a></li>
+        <li><a href="/?page=dev">Development</a></li>
+	<li><a href="/roscms/?page=user">myReactOS</a></li>
+      </ol>
+   <p></p>
+
+<div class="navTitle">Wiki</div>
+      <ol>
+        <?php foreach($this->data['navigation_urls'] as $navlink) { ?>
+        <li><a href="<?php echo htmlspecialchars($navlink['href'])
?>"><?php
+                echo htmlspecialchars($navlink['text']) ?></a></li>
+        <?php } ?>
+      </ol>
+      <p></p>
+
+<div class="navTitle">Wiki Toolbox</div>
+  <ol>
+    <?php if($this->data['notspecialpage']) { foreach( array(
'whatlinkshere', 'recentchangeslinked' ) as $special ) { ?>
+      <li><a href="<?php
+             echo
htmlspecialchars($this->data['nav_urls'][$special]['href'])
+                  ?>"><?php echo $this->msg($special) ?></a></li>
+    <?php } } ?>
+    <?php if(/*$this->data['feeds'] Let's not do this now*/ 0) { ?>
+      <li>
+        <?php foreach($this->data['feeds'] as $key => $feed) { ?>
+          <span id="feed-<?php echo htmlspecialchars($key) ?>"><a
href="<?php
+                  echo htmlspecialchars($feed['href']) ?>">
+            <?php echo htmlspecialchars($feed['text'])?></a>&nbsp;
+          </span>
+        <?php } ?>
+      </li>
+    <?php } ?>
+    <?php foreach( array('contributions', 'emailuser', 'upload',
'specialpages', 'preferences') as $special ) { ?>
+      <?php if($this->data['nav_urls'][$special]) {?>
+        <li>
+          <a href="<?php
+                echo
htmlspecialchars($this->data['nav_urls'][$special]['href'])
+                ?>"><?php $this->msg($special) ?></a>
+        </li>
+      <?php } ?>
+    <?php } ?>
+
+  </ol>
+  <p></p>
+
+<form name="searchform" action="/wiki/index.php/Special:Search"
id="searchform">
+ <div class="navTitle">Search</div>   
+ <div class="navBox">
+  <div style="text-align:center;">
+   <input id="searchInput" name="search" type="text"
+     accesskey="f" value="" />
+   <input type='submit' name="go" class="searchButton"
id="searchGoButton"
+     value="Go"
+     />&nbsp;<input type='submit' name="fulltext"
+     class="searchButton"
+     value="Search" />
+  </div>
+ </div>
+</form>
+
+<div class="navTitle">Account</div>
+      <ol>
+        <?php if (0 != $wgUser->getID()) { ?>
+          <li><a href="/roscms/?page=logout">Logout <?php echo
$wgUser->getName() ?></a></li>
+        <?php } else { ?>
+          <li><a href="/roscms/?page=login&amp;target=<?php echo
urlencode($wgTitle->getLocalURL()); ?>">Login</a></li>
+        <?php } ?>
+        <li><a href="/roscms/?page=register&amp;target=<?php echo
urlencode($wgTitle->getLocalURL()); ?>">Register</a></li>
+        <?php if (0 != $wgUser->getID()) { ?>
+          <li><a
href="/wiki/index.php/Special:Preferences">Preferences</a></li>
+        <?php } ?>
+      </ol>
+      <p></p>
+      </td>
+
+<td id="wikiContent">
+<div class="contentSmall">
+<div class="contentSmallTitle"><a class="roscmscontent"
href="http://www.reactos.org/xhtml/en/community.html">ReactOS
Community</a> &gt; ReactOS Wiki</span>
+</div>
+    <div id="globalWrapper">
+      <div id="column-content">
+	<div id="content">
+	  <a name="top" id="contentTop"></a>
+	  <?php if($this->data['sitenotice']) { ?><div
id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+	  <h1 class="firstHeading"><?php $this->text('title') ?></h1>
+	  <div id="bodyContent">
+	    <h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
+	    <div id="contentSub"><?php $this->html('subtitle') ?></div>
+	    <?php if($this->data['undelete']) { ?><div
id="contentSub"><?php     $this->html('undelete') ?></div><?php } ?>
+	    <?php if($this->data['newtalk'] ) { ?><div
class="usermessage"><?php $this->html('newtalk')  ?></div><?php } ?>
+	    <!-- start content -->
+	    <?php $this->html('bodytext') ?>
+	    <?php if($this->data['catlinks']) { ?><div
id="catlinks"><?php       $this->html('catlinks') ?></div><?php } ?>
+	    <!-- end content -->
+	    <div class="visualClear"></div>
+	  </div>
+	</div>
+      </div>
+      <div id="column-one">
+	<div id="p-cactions" class="portlet">
+	  <h5>Views</h5>
+	  <ul>
+	    <?php foreach($this->data['content_actions'] as $key =>
$action) {
+	       ?><li id="ca-<?php echo htmlspecialchars($key) ?>"
+	       <?php if($action['class']) { ?>class="<?php echo
htmlspecialchars($action['class']) ?>"<?php } ?>
+	       ><a href="<?php echo htmlspecialchars($action['href'])
?>"><?php
+	       echo htmlspecialchars($action['text']) ?></a></li><?php
+	     } ?>
+	  </ul>
+	</div>
+	<script type="text/javascript"> if (window.isMSIE55) fixalpha();
</script>
+      </div><!-- end of the left (by default at least) column -->
+      <div class="visualClear"></div>
+      <div id="footer">
+    <?php if($this->data['poweredbyico']) { ?><div
id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div><?php } ?>
+	<?php if($this->data['copyrightico']) { ?><div
id="f-copyrightico"><?php $this->html('copyrightico') ?></div><?php } ?>
+	<ul id="f-list">
+	  <?php if($this->data['lastmod'   ]) { ?><li
id="f-lastmod"><?php    $this->html('lastmod')    ?></li><?php } ?>
+	  <?php if($this->data['viewcount' ]) { ?><li
id="f-viewcount"><?php  $this->html('viewcount')  ?></li><?php } ?>
+	  <?php if($this->data['credits'   ]) { ?><li
id="f-credits"><?php    $this->html('credits')    ?></li><?php } ?>
+	  <?php if($this->data['copyright' ]) { ?><li
id="f-copyright"><?php  $this->html('copyright')  ?></li><?php } ?>
+	  <?php if($this->data['about'     ]) { ?><li id="f-about"><?php
$this->html('about')      ?></li><?php } ?>
+	  <?php if($this->data['disclaimer']) { ?><li
id="f-disclaimer"><?php $this->html('disclaimer') ?></li><?php } ?>
+	</ul>
+      </div>
+    </div>
+    <?php $this->html('reporttime') ?>
+</td>
+</tr>
+</table>
+
+<!--
+     links/lynx/etc.. dont handle css (atleast not external
+     files by default) so dont overly depend on it.
+ -->
+<hr size="1"/>
+
+<address>
+ <p align="center">
+  ReactOS is a trademark of ReactOS Foundation in the United States and
other countries.
+ </p>
+</address>
+  </body>
+</html>
+<?php
+	}
+}
+
+?>
  _____  

Added: trunk/web/reactos.org/htdocs/wiki/skins/common/images/reactos.png
(Binary files differ)
Property changes on:
trunk/web/reactos.org/htdocs/wiki/skins/common/images/reactos.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
  _____  

Added: trunk/web/reactos.org/htdocs/wiki/skins/roscms/IE50Fixes.css
--- vendor/mediawiki/current/skins/roscms/IE50Fixes.css	2005-12-06
19:30:16 UTC (rev 19934)
+++ trunk/web/reactos.org/htdocs/wiki/skins/roscms/IE50Fixes.css
2005-12-06 19:41:09 UTC (rev 19936)
@@ -0,0 +1,67 @@

+/*
+** IE5.0 Fix Stylesheet
+*/
+
+#column-content {
+    margin: 0 !important;
+    float: none;
+}
+#column-content #content { 
+    margin-top: 3em; 
+    height: 1%;
+}
+#column-one {
+    position: absolute;
+    overflow: visible;
+    top: 0;
+    left: 0;
+    z-index: 3;
+}
+#footer {
+    margin: 0 0 0 13.6em;
+}
+
+/* IE 5 & 5.5 interpret keyword sizes one off */
+body { font-size: xx-small; }
+/*
+** the edit tabs
[truncated at 1000 lines; 1632 more skipped] 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051206/89e6cd0b/attachment.html


More information about the Ros-diffs mailing list