r23010 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23009‎ | r23010 | r23011 >
Date:12:20, 15 June 2007
Author:erik
Status:old
Tags:
Comment:
-debug info
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php
@@ -109,23 +109,21 @@
110110 return str_replace(' ', '_', $spelling);
111111 }
112112
 113+
113114 function createPage($namespace, $title) {
114115 $dbr = &wfGetDB(DB_MASTER);
115116 $title = $dbr->addQuotes($title);
116117 $timestamp = $dbr->timestamp();
117 -
118 - echo "createPage(): namespace = $namespace and title = $title\n";
119118 $sql = "select page_id from page where page_namespace = $namespace and page_title = $title";
120119 $queryResult = $dbr->query($sql);
121120 $page = $dbr->fetchObject($queryResult);
122121 if (isset($page->page_id) ){
123122 return $page->page_id;
124123 }
125 - else{
 124+ else {
126125 $sql = "insert into page(page_namespace,page_title,page_is_new,page_touched) ".
127 - "values($namespace, $title, 1, $timestamp)";
 126+ "values($namespace, $title, 1, $timestamp)";
128127 $dbr->query($sql);
129 -
130128 return $dbr->insertId();
131129 }
132130 }

Status & tagging log