Skip to content

Commit

Permalink
Fixed bug with (page-redirect) when adding options in the URL
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Mar 5, 2013
1 parent bfbfd8a commit 2ebf538
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions newlisp-rockets.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,14 @@
(if (not (find ".lsp" str-url-to-redirect))
(extend str-url-to-redirect ".lsp")) ; add .lsp extension if not already there
(if str-optional-parameters (begin
(if (find "?" strl-url-to-redirect)
(if (find "?" str-url-to-redirect)
(extend str-url-to-redirect (string "&" str-optional-parameters))
(extend str-url-to-redirect (string "?" str-optional-parameters)) ; if already has parameters, use &
)
))
(print "Content-type: text/html\n")
(set 'Rockets:statuscode 302) ; HTTP "FOUND" redirects to a new site
(add-header "Location" str-url-to-redirect)
(add-header "Location" str-url-to-redirect)
(send-headers)
(print "\n")
(exit)
Expand Down
2 changes: 1 addition & 1 deletion partials/rockets-navbar.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
; display any error messages, welcome messsages, etc.
(set 'error-messages ($GET "e"))
(if (= error-messages "signin")
(display-warning "<strong>Warning!</strong> Username or password not found. Please try signing in again."))
(display-warning "<strong>Warning!</strong> Username or password not found. Please try signing in again. <a href=rockets-forgotpassword.lsp>Forgot your password?</a>"))
(if (= error-messages "newuser")
(display-success (string "Thank you for registering on " RocketsConfig:Name "! You are now signed in.")))
3 changes: 2 additions & 1 deletion rockets-item.lsp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env newlisp
(load "/var/www/newlisp-rockets.lisp")
(load "newlisp-rockets.lisp")
(load "Rockets-config.lisp") ; load configuration information
(display-header (string RocketsConfig:Name " - Post"))
(open-database RocketsConfig:Database)
Expand All @@ -11,6 +11,7 @@
(set 'forum-view-post (force-parameters 1 ($GET "f")))

(if Id (extend active-page (string ".lsp?p=" Id))) ; in case user logs in and wants to return to this exact page
(if forum-view-post (extend active-page (string "&f=true")))
(display-partial "rockets-navbar") ; shows the navigation bar with Rockets blog menus

(if Id (begin
Expand Down
2 changes: 1 addition & 1 deletion rockets-verify.lsp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env newlisp

(load "/var/www/newlisp-rockets.lisp") ; this is where the magic happens!
(load "newlisp-rockets.lisp") ; this is where the magic happens!

; (rockets-verify.lsp) - Rockets - User verification page
;
Expand Down

0 comments on commit 2ebf538

Please sign in to comment.