Fix up r62154: don't throw a JS error when $j is undefined, and bump $wgStyleVersion
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 9 Feb 2010 16:58:53 +0000 (16:58 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 9 Feb 2010 16:58:53 +0000 (16:58 +0000)
includes/DefaultSettings.php
skins/common/edit.js

index 2a34bce..79ec6b9 100644 (file)
@@ -1686,7 +1686,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches do not keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '265';
+$wgStyleVersion = '266';
 
 
 # Server-side caching:
index c2d1e21..8001164 100644 (file)
@@ -78,7 +78,7 @@ function mwSetupToolbar() {
 // apply tagOpen/tagClose to selection in textarea,
 // use sampleText instead of selection if there is none
 function insertTags( tagOpen, tagClose, sampleText ) {
-       if ( typeof $j.fn.textSelection != 'undefined' ) {
+       if ( typeof $j != 'undefined' && typeof $j.fn.textSelection != 'undefined' ) {
                $j( '#wpTextbox1' ).textSelection(
                        'encapsulateSelection', { 'pre': tagOpen, 'peri': sampleText, 'post': tagClose }
                );