From 1b50c941bc9f0821cc4d2cb488585aa80c6843c8 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Wed, 14 Aug 2013 01:35:15 +0200 Subject: [PATCH] Fix table names and add more attributes for tags --- public_html/classes/property.php | 6 +++--- public_html/classes/tag.php | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/public_html/classes/property.php b/public_html/classes/property.php index 81bd201..426022d 100644 --- a/public_html/classes/property.php +++ b/public_html/classes/property.php @@ -15,9 +15,9 @@ if(!isset($_APP)) { die("Unauthorized."); } class Property extends CPHPDatabaseRecordClass { - public $table_name = "nodes"; - public $fill_query = "SELECT * FROM nodes WHERE `Id` = :Id"; - public $verify_query = "SELECT * FROM nodes WHERE `Id` = :Id"; + public $table_name = "properties"; + public $fill_query = "SELECT * FROM properties WHERE `Id` = :Id"; + public $verify_query = "SELECT * FROM properties WHERE `Id` = :Id"; public $prototype = array( 'string' => array( diff --git a/public_html/classes/tag.php b/public_html/classes/tag.php index 7ce534c..86c5b28 100644 --- a/public_html/classes/tag.php +++ b/public_html/classes/tag.php @@ -15,9 +15,9 @@ if(!isset($_APP)) { die("Unauthorized."); } class Tag extends CPHPDatabaseRecordClass { - public $table_name = "table"; - public $fill_query = "SELECT * FROM table WHERE `Id` = :Id"; - public $verify_query = "SELECT * FROM table WHERE `Id` = :Id"; + public $table_name = "tags"; + public $fill_query = "SELECT * FROM tags WHERE `Id` = :Id"; + public $verify_query = "SELECT * FROM tags WHERE `Id` = :Id"; public $prototype = array( 'string' => array( @@ -25,6 +25,19 @@ class Tag extends CPHPDatabaseRecordClass ), 'numeric' => array( "NodeId" => "NodeId" + "CreatorId" => "CreatorId", + "RemoverId" => "RemoverId" + ), + 'timestamp' => array( + "CreationDate" => "CreationDate", + "RemovalDate" => "RemovalDate" + ), + 'boolean' => array( + "IsActive" => "IsActive" + ), + 'user' => array( + "Creator" => "CreatorId", + "Remover" => "RemoverId" ), 'node' => array( "Node" => "NodeId"