From 0bcbf328da8ac870714c3e5aa77dfae782f1b41a Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Fri, 24 Jan 2014 22:44:19 -0500 Subject: [PATCH] Use functions (not global variables) for protocol and base_url --- acal/index.php | 2 +- aclindsa-wordpress-theme/404.php | 2 +- aclindsa-wordpress-theme/header.php | 4 ++-- common.php | 5 +++-- errors/400.php | 2 +- errors/401.php | 4 ++-- errors/403.php | 4 ++-- errors/404.php | 4 ++-- errors/500.php | 2 +- header_bottom.php | 6 +++--- index.php | 4 ++-- projects/index.php | 2 +- resume/index.php | 8 ++++---- svgparser/index.php | 4 ++-- tabs.php | 1 + wedding/ceremony/index.php | 2 +- wedding/errors/400.php | 2 +- wedding/errors/401.php | 4 ++-- wedding/errors/403.php | 4 ++-- wedding/errors/404.php | 4 ++-- wedding/errors/500.php | 2 +- wedding/header_bottom.php | 18 +++++++++--------- wedding/index.php | 2 +- wedding/wedding_party/index.php | 16 ++++++++-------- 24 files changed, 55 insertions(+), 53 deletions(-) diff --git a/acal/index.php b/acal/index.php index 7f6dc35..d7e8257 100644 --- a/acal/index.php +++ b/acal/index.php @@ -32,7 +32,7 @@ include("../header_top.php"); diff --git a/aclindsa-wordpress-theme/404.php b/aclindsa-wordpress-theme/404.php index b462769..56a27ac 100644 --- a/aclindsa-wordpress-theme/404.php +++ b/aclindsa-wordpress-theme/404.php @@ -12,7 +12,7 @@ get_header();

Error 404 - Page Not Found

-

Oops, the page you are looking for does not exist. You may search using the search box, or visit the homepage to get back on track.

+

Oops, the page you are looking for does not exist. You may search using the search box, or visit the homepage to get back on track.

diff --git a/aclindsa-wordpress-theme/header.php b/aclindsa-wordpress-theme/header.php index 3e48b7e..9a8111f 100644 --- a/aclindsa-wordpress-theme/header.php +++ b/aclindsa-wordpress-theme/header.php @@ -13,7 +13,7 @@ include_once("common.php"); <?php wp_title('«', true, 'right'); ?> Blog - aclindsay.com - + @@ -23,7 +23,7 @@ include_once("common.php"); > diff --git a/common.php b/common.php index 80cefd7..bc81b2c 100644 --- a/common.php +++ b/common.php @@ -7,6 +7,7 @@ function get_protocol() { $protocol = "https"; return $protocol."://"; } -$protocol = get_protocol(); -$base_url = $protocol.$_SERVER['HTTP_HOST']; +function get_base_url() { + return get_protocol().$_SERVER['HTTP_HOST']; +} ?> diff --git a/errors/400.php b/errors/400.php index 93e305c..ce3d0ea 100644 --- a/errors/400.php +++ b/errors/400.php @@ -8,7 +8,7 @@ include("../header_top.php");

Error 400 - Bad Request

This HTTP request was malformed, and could not be processed. You may attempt to reload this page, but the software you are using (your browser) may be at fault.

-

If you believe you are seeing this page in error, please contact me.

+

If you believe you are seeing this page in error, please contact me.

diff --git a/errors/401.php b/errors/401.php index 3c4d6ee..18ce1ec 100644 --- a/errors/401.php +++ b/errors/401.php @@ -7,8 +7,8 @@ include("../header_top.php");

Error 401 - Authorization Required

-

The page you are requesting requires authorization. Please refresh this page and provide your login credentials, if you have them, or continue browsing with our homepage.

-

If you believe you are seeing this page in error, please contact me.

+

The page you are requesting requires authorization. Please refresh this page and provide your login credentials, if you have them, or continue browsing with our homepage.

+

If you believe you are seeing this page in error, please contact me.

diff --git a/errors/403.php b/errors/403.php index f02f2c5..240a37d 100644 --- a/errors/403.php +++ b/errors/403.php @@ -7,8 +7,8 @@ include("../header_top.php");

Error 403 - Forbidden

-

The page you are requesting will not be returned. Refreshing the page won't help either. Please use your browser's back buttons to return to the page you came from, or continue browsing with our homepage.

-

If you believe you are seeing this page in error, please contact me.

+

The page you are requesting will not be returned. Refreshing the page won't help either. Please use your browser's back buttons to return to the page you came from, or continue browsing with our homepage.

+

If you believe you are seeing this page in error, please contact me.

diff --git a/errors/404.php b/errors/404.php index c3e2c2c..4722760 100644 --- a/errors/404.php +++ b/errors/404.php @@ -7,8 +7,8 @@ include("../header_top.php");

Error 404 - Page Not Found

-

Oops, the page you are looking for does not exist. You may use your browser's back button to return to the page from which you came, or visit the homepage.

-

If you believe you are seeing this page in error, or are searching for a page which no longer exists (but may still be linked to by other sites), please contact me. I will do my best to point you in the right direction.

+

Oops, the page you are looking for does not exist. You may use your browser's back button to return to the page from which you came, or visit the homepage.

+

If you believe you are seeing this page in error, or are searching for a page which no longer exists (but may still be linked to by other sites), please contact me. I will do my best to point you in the right direction.

diff --git a/errors/500.php b/errors/500.php index c89138d..f047b05 100644 --- a/errors/500.php +++ b/errors/500.php @@ -7,7 +7,7 @@ include("../header_top.php");

Error 500 - Internal Server Error

-

Oops, the server encountered an error while processing your request for this page. Please refresh the page and try again. If the error persists, please contact me.

+

Oops, the server encountered an error while processing your request for this page. Please refresh the page and try again. If the error persists, please contact me.

diff --git a/header_bottom.php b/header_bottom.php index 08c3bb2..b4410f8 100644 --- a/header_bottom.php +++ b/header_bottom.php @@ -8,8 +8,8 @@ - - + + @@ -17,7 +17,7 @@ diff --git a/index.php b/index.php index 6f26009..fd1789a 100644 --- a/index.php +++ b/index.php @@ -10,13 +10,13 @@ include("header_top.php");

The Homepage of Aaron Lindsay

Welcome to my personal website!

-

Here you will find assorted digital things associated with me: a blog about personal, technological and programming-related topics, a few of the projects on which I have worked, and other miscellany which includes my resume, calendar, and contact information.

+

Here you will find assorted digital things associated with me: a blog about personal, technological and programming-related topics, a few of the projects on which I have worked, and other miscellany which includes my resume, calendar, and contact information.

About Me

The ten-word summary: I am a Lutheran Eagle Scout who enjoys tinkering with hacking things.

diff --git a/svgparser/index.php b/svgparser/index.php index f1ee19b..8a0d3fe 100644 --- a/svgparser/index.php +++ b/svgparser/index.php @@ -14,7 +14,7 @@ include("../header_top.php"); but didn't cover many cases (example: gradient transformations). Therefore, if you wanted to use existing SVG files with dojox.gfx, you had to convert the file by hand. This was extremely tedious, so I have developed a converter tool with which you may convert existing SVG files into Javascript code ready to be used with dojox.gfx. If you have any comments or - suggestions for improvement, feel free to contact me.

+ suggestions for improvement, feel free to contact me.

SVG (XML) @@ -26,7 +26,7 @@ include("../header_top.php"); function submit(){ var data = dojo.byId("input").value; dojo.rawXhrPost({ - url: "/svgparser/parser/index.php", + url: "/svgparser/parser/index.php", handleAs: "text", postData: data, diff --git a/tabs.php b/tabs.php index 6f76ef9..73af9fc 100644 --- a/tabs.php +++ b/tabs.php @@ -9,6 +9,7 @@ $tabs = array( "Projects" => array("aclindsay.com", "/projects", "%^/projects(/.*)?%"), "Resume" => array("aclindsay.com", "/resume", "%^/resume(/.*)?%") ); +$protocol = get_protocol(); $http_host = $_SERVER['HTTP_HOST']; $request_uri = $_SERVER['REQUEST_URI']; diff --git a/wedding/ceremony/index.php b/wedding/ceremony/index.php index 9ad1741..af8ef75 100644 --- a/wedding/ceremony/index.php +++ b/wedding/ceremony/index.php @@ -8,7 +8,7 @@ include("../header_top.php");

Ceremony

-The ceremony will be held in Asheville at the church Aaron grew up in, St. Mark's Lutheran Church, and will be presided over by the Rev. Christopher Webb and the Rev. Jim Abbott. The ceremony will begin at 4pm. +The ceremony will be held in Asheville at the church Aaron grew up in, St. Mark's Lutheran Church, and will be presided over by the Rev. Christopher Webb and the Rev. Jim Abbott. The ceremony will begin at 4pm.

diff --git a/wedding/errors/400.php b/wedding/errors/400.php index f5ffef2..d245389 100644 --- a/wedding/errors/400.php +++ b/wedding/errors/400.php @@ -8,7 +8,7 @@ include("../header_top.php");

Error 400 - Bad Request

This HTTP request was malformed, and could not be processed. You may attempt to reload this page, but the software you are using (your browser) may be at fault.

-

If you believe you are seeing this page in error, please contact me.

+

If you believe you are seeing this page in error, please contact me.

diff --git a/wedding/errors/401.php b/wedding/errors/401.php index 866d076..553da50 100644 --- a/wedding/errors/401.php +++ b/wedding/errors/401.php @@ -7,8 +7,8 @@ include("../header_top.php");

Error 401 - Authorization Required

-

The page you are requesting requires authorization. Please refresh this page and provide your login credentials, if you have them, or continue browsing with our homepage.

-

If you believe you are seeing this page in error, please contact me.

+

The page you are requesting requires authorization. Please refresh this page and provide your login credentials, if you have them, or continue browsing with our homepage.

+

If you believe you are seeing this page in error, please contact me.

diff --git a/wedding/errors/403.php b/wedding/errors/403.php index dd05922..27d3ccc 100644 --- a/wedding/errors/403.php +++ b/wedding/errors/403.php @@ -7,8 +7,8 @@ include("../header_top.php");

Error 403 - Forbidden

-

The page you are requesting will not be returned. Refreshing the page won't help either. Please use your browser's back buttons to return to the page you came from, or continue browsing with our homepage.

-

If you believe you are seeing this page in error, please contact me.

+

The page you are requesting will not be returned. Refreshing the page won't help either. Please use your browser's back buttons to return to the page you came from, or continue browsing with our homepage.

+

If you believe you are seeing this page in error, please contact me.

diff --git a/wedding/errors/404.php b/wedding/errors/404.php index 93d7f2e..3c2cd88 100644 --- a/wedding/errors/404.php +++ b/wedding/errors/404.php @@ -7,8 +7,8 @@ include("../header_top.php");

Error 404 - Page Not Found

-

Oops, the page you are looking for does not exist. You may use your browser's back button to return to the page from which you came, or visit the homepage.

-

If you believe you are seeing this page in error, or are searching for a page which no longer exists (but may still be linked to by other sites), please contact me. I will do my best to point you in the right direction.

+

Oops, the page you are looking for does not exist. You may use your browser's back button to return to the page from which you came, or visit the homepage.

+

If you believe you are seeing this page in error, or are searching for a page which no longer exists (but may still be linked to by other sites), please contact me. I will do my best to point you in the right direction.

diff --git a/wedding/errors/500.php b/wedding/errors/500.php index 35d530e..61127d1 100644 --- a/wedding/errors/500.php +++ b/wedding/errors/500.php @@ -7,7 +7,7 @@ include("../header_top.php");

Error 500 - Internal Server Error

-

Oops, the server encountered an error while processing your request for this page. Please refresh the page and try again. If the error persists, please contact me.

+

Oops, the server encountered an error while processing your request for this page. Please refresh the page and try again. If the error persists, please contact me.

diff --git a/wedding/header_bottom.php b/wedding/header_bottom.php index 9533b45..69e2c13 100644 --- a/wedding/header_bottom.php +++ b/wedding/header_bottom.php @@ -7,13 +7,13 @@ - - + +