Index: branches/apiedit/phase3/maintenance/postgres/compare_schemas.pl |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | my $datatype = join '|' => qw( |
37 | 37 | bool |
38 | 38 | tinyint int bigint real float |
39 | | -tinytext mediumtext text char varchar varbinary |
| 39 | +tinytext mediumtext text char varchar varbinary binary |
40 | 40 | timestamp datetime |
41 | 41 | tinyblob mediumblob blob |
42 | 42 | ); |
Index: branches/apiedit/phase3/includes/Xml.php |
— | — | @@ -330,7 +330,9 @@ |
331 | 331 | |
332 | 332 | /** |
333 | 333 | * Encode a variable of unknown type to JavaScript. |
334 | | - * Doesn't support hashtables just yet. |
| 334 | + * Arrays are converted to JS arrays, objects are converted to JS associative |
| 335 | + * arrays (objects). So cast your PHP associative arrays to objects before |
| 336 | + * passing them to here. |
335 | 337 | */ |
336 | 338 | public static function encodeJsVar( $value ) { |
337 | 339 | if ( is_bool( $value ) ) { |
— | — | @@ -341,13 +343,23 @@ |
342 | 344 | $s = $value; |
343 | 345 | } elseif ( is_array( $value ) ) { |
344 | 346 | $s = '['; |
345 | | - foreach ( $value as $name => $elt ) { |
| 347 | + foreach ( $value as $elt ) { |
346 | 348 | if ( $s != '[' ) { |
347 | 349 | $s .= ', '; |
348 | 350 | } |
349 | 351 | $s .= self::encodeJsVar( $elt ); |
350 | 352 | } |
351 | 353 | $s .= ']'; |
| 354 | + } elseif ( is_object( $value ) ) { |
| 355 | + $s = '{'; |
| 356 | + foreach ( (array)$value as $name => $elt ) { |
| 357 | + if ( $s != '{' ) { |
| 358 | + $s .= ', '; |
| 359 | + } |
| 360 | + $s .= '"' . self::escapeJsString( $name ) . '": ' . |
| 361 | + self::encodeJsVar( $elt ); |
| 362 | + } |
| 363 | + $s .= '}'; |
352 | 364 | } else { |
353 | 365 | $s = '"' . self::escapeJsString( $value ) . '"'; |
354 | 366 | } |
Index: branches/apiedit/phase3/includes/Skin.php |
— | — | @@ -297,6 +297,7 @@ |
298 | 298 | global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang; |
299 | 299 | global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle; |
300 | 300 | global $wgBreakFrames, $wgRequest; |
| 301 | + global $wgUseAjax, $wgAjaxWatch; |
301 | 302 | |
302 | 303 | $ns = $wgTitle->getNamespace(); |
303 | 304 | $nsname = isset( $wgCanonicalNamespaceNames[ $ns ] ) ? $wgCanonicalNamespaceNames[ $ns ] : $wgTitle->getNsText(); |
— | — | @@ -334,6 +335,15 @@ |
335 | 336 | $vars['wgLivepreviewMessageError'] = wfMsg( 'livepreview-error' ); |
336 | 337 | } |
337 | 338 | |
| 339 | + if($wgUseAjax && $wgAjaxWatch) { |
| 340 | + $msgNames = array( 'watch', 'unwatch', 'watching', 'unwatching' ); |
| 341 | + $msgs = (object)array(); |
| 342 | + foreach ( array( 'watch', 'unwatch', 'watching', 'unwatching' ) as $msgName ) { |
| 343 | + $msgs->{$msgName . 'Msg'} = wfMsg( $msgName ); |
| 344 | + } |
| 345 | + $vars['wgAjaxWatch'] = $msgs; |
| 346 | + } |
| 347 | + |
338 | 348 | return self::makeVariablesScript( $vars ); |
339 | 349 | } |
340 | 350 | |
— | — | @@ -419,20 +429,6 @@ |
420 | 430 | if ( !wfEmptyMsg ( 'common.js', $commonJs ) ) { |
421 | 431 | $s .= $commonJs; |
422 | 432 | } |
423 | | - |
424 | | - global $wgUseAjax, $wgAjaxWatch; |
425 | | - if($wgUseAjax && $wgAjaxWatch) { |
426 | | - $s .= " |
427 | | - |
428 | | -/* AJAX (un)watch (see /skins/common/ajaxwatch.js) */ |
429 | | -var wgAjaxWatch = { |
430 | | - watchMsg: '". str_replace( array("'", "\n"), array("\\'", ' '), wfMsgExt( 'watch', array() ) )."', |
431 | | - unwatchMsg: '". str_replace( array("'", "\n"), array("\\'", ' '), wfMsgExt( 'unwatch', array() ) )."', |
432 | | - watchingMsg: '". str_replace( array("'", "\n"), array("\\'", ' '), wfMsgExt( 'watching', array() ) )."', |
433 | | - unwatchingMsg: '". str_replace( array("'", "\n"), array("\\'", ' '), wfMsgExt( 'unwatching', array() ) )."' |
434 | | -};"; |
435 | | - } |
436 | | - |
437 | 433 | wfProfileOut( __METHOD__ ); |
438 | 434 | return $s; |
439 | 435 | } |
Index: branches/apiedit/phase3/includes/GlobalFunctions.php |
— | — | @@ -1667,7 +1667,7 @@ |
1668 | 1668 | return true; |
1669 | 1669 | if( file_exists( $fullDir ) ) |
1670 | 1670 | return true; |
1671 | | - return mkdir( $fullDir, $mode, true ); |
| 1671 | + return mkdir( str_replace('/',DIRECTORY_SEPARATOR,$fullDir) , $mode, true ); |
1672 | 1672 | } |
1673 | 1673 | |
1674 | 1674 | /** |
Index: branches/apiedit/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -135,6 +135,9 @@ |
136 | 136 | $this->addWhereRange('rev_timestamp', |
137 | 137 | $this->params['dir'], $this->params['start'], $this->params['end'] ); |
138 | 138 | |
| 139 | + if(count($this->params['namespace']) > 0) |
| 140 | + $this->addWhereFld('page_namespace', $this->params['namespace']); |
| 141 | + |
139 | 142 | $show = $this->params['show']; |
140 | 143 | if (!is_null($show)) { |
141 | 144 | $show = array_flip($show); |
— | — | @@ -226,6 +229,10 @@ |
227 | 230 | 'older' |
228 | 231 | ) |
229 | 232 | ), |
| 233 | + 'namespace' => array ( |
| 234 | + ApiBase :: PARAM_ISMULTI => true, |
| 235 | + ApiBase :: PARAM_TYPE => 'namespace' |
| 236 | + ), |
230 | 237 | 'prop' => array ( |
231 | 238 | ApiBase :: PARAM_ISMULTI => true, |
232 | 239 | ApiBase :: PARAM_DFLT => 'ids|title|timestamp|flags|comment', |
— | — | @@ -254,13 +261,14 @@ |
255 | 262 | 'end' => 'The end timestamp to return to.', |
256 | 263 | 'user' => 'The user to retrieve contributions for.', |
257 | 264 | 'dir' => 'The direction to search (older or newer).', |
| 265 | + 'namespace' => 'Only list contributions in these namespaces', |
258 | 266 | 'prop' => 'Include additional pieces of information', |
259 | 267 | 'show' => 'Show only items that meet this criteria, e.g. non minor edits only: show=!minor', |
260 | 268 | ); |
261 | 269 | } |
262 | 270 | |
263 | 271 | protected function getDescription() { |
264 | | - return 'Get edits by a user..'; |
| 272 | + return 'Get all edits by a user'; |
265 | 273 | } |
266 | 274 | |
267 | 275 | protected function getExamples() { |
Property changes on: branches/apiedit/phase3 |
___________________________________________________________________ |
Modified: svnmerge-integrated |
268 | 276 | - /trunk/phase3:1-23720 |
269 | 277 | + /trunk/phase3:1-23741 |