r26136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26135‎ | r26136 | r26137 >
Date:22:00, 25 September 2007
Author:kim
Status:old
Tags:
Comment:
Tidy, + add extra debugging option to App.php
Modified paths:
  • /trunk/extensions/Wikidata/App.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialCopy.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/App.php
@@ -38,6 +38,7 @@
3939 # The permission needed to do ...
4040 $wgCommunityEditPermission="editwikidata-tt"; # only used for copy for now
4141 $wgCommunity_dc="tt";
 42+$extra_debugging=true;
4243
4344 # The site prefix allows us to have multiple sets of customized
4445 # messages (for different, typically site-specific UIs)
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialCopy.php
@@ -137,32 +137,8 @@
138138 $wgOut->addWikiText(wfMsgSc("copy_help"));
139139 }
140140
141 - protected function insert() {
142 - global
143 - $wgRequest, $wgOut;
144 -
145 - # $wgRequest->getText( 'page' );
146 - $sets=wdGetDataSets();
147 - #$requests=$wgRequest->getValues();
148 - $wgOut->addWikiText("<h2>".wfMsgSc("will_insert")."</h2>");
149 - $map=array();
150 - foreach ($sets as $key => $set) {
151 - $dc=$set->getPrefix();
152 - $dm_id=$wgRequest->getText($dc);
153 - $name=$set->fetchName();
154 -
155 - $dm_id_ui=$dm_id; # Only for teh purdy
156 - if ($dm_id_ui==null)
157 - $dm_id_ui="unset";
158 - $wgOut->addWikiText("$name ->$dm_id_ui");
159 - $map[$dc]=$dm_id;
160 - #$dbr=&wfGetDB(DB_MASTER);
161 - }
162 - createConceptMapping($map);
163 - }
164 -
165141 /**read in and partially validate parameters,
166 - * then call docopy()
 142+ * then call _doCopy()
167143 */
168144 protected function copy_by_param() {
169145 global
@@ -218,32 +194,7 @@
219195 return true; # seems everything went ok.
220196
221197 }
222 -
223 -
224 - protected function get() {
225 - global
226 - $wgOut, $wgRequest;
227 - $concept_id=$wgRequest->getText("concept");
228 - $wgOut->addWikiText("<h2>".wfMsgSc("contents_of_mapping")."</h2>");
229 - $map=readConceptMapping($concept_id);
230 - #$sets=wdGetDataSets();
231 -
232 - foreach ($map as $dc => $dm_id) {
233 - $wgOut->addWikiText("$dc -> $dm_id");
234 - }
235 - }
236 -
237 - protected function list_sets() {
238 - global $wgOut;
239 - $wgOut->addWikiText("<h2>".wfMsgSc("available contexts")."</h2>");
240 - $sets=wdGetDataSets();
241 - foreach ($sets as $key => $set) {
242 - $name=$set->fetchName();
243 - $wgOut->addWikiText("$key => $name");
244 - }
245 - }
246198 }
247 -
248199 SpecialPage::addPage( new SpecialCopy );
249200
250201 }

Status & tagging log