added comments and config line for include_path, which is important for install
inc/finish.php, inc/init.php
adjusted how globals were set up
tried working with non-global db/tpl but it was not scalable so it was switched back
faq.php, index.php, developers/index.php
smarty -> tpl
lib/addon.class.php
proper constructor now in place
lib/amo.class.php
object definition for all basic objects
sets up tpl,db globals for use in all extending classes
addon.php
home page for an addon
item.php
too generic, nuked it
git-svn-id: svn://10.0.0.236/trunk@176188 18797224-902f-48f8-a5cc-f745e15eee43
43 lines
836 B
PHP
43 lines
836 B
PHP
<?php
|
|
/**
|
|
* Addon super class. The class to end all classes.
|
|
* @package amo
|
|
* @subpackage lib
|
|
*/
|
|
class AddOn extends AMO_Object
|
|
{
|
|
var $ID;
|
|
var $GUID;
|
|
var $Name;
|
|
var $Type;
|
|
var $DateAdded;
|
|
var $DateUpdated;
|
|
var $Homepage;
|
|
var $Description;
|
|
var $Rating;
|
|
var $downloadcount;
|
|
var $TotalDownloads;
|
|
var $devcomments;
|
|
var $db;
|
|
var $tpl;
|
|
|
|
/**
|
|
* Class constructor.
|
|
*/
|
|
function AddOn()
|
|
{
|
|
// Our DB and Smarty objects are global to save cycles.
|
|
global $db, $tpl;
|
|
|
|
// Pass by reference in order to save memory.
|
|
$this->db =& $db;
|
|
$this->tpl =& $tpl;
|
|
}
|
|
|
|
function getAddOn($ID)
|
|
{
|
|
$this->db->query("SELECT * FROM main WHERE ID = '{$ID}'", SQL_ALL, SQL_ASSOC);
|
|
return $this->db->record;
|
|
}
|
|
}
|