diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-08-26 17:30:07 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-08-26 17:30:07 +0200 |
commit | 72e9a2ce57ee88503db83614cec5ccda71f0b58e (patch) | |
tree | 8bc301ca22d9ca08ea54426bcb61f62bd1c1cb75 /apps/bookmarks/appinfo | |
parent | 32bad688bdb4fea55eba9d4255fc55f1c60a0aca (diff) | |
download | nextcloud-server-72e9a2ce57ee88503db83614cec5ccda71f0b58e.tar.gz nextcloud-server-72e9a2ce57ee88503db83614cec5ccda71f0b58e.zip |
moved to apps repository
Diffstat (limited to 'apps/bookmarks/appinfo')
-rw-r--r-- | apps/bookmarks/appinfo/app.php | 19 | ||||
-rw-r--r-- | apps/bookmarks/appinfo/database.xml | 112 | ||||
-rw-r--r-- | apps/bookmarks/appinfo/info.xml | 11 | ||||
-rw-r--r-- | apps/bookmarks/appinfo/migrate.php | 68 | ||||
-rw-r--r-- | apps/bookmarks/appinfo/version | 1 |
5 files changed, 0 insertions, 211 deletions
diff --git a/apps/bookmarks/appinfo/app.php b/apps/bookmarks/appinfo/app.php deleted file mode 100644 index f4bca9df700..00000000000 --- a/apps/bookmarks/appinfo/app.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -/** -* Copyright (c) 2011 Marvin Thomas Rabe <mrabe@marvinrabe.de> -* Copyright (c) 2011 Arthur Schiwon <blizzz@arthur-schiwon.de> -* This file is licensed under the Affero General Public License version 3 or -* later. -* See the COPYING-README file. -*/ - -OC::$CLASSPATH['OC_Bookmarks_Bookmarks'] = 'apps/bookmarks/lib/bookmarks.php'; -OC::$CLASSPATH['OC_Search_Provider_Bookmarks'] = 'apps/bookmarks/lib/search.php'; - -$l = new OC_l10n('bookmarks'); -OCP\App::addNavigationEntry( array( 'id' => 'bookmarks_index', 'order' => 70, 'href' => OCP\Util::linkTo( 'bookmarks', 'index.php' ), 'icon' => OCP\Util::imagePath( 'bookmarks', 'bookmarks.png' ), 'name' => $l->t('Bookmarks'))); - -OCP\App::registerPersonal('bookmarks', 'settings'); -OCP\Util::addscript('bookmarks','bookmarksearch'); - -OC_Search::registerProvider('OC_Search_Provider_Bookmarks'); diff --git a/apps/bookmarks/appinfo/database.xml b/apps/bookmarks/appinfo/database.xml deleted file mode 100644 index d28857b0757..00000000000 --- a/apps/bookmarks/appinfo/database.xml +++ /dev/null @@ -1,112 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<database> - <name>*dbname*</name> - <create>true</create> - <overwrite>false</overwrite> - <charset>utf8</charset> - <table> - <name>*dbprefix*bookmarks</name> - <declaration> - <field> - <name>id</name> - <type>integer</type> - <autoincrement>1</autoincrement> - <default>0</default> - <notnull>true</notnull> - <length>4</length> - </field> - <field> - <name>url</name> - <type>text</type> - <default></default> - <notnull>true</notnull> - <length>4096</length> - </field> - <field> - <name>title</name> - <type>text</type> - <default></default> - <notnull>true</notnull> - <length>140</length> - </field> - <field> - <name>user_id</name> - <type>text</type> - <default></default> - <notnull>true</notnull> - <length>64</length> - </field> - <field> - <name>public</name> - <type>integer</type> - <default>0</default> - <length>1</length> - </field> - <field> - <name>added</name> - <type>integer</type> - <default></default> - <notnull>false</notnull> - <unsigned>true</unsigned> - <length>4</length> - </field> - <field> - <name>lastmodified</name> - <type>integer</type> - <default></default> - <notnull>false</notnull> - <unsigned>true</unsigned> - <length>4</length> - </field> - <field> - <name>clickcount</name> - <type>integer</type> - <default>0</default> - <notnull>true</notnull> - <unsigned>true</unsigned> - <length>4</length> - </field> - - <index> - <name>id</name> - <unique>true</unique> - <field> - <name>id</name> - <sorting>descending</sorting> - </field> - </index> - </declaration> - </table> - - <table> - <name>*dbprefix*bookmarks_tags</name> - <declaration> - <field> - <name>bookmark_id</name> - <type>integer</type> - <length>64</length> - </field> - - <field> - <name>tag</name> - <type>text</type> - <default></default> - <notnull>true</notnull> - <length>255</length> - </field> - <index> - <name>bookmark_tag</name> - <unique>true</unique> - <field> - <name>bookmark_id</name> - <sorting>ascending</sorting> - </field> - <field> - <name>tag</name> - <sorting>ascending</sorting> - </field> - </index> - </declaration> - </table> -</database> - diff --git a/apps/bookmarks/appinfo/info.xml b/apps/bookmarks/appinfo/info.xml deleted file mode 100644 index 93510815f5e..00000000000 --- a/apps/bookmarks/appinfo/info.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0"?> -<info> - <id>bookmarks</id> - <name>Bookmarks</name> - <description>Bookmark manager for ownCloud</description> - <licence>AGPL</licence> - <author>Arthur Schiwon, Marvin Thomas Rabe</author> - <standalone/> - <require>4</require> - <shipped>true</shipped> -</info> diff --git a/apps/bookmarks/appinfo/migrate.php b/apps/bookmarks/appinfo/migrate.php deleted file mode 100644 index f14469269a2..00000000000 --- a/apps/bookmarks/appinfo/migrate.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{ - - // Create the xml for the user supplied - function export( ){ - $options = array( - 'table'=>'bookmarks', - 'matchcol'=>'user_id', - 'matchval'=>$this->uid, - 'idcol'=>'id' - ); - $ids = $this->content->copyRows( $options ); - - $options = array( - 'table'=>'bookmarks_tags', - 'matchcol'=>'bookmark_id', - 'matchval'=>$ids - ); - - // Export tags - $ids2 = $this->content->copyRows( $options ); - - // If both returned some ids then they worked - if( is_array( $ids ) && is_array( $ids2 ) ) - { - return true; - } else { - return false; - } - - } - - // Import function for bookmarks - function import( ){ - switch( $this->appinfo->version ){ - default: - // All versions of the app have had the same db structure, so all can use the same import function - $query = $this->content->prepare( "SELECT * FROM `bookmarks` WHERE `user_id` LIKE ?" ); - $results = $query->execute( array( $this->olduid ) ); - $idmap = array(); - while( $row = $results->fetchRow() ){ - // Import each bookmark, saving its id into the map - $query = OCP\DB::prepare( "INSERT INTO `*PREFIX*bookmarks`(`url`, `title`, `user_id`, `public`, `added`, `lastmodified`) VALUES (?, ?, ?, ?, ?, ?)" ); - $query->execute( array( $row['url'], $row['title'], $this->uid, $row['public'], $row['added'], $row['lastmodified'] ) ); - // Map the id - $idmap[$row['id']] = OCP\DB::insertid(); - } - // Now tags - foreach($idmap as $oldid => $newid){ - $query = $this->content->prepare( "SELECT * FROM `bookmarks_tags` WHERE `bookmark_id` LIKE ?" ); - $results = $query->execute( array( $oldid ) ); - while( $row = $results->fetchRow() ){ - // Import the tags for this bookmark, using the new bookmark id - $query = OCP\DB::prepare( "INSERT INTO `*PREFIX*bookmarks_tags`(`bookmark_id`, `tag`) VALUES (?, ?)" ); - $query->execute( array( $newid, $row['tag'] ) ); - } - } - // All done! - break; - } - - return true; - } - -} - -// Load the provider -new OC_Migration_Provider_Bookmarks( 'bookmarks' );
\ No newline at end of file diff --git a/apps/bookmarks/appinfo/version b/apps/bookmarks/appinfo/version deleted file mode 100644 index 2f4536184bc..00000000000 --- a/apps/bookmarks/appinfo/version +++ /dev/null @@ -1 +0,0 @@ -0.2
\ No newline at end of file |