diff --git a/webtools/addons/public/htdocs/addon.php b/webtools/addons/public/htdocs/addon.php index c83dd3a93948..5ce9db91501b 100644 --- a/webtools/addons/public/htdocs/addon.php +++ b/webtools/addons/public/htdocs/addon.php @@ -7,15 +7,19 @@ */ startProcessing('addon.tpl'); +require_once('includes.php'); // Arrays to store clean inputs. $clean = array(); // General array for verified inputs. $sql = array(); // Trusted for SQL. -// Get our addon ID. +// Get the int value of our addon ID. $clean['ID'] = intval($_GET['id']); + +// Since it is guaranteed to be just an int, we can reference it. $sql['ID'] =& $clean['ID']; +// Create our AddOn object using the ID. $addon = new AddOn($sql['ID']); // Assign template variables. diff --git a/webtools/addons/public/htdocs/author.php b/webtools/addons/public/htdocs/author.php index 530d7411567d..faf93e57e728 100644 --- a/webtools/addons/public/htdocs/author.php +++ b/webtools/addons/public/htdocs/author.php @@ -5,6 +5,9 @@ * @subpackage docs */ +startProcessing('author.tpl'); +require_once('includes.php'); + // Arrays to store clean inputs. $clean = array(); // General array for verified inputs. $sql = array(); // Trusted for SQL. diff --git a/webtools/addons/public/htdocs/comments.php b/webtools/addons/public/htdocs/comments.php index 9fb7b31ba386..0bfabce7fb0f 100644 --- a/webtools/addons/public/htdocs/comments.php +++ b/webtools/addons/public/htdocs/comments.php @@ -6,6 +6,9 @@ * @subpackage docs */ +startProcessing('comments.tpl'); +require_once('includes.php'); + // Arrays to store clean inputs. $clean = array(); // General array for verified inputs. $sql = array(); // Trusted for SQL. diff --git a/webtools/addons/public/htdocs/faq.php b/webtools/addons/public/htdocs/faq.php index 6228ebfa9692..95b004065fc9 100644 --- a/webtools/addons/public/htdocs/faq.php +++ b/webtools/addons/public/htdocs/faq.php @@ -7,6 +7,10 @@ * * @todo FAQ search? */ + +startProcessing('faq.tpl'); +require_once('includes.php'); + $db->query(" SELECT `title`, diff --git a/webtools/addons/public/htdocs/history.php b/webtools/addons/public/htdocs/history.php index 1f8f78565c20..97919ca9105c 100644 --- a/webtools/addons/public/htdocs/history.php +++ b/webtools/addons/public/htdocs/history.php @@ -9,6 +9,9 @@ * @todo break this into a simpler design, probably a smaller table with an abbreviated desc. * @todo do we still want to allow users access to old versions? */ + +startProcessing('history.tpl'); +require_once('includes.php'); // Arrays to store clean inputs. $clean = array(); // General array for verified inputs. diff --git a/webtools/addons/public/htdocs/index.php b/webtools/addons/public/htdocs/index.php index 38a69594cce1..392b0b5edb64 100644 --- a/webtools/addons/public/htdocs/index.php +++ b/webtools/addons/public/htdocs/index.php @@ -10,8 +10,6 @@ */ startProcessing('index.tpl', 'nonav'); - -// Init only the stuff we need to generate content. require_once('includes.php'); // Arrays to store clean inputs. diff --git a/webtools/addons/public/htdocs/policy.php b/webtools/addons/public/htdocs/policy.php index be1a89a4596c..00f4d915b1a0 100644 --- a/webtools/addons/public/htdocs/policy.php +++ b/webtools/addons/public/htdocs/policy.php @@ -8,6 +8,9 @@ * @todo talk to cbeard and rebron about establishing the policy document. */ +startProcessing('policy.tpl'); +require_once('includes.php'); + $links = array( array( 'href' => './faq.php', 'title' => 'Frequently Asked Questions', diff --git a/webtools/addons/public/htdocs/previews.php b/webtools/addons/public/htdocs/previews.php index 3a31da565f33..53e91a197cce 100644 --- a/webtools/addons/public/htdocs/previews.php +++ b/webtools/addons/public/htdocs/previews.php @@ -5,6 +5,9 @@ * @package amo * @subpackage docs */ + +startProcessing('previews.tpl'); +require_once('includes.php'); // Arrays to store clean inputs. $clean = array(); // General array for verified inputs. diff --git a/webtools/addons/public/htdocs/ratecomment.php b/webtools/addons/public/htdocs/ratecomment.php index 83ef28459fdb..bd0255a806f9 100644 --- a/webtools/addons/public/htdocs/ratecomment.php +++ b/webtools/addons/public/htdocs/ratecomment.php @@ -6,6 +6,8 @@ * @subpackage docs */ +require_once('includes.php'); + // Arrays to store clean inputs. $clean = array(); // General array for verified inputs. $sql = array(); // Trusted for SQL. diff --git a/webtools/addons/public/htdocs/rss.php b/webtools/addons/public/htdocs/rss.php index e69de29bb2d1..55a82b9b36af 100644 --- a/webtools/addons/public/htdocs/rss.php +++ b/webtools/addons/public/htdocs/rss.php @@ -0,0 +1,8 @@ + diff --git a/webtools/addons/public/htdocs/search-engines.php b/webtools/addons/public/htdocs/search-engines.php index a072fdc996ce..3e8e72db0a7c 100644 --- a/webtools/addons/public/htdocs/search-engines.php +++ b/webtools/addons/public/htdocs/search-engines.php @@ -9,6 +9,9 @@ * @todo Get main template spruced up. */ +startProcessing('search-engines.tpl','nonav'); +require_once('includes.php'); + // Assign template variables. $tpl->assign( array( 'title' => 'Search Engines', diff --git a/webtools/addons/public/htdocs/search.php b/webtools/addons/public/htdocs/search.php index 442bfd0b1bfa..5dc1786f768a 100644 --- a/webtools/addons/public/htdocs/search.php +++ b/webtools/addons/public/htdocs/search.php @@ -12,6 +12,9 @@ * @todo fix CSS so the pull-downs look symmetrical before design freaks start crying. */ +startProcessing('search.tpl','nonav'); +require_once('includes.php'); + // Array to store clean inputs. $clean = array(); $sql = array(); diff --git a/webtools/addons/public/inc/includes.php b/webtools/addons/public/inc/includes.php index 4a9f3aa68f65..ef237172b7e8 100644 --- a/webtools/addons/public/inc/includes.php +++ b/webtools/addons/public/inc/includes.php @@ -1,5 +1,4 @@ \ No newline at end of file +?> diff --git a/webtools/addons/public/inc/init.php b/webtools/addons/public/inc/init.php index dcd0cd8f4fdb..7b8019414bce 100644 --- a/webtools/addons/public/inc/init.php +++ b/webtools/addons/public/inc/init.php @@ -36,7 +36,7 @@ class AMO_Smarty extends Smarty } } -function startProcessing($aTplName, $aPageType) +function startProcessing($aTplName, $aPageType='default') { // Global template object. global $tpl, $pageType, $content;