summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-05-30 19:22:26 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-05-30 19:22:26 -0400
commit91972e5dbe77743e49f38b5ebd9e75e72ac08ed3 (patch)
tree5ca2e6d5e455246b0ed3e0f1a202fdaf80da0ae2
parentd9fe92a78d03a2007c986e1b1f7df736db5dea97 (diff)
rename some fields of database schema
-rw-r--r--appinfo/database.xml2
-rw-r--r--appinfo/info.xml2
-rw-r--r--lib/feedmapper.php2
-rw-r--r--lib/foldermapper.php2
-rw-r--r--lib/itemmapper.php6
-rw-r--r--templates/main.php1
6 files changed, 7 insertions, 8 deletions
diff --git a/appinfo/database.xml b/appinfo/database.xml
index d39e2f548..79622055a 100644
--- a/appinfo/database.xml
+++ b/appinfo/database.xml
@@ -36,7 +36,7 @@
</field>
<index>
- <name>id</name>
+ <name>folder_id</name>
<unique>true</unique>
<field>
<name>id</name>
diff --git a/appinfo/info.xml b/appinfo/info.xml
index e990fefae..0ada6e75c 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -3,7 +3,7 @@
<id>news</id>
<name>News</name>
<description>An RSS/Atom feed reader</description>
- <version>0.1</version>
+ <version>5.5</version>
<licence>AGPL</licence>
<author>Alessandro Cosentino</author>
<require>4</require>
diff --git a/lib/feedmapper.php b/lib/feedmapper.php
index a08d730b1..737b17d80 100644
--- a/lib/feedmapper.php
+++ b/lib/feedmapper.php
@@ -107,7 +107,7 @@ class OC_News_FeedMapper {
if ($feedid == null){
$query = OCP\DB::prepare('
INSERT INTO ' . self::tableName .
- '(url, title, folderid, added, lastmodified)
+ '(url, title, folder_id, added, lastmodified)
VALUES (?, ?, ?, ?, ?)
');
diff --git a/lib/foldermapper.php b/lib/foldermapper.php
index 92f53c35c..c5adfbfbb 100644
--- a/lib/foldermapper.php
+++ b/lib/foldermapper.php
@@ -70,7 +70,7 @@ class OC_News_FolderMapper {
public function insert(OC_News_Folder $folder){
$query = OCP\DB::prepare('
INSERT INTO ' . self::tableName .
- '(name, parentid, userid)
+ '(name, parent_id, user_id)
VALUES (?, ?, ?)
');
diff --git a/lib/itemmapper.php b/lib/itemmapper.php
index 09ebd6f09..0d1393409 100644
--- a/lib/itemmapper.php
+++ b/lib/itemmapper.php
@@ -33,7 +33,7 @@ class OC_News_ItemMapper {
* @param feedid The id of the feed in the database table.
*/
public function findAll($feedid){
- $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE feedid = ?');
+ $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE feed_id = ?');
$result = $stmt->execute(array($feedid));
$items = array();
@@ -51,7 +51,7 @@ class OC_News_ItemMapper {
$stmt = OCP\DB::prepare('
SELECT * FROM ' . self::tableName . '
WHERE guid = ?
- AND feedid = ?
+ AND feed_id = ?
');
$result = $stmt->execute(array($guid, $feedid));
$row = $result->fetchRow();
@@ -76,7 +76,7 @@ class OC_News_ItemMapper {
$query = OCP\DB::prepare('
INSERT INTO ' . self::tableName .
- '(url, title, guid, feedid)
+ '(url, title, guid, feed_id)
VALUES (?, ?, ?, ?)
');
diff --git a/templates/main.php b/templates/main.php
index 2bf5d0dd5..2dd376c34 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -22,7 +22,6 @@ foreach($items as $item) {
$feed2 = $feedmapper->findWithItems(45);
echo '<br>' . $feed2->getTitle() . '<br>';
-
/*
$item = $feed->get_item(1);