Mediawiki: Difference between revisions

From RavenWiki
Jump to navigationJump to search
(How to change mediawiki v. 1.5.2 for Raven.)
 
(Add reference to CS use; CARET Wiki)
Line 1: Line 1:
Mediawiki is the wiki software powering wikipedia. It can fairly easily be made to work with Raven.
Mediawiki is the wiki software powering wikipedia. It can fairly easily be made to work with Raven. The Computing Service has been using a Raven-enabled copy of Mediawiki internally for some time. [http://caret.cam.ac.uk/ CARET] have a Raven-enabled copy of
Mediawiki that is available to the university - see http://wiki.caret.cam.ac.uk/


=Software hacks, 1.5.2=
==Software hacks, 1.5.2==


The only code changed is <tt>includes/User.php</tt>, with the following change on line 153 (keep the CRSID lowercase):
The only code changed is <tt>includes/User.php</tt>, with the following change on line 153 (keep the CRSID lowercase):

Revision as of 09:33, 29 November 2005

Mediawiki is the wiki software powering wikipedia. It can fairly easily be made to work with Raven. The Computing Service has been using a Raven-enabled copy of Mediawiki internally for some time. CARET have a Raven-enabled copy of Mediawiki that is available to the university - see http://wiki.caret.cam.ac.uk/

Software hacks, 1.5.2

The only code changed is includes/User.php, with the following change on line 153 (keep the CRSID lowercase):

$s = $dbr->selectRow( 'user', array( 'user_id' ), array( 'user_name' => $name ), $fname );

... and in the function newFromName():

if ( isset( $_SERVER["REMOTE_USER"] ) ) {
  $sName = $_SERVER["REMOTE_USER"];
  $sId = User::idFromName($sName);
  $user = new User();
  if ( $sId == 0 ) {
    /* User doesn't exist here yet.  */
    $user->setName($sName);
    $user->addToDatabase();
  } else {
    $user->mId = $sId;
    $user->loadFromDatabase();
  }
  return $user;
}