@@ -467,15 +467,15 @@ exports.edit = function (aReq, aRes, aNext) {
467
467
if ( aReq . body . remove ) {
468
468
// POST
469
469
scriptStorage . deleteScript ( aScript . installName , function ( ) {
470
- aRes . redirect ( authedUser . userScriptListPageUrl ) ;
470
+ aRes . redirect ( authedUser . userScriptListPageUri ) ;
471
471
} ) ;
472
472
} else if ( typeof aReq . body . about !== 'undefined' ) {
473
473
// POST
474
474
aScript . about = aReq . body . about ;
475
475
scriptGroups = ( aReq . body . groups || '' ) ;
476
476
scriptGroups = scriptGroups . split ( / , / ) ;
477
477
addScriptToGroups ( aScript , scriptGroups , function ( ) {
478
- aRes . redirect ( script . scriptPageUrl ) ;
478
+ aRes . redirect ( script . scriptPageUri ) ;
479
479
} ) ;
480
480
} else {
481
481
// GET
@@ -495,20 +495,20 @@ exports.edit = function (aReq, aRes, aNext) {
495
495
// Script voting
496
496
exports . vote = function ( aReq , aRes , aNext ) {
497
497
//
498
- var url = aReq . _parsedUrl . pathname . split ( '/' ) ;
498
+ var uri = aReq . _parsedUrl . pathname . split ( '/' ) ;
499
499
var vote = aReq . params . vote ;
500
500
var unvote = false ;
501
501
502
502
var isLib = aReq . params . isLib ;
503
503
var installNameBase = scriptStorage . getInstallNameBase ( aReq ) ;
504
504
505
505
// ---
506
- if ( url . length > 5 ) {
507
- url . pop ( ) ;
506
+ if ( uri . length > 5 ) {
507
+ uri . pop ( ) ;
508
508
}
509
- url . shift ( ) ;
510
- url . shift ( ) ;
511
- url = '/' + url . join ( '/' ) ;
509
+ uri . shift ( ) ;
510
+ uri . shift ( ) ;
511
+ uri = '/' + uri . join ( '/' ) ;
512
512
513
513
if ( vote === 'up' ) {
514
514
vote = true ;
@@ -517,7 +517,7 @@ exports.vote = function (aReq, aRes, aNext) {
517
517
} else if ( vote === 'unvote' ) {
518
518
unvote = true ;
519
519
} else {
520
- aRes . redirect ( url ) ;
520
+ aRes . redirect ( uri ) ;
521
521
return ;
522
522
}
523
523
@@ -530,7 +530,7 @@ exports.vote = function (aReq, aRes, aNext) {
530
530
531
531
// ---
532
532
if ( aErr || ! aScript ) {
533
- aRes . redirect ( url ) ;
533
+ aRes . redirect ( uri ) ;
534
534
return ;
535
535
}
536
536
@@ -543,15 +543,15 @@ exports.vote = function (aReq, aRes, aNext) {
543
543
function saveScript ( ) {
544
544
if ( ! flags ) {
545
545
aScript . save ( function ( aErr , aScript ) {
546
- aRes . redirect ( url ) ;
546
+ aRes . redirect ( uri ) ;
547
547
} ) ;
548
548
return ;
549
549
}
550
550
551
551
flagLib . getAuthor ( aScript , function ( aAuthor ) {
552
552
flagLib . saveContent ( Script , aScript , aAuthor , flags ,
553
553
function ( aFlagged ) {
554
- aRes . redirect ( url ) ;
554
+ aRes . redirect ( uri ) ;
555
555
} ) ;
556
556
} ) ;
557
557
}
@@ -565,7 +565,7 @@ exports.vote = function (aReq, aRes, aNext) {
565
565
}
566
566
567
567
if ( authedUser . _id == aScript . _authorId || ( ! aVoteModel && unvote ) ) {
568
- aRes . redirect ( url ) ;
568
+ aRes . redirect ( uri ) ;
569
569
return ;
570
570
} else if ( ! aVoteModel ) {
571
571
aVoteModel = new Vote ( {
0 commit comments