Index: trunk/extensions/Narayam/js/ext.narayam.core.js |
— | — | @@ -385,8 +385,12 @@ |
386 | 386 | * from a cookie or wgNarayamEnableByDefault |
387 | 387 | */ |
388 | 388 | this.setup = function() { |
389 | | - //build the menu. |
390 | | - that.buildMenu(); |
| 389 | + // Build the menu |
| 390 | + if ( !that.buildMenu() ){ |
| 391 | + // /buildMenu() returned false |
| 392 | + // No need to proceed |
| 393 | + return; |
| 394 | + } |
391 | 395 | |
392 | 396 | // Restore state from cookies |
393 | 397 | var savedScheme = $.cookie( 'narayam-scheme' ); |
— | — | @@ -439,7 +443,8 @@ |
440 | 444 | |
441 | 445 | if ( !haveSchemes ) { |
442 | 446 | // No schemes available, don't show the tool |
443 | | - return; |
| 447 | + // So return false |
| 448 | + return false; |
444 | 449 | } |
445 | 450 | |
446 | 451 | // Event listener for scheme selection. |
— | — | @@ -507,7 +512,10 @@ |
508 | 513 | },function(){ |
509 | 514 | $("#searchform").css({ visibility: "visible" }); |
510 | 515 | }); |
511 | | - } |
| 516 | + } |
| 517 | + |
| 518 | + // Narayam controls setup complete, returns true |
| 519 | + return true; |
512 | 520 | } |
513 | 521 | |
514 | 522 | } )(); |