зеркало из https://github.com/mozilla/gecko-dev.git
Fixed pre-processing and includes for all scripts.
This commit is contained in:
Родитель
95c61d1973
Коммит
fc2a4ee7de
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
*
|
||||
* @todo FAQ search?
|
||||
*/
|
||||
|
||||
startProcessing('faq.tpl');
|
||||
require_once('includes.php');
|
||||
|
||||
$db->query("
|
||||
SELECT
|
||||
`title`,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* Syndication for commonly referenced lists.
|
||||
*
|
||||
* @package amo
|
||||
* @subpackage docs
|
||||
*/
|
||||
?>
|
|
@ -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',
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
// Include required libraries and classes.
|
||||
require_once('DB.php'); // PEAR::DB
|
||||
require_once('Auth.php'); // PEAR::Auth
|
||||
|
@ -49,7 +48,4 @@ if (USE_DB_SESSIONS)
|
|||
array(&$amo_session_handler, '_destroy'),
|
||||
array(&$amo_session_handler, '_gc'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче