Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renaming variables

  • Loading branch information...
commit 712da5370b836a33f79fb315ea5678ee88d5a329 1 parent 07d95dc
@xmeltrut authored
View
12 application/Controllers/DefaultController.php
@@ -27,14 +27,14 @@ function __construct () {
public function index ($request) {
// get a database object
- $db = Database::getInstance();
+ $database = Database::getInstance();
// set variables
- $this->engine->assign("total_members", $db->fetchOne("SELECT COUNT(memberID) FROM ".DB_PREFIX."members"));
- $this->engine->assign("total_subscribers", $db->fetchOne("SELECT COUNT(subscriberID) FROM ".DB_PREFIX."subscribers"));
- $this->engine->assign("total_events", $db->fetchOne("SELECT COUNT(eventID) FROM ".DB_PREFIX."events"));
- $this->engine->assign("total_pages", $db->fetchOne("SELECT COUNT(pageID) FROM ".DB_PREFIX."pages"));
- $this->engine->assign("total_blog_posts", $db->fetchOne("SELECT COUNT(postID) FROM ".DB_PREFIX."blog_posts"));
+ $this->engine->assign("total_members", $database->fetchOne("SELECT COUNT(memberID) FROM ".DB_PREFIX."members"));
+ $this->engine->assign("total_subscribers", $database->fetchOne("SELECT COUNT(subscriberID) FROM ".DB_PREFIX."subscribers"));
+ $this->engine->assign("total_events", $database->fetchOne("SELECT COUNT(eventID) FROM ".DB_PREFIX."events"));
+ $this->engine->assign("total_pages", $database->fetchOne("SELECT COUNT(pageID) FROM ".DB_PREFIX."pages"));
+ $this->engine->assign("total_blog_posts", $database->fetchOne("SELECT COUNT(postID) FROM ".DB_PREFIX."blog_posts"));
// output age
$this->engine->display("default/index.tpl");
View
6 application/Controllers/ReportingController.php
@@ -27,11 +27,11 @@ function __construct () {
public function auditlogs () {
// get a database instance
- $db = Database::getInstance();
+ $database = Database::getInstance();
// get a list of actions
$sql = "SELECT * FROM ".DB_PREFIX."audit_actions ORDER BY actionName ASC ";
- $rec = $db->query($sql);
+ $rec = $database->query($sql);
$actions = array();
@@ -43,7 +43,7 @@ public function auditlogs () {
$sql = "SELECT * FROM ".DB_PREFIX."members
WHERE memberPrivileges > 1
ORDER BY memberSurname ASC, memberForename ASC ";
- $rec = $db->query($sql);
+ $rec = $database->query($sql);
$members = array();
View
4 application/Framework/Core/Configuration.php
@@ -63,11 +63,11 @@ public static function getUrl () {
private static function initialise () {
// create a database object
- $db = Database::getInstance();
+ $database = Database::getInstance();
// query for all config options
$sql = "SELECT * FROM ".DB_PREFIX."config ";
- $rec = $db->query($sql);
+ $rec = $database->query($sql);
// loop through results
self::$data = array();
View
4 application/Framework/Security/Authorisation.php
@@ -105,12 +105,12 @@ public function login ($email, $password, &$msg) {
$success = false;
// create a database connection
- $db = Database::getInstance();
+ $database = Database::getInstance();
// select the user
$sql = "SELECT * FROM ".DB_PREFIX."members
WHERE memberEmail = ? ";
- $rec = $db->prepare($sql);
+ $rec = $database->prepare($sql);
$rec->execute(array($email));
if ($rec->rowCount() > 0) {
Please sign in to comment.
Something went wrong with that request. Please try again.