Index: trunk/extensions/Wikidata/OmegaWiki/type.php |
— | — | @@ -28,6 +28,7 @@ |
29 | 29 | global $wgArticlePath, $wdDefaultViewDataSet; |
30 | 30 | |
31 | 31 | $myTitle = str_replace( "&", urlencode("&") , $title ) ; |
| 32 | + $myTitle = str_replace( "?", urlencode("?") , $title ) ; |
32 | 33 | $url = str_replace( "$1", $nameSpace . ':' . $myTitle , $wgArticlePath ); |
33 | 34 | |
34 | 35 | if ( $usedc ) { |
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php |
— | — | @@ -1115,8 +1115,15 @@ |
1116 | 1116 | $wgOut->addMeta( 'Description', $expression . ": " . $definition ); |
1117 | 1117 | $isMetaDescSet = 1 ; |
1118 | 1118 | } |
1119 | | - |
1120 | | - return $definedMeaningAsLink . ": " . $escapedDefinition; |
| 1119 | + |
| 1120 | + $DMPageName = definingExpression( $value ) . " (" . $value . ")" ; |
| 1121 | + $DMTitle = Title::makeTitle( NS_DEFINEDMEANING , $DMPageName ); |
| 1122 | + $editURL = $DMTitle->getLocalURL( 'action=edit' ) ; |
| 1123 | + $editLink = '<div style="float:right; font-size:60%;"><sup>[' |
| 1124 | + . createLink( $editURL , wfMsg( 'edit') ) |
| 1125 | + . ']</sup></div>' ; |
| 1126 | + |
| 1127 | + return $editLink . $definedMeaningAsLink . ": " . $escapedDefinition ; |
1121 | 1128 | } |
1122 | 1129 | |
1123 | 1130 | public function getEditHTML( IdStack $idPath, $value ) { |
— | — | @@ -1132,8 +1139,7 @@ |
1133 | 1140 | } |
1134 | 1141 | |
1135 | 1142 | public function getInputValue( $id ) { |
1136 | | - global |
1137 | | - $wgRequest; |
| 1143 | + global $wgRequest; |
1138 | 1144 | |
1139 | 1145 | return trim( $wgRequest->getText( $id ) ); |
1140 | 1146 | } |