summaryrefslogtreecommitdiffstats
path: root/apps/bookmarks
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-08-26 17:30:07 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-08-26 17:30:07 +0200
commit72e9a2ce57ee88503db83614cec5ccda71f0b58e (patch)
tree8bc301ca22d9ca08ea54426bcb61f62bd1c1cb75 /apps/bookmarks
parent32bad688bdb4fea55eba9d4255fc55f1c60a0aca (diff)
downloadnextcloud-server-72e9a2ce57ee88503db83614cec5ccda71f0b58e.tar.gz
nextcloud-server-72e9a2ce57ee88503db83614cec5ccda71f0b58e.zip
moved to apps repository
Diffstat (limited to 'apps/bookmarks')
-rw-r--r--apps/bookmarks/addBm.php33
-rw-r--r--apps/bookmarks/ajax/addBookmark.php37
-rw-r--r--apps/bookmarks/ajax/delBookmark.php37
-rw-r--r--apps/bookmarks/ajax/editBookmark.php90
-rw-r--r--apps/bookmarks/ajax/recordClick.php39
-rw-r--r--apps/bookmarks/ajax/updateList.php45
-rw-r--r--apps/bookmarks/appinfo/app.php19
-rw-r--r--apps/bookmarks/appinfo/database.xml112
-rw-r--r--apps/bookmarks/appinfo/info.xml11
-rw-r--r--apps/bookmarks/appinfo/migrate.php68
-rw-r--r--apps/bookmarks/appinfo/version1
-rw-r--r--apps/bookmarks/bookmarksHelper.php130
-rw-r--r--apps/bookmarks/css/bookmarks.css87
-rw-r--r--apps/bookmarks/img/bookmarks.pngbin398 -> 0 bytes
-rw-r--r--apps/bookmarks/index.php37
-rw-r--r--apps/bookmarks/js/addBm.js16
-rw-r--r--apps/bookmarks/js/bookmarks.js201
-rw-r--r--apps/bookmarks/js/bookmarksearch.js23
-rw-r--r--apps/bookmarks/l10n/bg_BG.php12
-rw-r--r--apps/bookmarks/l10n/ca.php12
-rw-r--r--apps/bookmarks/l10n/cs_CZ.php12
-rw-r--r--apps/bookmarks/l10n/de.php12
-rw-r--r--apps/bookmarks/l10n/el.php12
-rw-r--r--apps/bookmarks/l10n/eo.php11
-rw-r--r--apps/bookmarks/l10n/es.php12
-rw-r--r--apps/bookmarks/l10n/et_EE.php10
-rw-r--r--apps/bookmarks/l10n/fa.php8
-rw-r--r--apps/bookmarks/l10n/fi_FI.php12
-rw-r--r--apps/bookmarks/l10n/fr.php12
-rw-r--r--apps/bookmarks/l10n/it.php12
-rw-r--r--apps/bookmarks/l10n/lt_LT.php3
-rw-r--r--apps/bookmarks/l10n/nb_NO.php12
-rw-r--r--apps/bookmarks/l10n/nl.php11
-rw-r--r--apps/bookmarks/l10n/ru.php11
-rw-r--r--apps/bookmarks/l10n/sl.php12
-rw-r--r--apps/bookmarks/l10n/sv.php12
-rw-r--r--apps/bookmarks/l10n/th_TH.php12
-rw-r--r--apps/bookmarks/l10n/xgettextfiles5
-rw-r--r--apps/bookmarks/l10n/zh_CN.php12
-rw-r--r--apps/bookmarks/lib/bookmarks.php147
-rw-r--r--apps/bookmarks/lib/search.php47
-rw-r--r--apps/bookmarks/settings.php11
-rw-r--r--apps/bookmarks/templates/addBm.php11
-rw-r--r--apps/bookmarks/templates/bookmarklet.php8
-rw-r--r--apps/bookmarks/templates/list.php26
-rw-r--r--apps/bookmarks/templates/settings.php17
46 files changed, 0 insertions, 1480 deletions
diff --git a/apps/bookmarks/addBm.php b/apps/bookmarks/addBm.php
deleted file mode 100644
index 4df93c8b05f..00000000000
--- a/apps/bookmarks/addBm.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/**
-* ownCloud - bookmarks plugin
-*
-* @author Arthur Schiwon
-* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-
-
-// Check if we are a user
-OCP\User::checkLoggedIn();
-OCP\App::checkAppEnabled('bookmarks');
-
-require_once('bookmarksHelper.php');
-addBookmark($_GET['url'], '', 'Read-Later');
-
-include 'templates/addBm.php';
diff --git a/apps/bookmarks/ajax/addBookmark.php b/apps/bookmarks/ajax/addBookmark.php
deleted file mode 100644
index baf3a288c17..00000000000
--- a/apps/bookmarks/ajax/addBookmark.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/**
-* ownCloud - bookmarks plugin
-*
-* @author Arthur Schiwon
-* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-//no apps or filesystem
-$RUNTIME_NOSETUPFS=true;
-
-
-
-// Check if we are a user
-OCP\JSON::checkLoggedIn();
-OCP\JSON::callCheck();
-
-OCP\JSON::checkAppEnabled('bookmarks');
-
-require_once(OC_App::getAppPath('bookmarks').'/bookmarksHelper.php');
-$id = addBookmark($_POST['url'], $_POST['title'], $_POST['tags']);
-OCP\JSON::success(array('data' => $id));
diff --git a/apps/bookmarks/ajax/delBookmark.php b/apps/bookmarks/ajax/delBookmark.php
deleted file mode 100644
index 26437ea0c8c..00000000000
--- a/apps/bookmarks/ajax/delBookmark.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/**
-* ownCloud - bookmarks plugin
-*
-* @author Arthur Schiwon
-* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-// Check if we are a user
-OCP\JSON::checkLoggedIn();
-OCP\JSON::callCheck();
-
-OCP\JSON::checkAppEnabled('bookmarks');
-OCP\JSON::callCheck();
-
-$id = $_POST['id'];
-if (!OC_Bookmarks_Bookmarks::deleteUrl($id)){
- OC_JSON::error();
- exit();
-}
-
-OCP\JSON::success();
diff --git a/apps/bookmarks/ajax/editBookmark.php b/apps/bookmarks/ajax/editBookmark.php
deleted file mode 100644
index 617021e412b..00000000000
--- a/apps/bookmarks/ajax/editBookmark.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-
-/**
-* ownCloud - bookmarks plugin - edit bookmark script
-*
-* @author Golnaz Nilieh
-* @copyright 2011 Golnaz Nilieh <golnaz.nilieh@gmail.com>
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-// Check if we are a user
-OCP\JSON::checkLoggedIn();
-OCP\JSON::callCheck();
-
-OCP\JSON::checkAppEnabled('bookmarks');
-
-$CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" );
-if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
- $_ut = "strftime('%s','now')";
-} elseif($CONFIG_DBTYPE == 'pgsql') {
- $_ut = 'date_part(\'epoch\',now())::integer';
-} elseif($CONFIG_DBTYPE == 'oci') {
- $_ut = '(oracletime - to_date(\'19700101\',\'YYYYMMDD\')) * 86400';
-} else {
- $_ut = "UNIX_TIMESTAMP()";
-}
-
-$bookmark_id = (int)$_POST["id"];
-$user_id = OCP\USER::getUser();
-
-//TODO check using CURRENT_TIMESTAMP? prepare already does magic when using now()
-$query = OCP\DB::prepare('
- UPDATE `*PREFIX*bookmarks`
- SET `url` = ?, `title` = ?, `lastmodified` = '.$_ut.'
- WHERE `id` = ?
- AND `user_id` = ?
- ');
-
-$params=array(
- htmlspecialchars_decode($_POST["url"]),
- htmlspecialchars_decode($_POST["title"]),
- $bookmark_id,
- $user_id,
- );
-
-$result = $query->execute($params);
-
-# Abort the operation if bookmark couldn't be set (probably because the user is not allowed to edit this bookmark)
-if ($result->numRows() == 0) exit();
-
-# Remove old tags and insert new ones.
-$query = OCP\DB::prepare('
- DELETE FROM `*PREFIX*bookmarks_tags`
- WHERE `bookmark_id` = ?
- ');
-
-$params=array(
- $bookmark_id
- );
-
-$query->execute($params);
-
-$query = OCP\DB::prepare('
- INSERT INTO `*PREFIX*bookmarks_tags`
- (`bookmark_id`, `tag`)
- VALUES (?, ?)
- ');
-
-$tags = explode(' ', urldecode($_POST["tags"]));
-foreach ($tags as $tag) {
- if(empty($tag)) {
- //avoid saving blankspaces
- continue;
- }
- $params = array($bookmark_id, trim($tag));
- $query->execute($params);
-}
diff --git a/apps/bookmarks/ajax/recordClick.php b/apps/bookmarks/ajax/recordClick.php
deleted file mode 100644
index 785056dc11c..00000000000
--- a/apps/bookmarks/ajax/recordClick.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/**
-* ownCloud - bookmarks plugin
-*
-* @author Arthur Schiwon
-* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-// Check if we are a user
-OCP\JSON::checkLoggedIn();
-OCP\JSON::checkAppEnabled('bookmarks');
-
-$query = OCP\DB::prepare('
- UPDATE `*PREFIX*bookmarks`
- SET `clickcount` = `clickcount` + 1
- WHERE `user_id` = ?
- AND `url` LIKE ?
- ');
-
-$params=array(OCP\USER::getUser(), htmlspecialchars_decode($_POST["url"]));
-$bookmarks = $query->execute($params);
-
-header( "HTTP/1.1 204 No Content" );
-
diff --git a/apps/bookmarks/ajax/updateList.php b/apps/bookmarks/ajax/updateList.php
deleted file mode 100644
index cf9a2cf9183..00000000000
--- a/apps/bookmarks/ajax/updateList.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/**
-* ownCloud - bookmarks plugin
-*
-* @author Arthur Schiwon
-* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
-* @copyright 2012 David Iwanowitsch <david at unclouded dot de>
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-// Check if we are a user
-OCP\JSON::checkLoggedIn();
-OCP\JSON::checkAppEnabled('bookmarks');
-
-
-//Filter for tag?
-$filterTag = isset($_POST['tag']) ? htmlspecialchars_decode($_POST['tag']) : false;
-
-$offset = isset($_POST['page']) ? intval($_POST['page']) * 10 : 0;
-
-$sort = isset($_POST['sort']) ? ($_POST['sort']) : 'bookmarks_sorting_recent';
-if($sort == 'bookmarks_sorting_clicks') {
- $sqlSortColumn = 'clickcount';
-} else {
- $sqlSortColumn = 'id';
-}
-
-
-$bookmarks = OC_Bookmarks_Bookmarks::findBookmarks($offset, $sqlSortColumn, $filterTag, true);
-
-OCP\JSON::success(array('data' => $bookmarks));
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
diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php
deleted file mode 100644
index 988042fc0e5..00000000000
--- a/apps/bookmarks/bookmarksHelper.php
+++ /dev/null
@@ -1,130 +0,0 @@
-<?php
-
-// Source: http://www.php.net/manual/de/function.curl-setopt.php#102121
-// This works around a safe_mode/open_basedir restriction
-function curl_exec_follow(/*resource*/ $ch, /*int*/ &$maxredirect = null) {
- $mr = $maxredirect === null ? 5 : intval($maxredirect);
- if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) {
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $mr > 0);
- curl_setopt($ch, CURLOPT_MAXREDIRS, $mr);
- } else {
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
- if ($mr > 0) {
- $newurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
-
- $rch = curl_copy_handle($ch);
- curl_setopt($rch, CURLOPT_HEADER, true);
- curl_setopt($rch, CURLOPT_NOBODY, true);
- curl_setopt($rch, CURLOPT_FORBID_REUSE, false);
- curl_setopt($rch, CURLOPT_RETURNTRANSFER, true);
- do {
- curl_setopt($rch, CURLOPT_URL, $newurl);
- $header = curl_exec($rch);
- if (curl_errno($rch)) {
- $code = 0;
- } else {
- $code = curl_getinfo($rch, CURLINFO_HTTP_CODE);
- if ($code == 301 || $code == 302) {
- preg_match('/Location:(.*?)\n/', $header, $matches);
- $newurl = trim(array_pop($matches));
- } else {
- $code = 0;
- }
- }
- } while ($code && --$mr);
- curl_close($rch);
- if (!$mr) {
- if ($maxredirect === null) {
- trigger_error('Too many redirects. When following redirects, libcurl hit the maximum amount.', E_USER_WARNING);
- } else {
- $maxredirect = 0;
- }
- return false;
- }
- curl_setopt($ch, CURLOPT_URL, $newurl);
- }
- }
- return curl_exec($ch);
-}
-
-function getURLMetadata($url) {
- //allow only http(s) and (s)ftp
- $protocols = '/^[hs]{0,1}[tf]{0,1}tp[s]{0,1}\:\/\//i';
- //if not (allowed) protocol is given, assume http
- if(preg_match($protocols, $url) == 0) {
- $url = 'http://' . $url;
- }
- $metadata['url'] = $url;
-
- if (!function_exists('curl_init')){
- return $metadata;
- }
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $page = curl_exec_follow($ch);
- curl_close($ch);
-
- @preg_match( "/<title>(.*)<\/title>/si", $page, $match );
- $metadata['title'] = htmlspecialchars_decode(@$match[1]);
-
- return $metadata;
-}
-
-function addBookmark($url, $title, $tags='') {
- $CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" );
- if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
- $_ut = "strftime('%s','now')";
- } elseif($CONFIG_DBTYPE == 'pgsql') {
- $_ut = 'date_part(\'epoch\',now())::integer';
- } else {
- $_ut = "UNIX_TIMESTAMP()";
- }
-
- //FIXME: Detect when user adds a known URL
- $query = OCP\DB::prepare("
- INSERT INTO `*PREFIX*bookmarks`
- (`url`, `title`, `user_id`, `public`, `added`, `lastmodified`)
- VALUES (?, ?, ?, 0, $_ut, $_ut)
- ");
-
- if(empty($title)) {
- $metadata = getURLMetadata($url);
- if(isset($metadata['title'])) // Check for problems fetching the title
- $title = $metadata['title'];
- }
-
- if(empty($title)) {
- $l = OC_L10N::get('bookmarks');
- $title = $l->t('unnamed');
- }
-
- $params=array(
- htmlspecialchars_decode($url),
- htmlspecialchars_decode($title),
- OCP\USER::getUser()
- );
- $query->execute($params);
-
- $b_id = OCP\DB::insertid('*PREFIX*bookmarks');
-
- if($b_id !== false) {
- $query = OCP\DB::prepare("
- INSERT INTO `*PREFIX*bookmarks_tags`
- (`bookmark_id`, `tag`)
- VALUES (?, ?)
- ");
-
- $tags = explode(' ', urldecode($tags));
- foreach ($tags as $tag) {
- if(empty($tag)) {
- //avoid saving blankspaces
- continue;
- }
- $params = array($b_id, trim($tag));
- $query->execute($params);
- }
-
- return $b_id;
- }
-}
diff --git a/apps/bookmarks/css/bookmarks.css b/apps/bookmarks/css/bookmarks.css
deleted file mode 100644
index a67afcd44fa..00000000000
--- a/apps/bookmarks/css/bookmarks.css
+++ /dev/null
@@ -1,87 +0,0 @@
-#content { overflow: auto; height: 100%; }
-#firstrun { width: 80%; margin: 5em auto auto auto; text-align: center; font-weight:bold; font-size:1.5em; color:#777; position: relative;}
-#firstrun small { display: block; font-weight: normal; font-size: 0.5em; margin-bottom: 1.5em; }
-#firstrun .button { font-size: 0.7em; }
-#firstrun #selections { font-size:0.8em; font-weight: normal; width: 100%; margin: 2em auto auto auto; clear: both; }
-
-.bookmarks_headline {
- font-size: large;
- font-weight: bold;
- margin-left: 2em;
- padding: 2.5ex 0.5ex;
-}
-
-.bookmarks_menu {
- margin-left: 1.5em;
- padding: 0.5ex;
-}
-
-.bookmarks_list {
- overflow: auto;
- position: fixed;
- top: 6.5em;
-}
-
-.bookmarks_addBml {
- text-decoration: underline;
-}
-
-.bookmarks_label {
- width: 7em;
- display: inline-block;
- text-align: right;
-}
-
-.bookmarks_input {
- width: 8em;
-}
-
-.bookmark_actions {
- position: absolute;
- right: 1em;
- top: 0.7em;
- display: none;
-}
-.bookmark_actions span { margin: 0 0.4em; }
-.bookmark_actions img { opacity: 0.3; }
-.bookmark_actions img:hover { opacity: 1; cursor: pointer; }
-
-.bookmark_single {
- position: relative;
- padding: 0.5em 1em;
- border-bottom: 1px solid #DDD;
- -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms;
-}
-
-.bookmark_single:hover {
- background-color:#f8f8f8
-}
-
-.bookmark_single:hover .bookmark_actions {
- display: block;
-}
-
-.bookmark_title { font-weight: bold; display: inline-block; margin-right: 0.8em; }
-.bookmark_url { display: none; color: #999; }
-.bookmark_single:hover .bookmark_url { display: inline; }
-.bookmark_tags {
- position: absolute;
- top: 0.5em;
- right: 6em;
- text-align: right;
-}
-.bookmark_tag {
- display: inline-block;
- color: white;
- margin: 0 0.2em;
- padding: 0 0.4em;
- background-color: #1D2D44;
- border-radius: 0.4em;
- opacity: 0.2;
-}
-.bookmark_tag:hover { opacity: 0.5; }
-
-.loading_meta {
- display: none;
- margin-left: 5px;
-}
diff --git a/apps/bookmarks/img/bookmarks.png b/apps/bookmarks/img/bookmarks.png
deleted file mode 100644
index 3e8eed2380f..00000000000
--- a/apps/bookmarks/img/bookmarks.png
+++ /dev/null
Binary files differ
diff --git a/apps/bookmarks/index.php b/apps/bookmarks/index.php
deleted file mode 100644
index a4ce0229876..00000000000
--- a/apps/bookmarks/index.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/**
-* ownCloud - bookmarks plugin
-*
-* @author Arthur Schiwon
-* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-
-
-// Check if we are a user
-OCP\User::checkLoggedIn();
-OCP\App::checkAppEnabled('bookmarks');
-
-OCP\App::setActiveNavigationEntry( 'bookmarks_index' );
-
-OCP\Util::addscript('bookmarks','bookmarks');
-OCP\Util::addStyle('bookmarks', 'bookmarks');
-
-$tmpl = new OCP\Template( 'bookmarks', 'list', 'user' );
-
-$tmpl->printPage();
diff --git a/apps/bookmarks/js/addBm.js b/apps/bookmarks/js/addBm.js
deleted file mode 100644
index 625ac8420a8..00000000000
--- a/apps/bookmarks/js/addBm.js
+++ /dev/null
@@ -1,16 +0,0 @@
-$(document).ready(function() {
- $('#bookmark_add_submit').click(addBookmark);
-});
-
-function addBookmark(event) {
- var url = $('#bookmark_add_url').val();
- var tags = $('#bookmark_add_tags').val();
- $.ajax({
- type: 'POST',
- url: 'ajax/addBookmark.php',
- data: 'url=' + encodeURI(url) + '&tags=' + encodeURI(tags),
- success: function(data){
- window.close();
- }
- });
-} \ No newline at end of file
diff --git a/apps/bookmarks/js/bookmarks.js b/apps/bookmarks/js/bookmarks.js
deleted file mode 100644
index 7f3104e812f..00000000000
--- a/apps/bookmarks/js/bookmarks.js
+++ /dev/null
@@ -1,201 +0,0 @@
-var bookmarks_page = 0;
-var bookmarks_loading = false;
-
-var bookmarks_sorting = 'bookmarks_sorting_recent';
-
-$(document).ready(function() {
- $('#bookmark_add_submit').click(addOrEditBookmark);
- $(window).resize(function () {
- fillWindow($('.bookmarks_list'));
- });
- $(window).resize();
- $('.bookmarks_list').scroll(updateOnBottom).empty().width($('#content').width());
- getBookmarks();
-});
-
-function getBookmarks() {
- if(bookmarks_loading) {
- //have patience :)
- return;
- }
-
- $.ajax({
- type: 'POST',
- url: OC.filePath('bookmarks', 'ajax', 'updateList.php'),
- data: 'tag=' + encodeURIComponent($('#bookmarkFilterTag').val()) + '&page=' + bookmarks_page + '&sort=' + bookmarks_sorting,
- success: function(bookmarks){
- if (bookmarks.data.length) {
- bookmarks_page += 1;
- }
- $('.bookmark_link').unbind('click', recordClick);
- $('.bookmark_delete').unbind('click', delBookmark);
- $('.bookmark_edit').unbind('click', showBookmark);
-
- for(var i in bookmarks.data) {
- updateBookmarksList(bookmarks.data[i]);
- $("#firstrun").hide();
- }
- if($('.bookmarks_list').is(':empty')) {
- $("#firstrun").show();
- }
-
- $('.bookmark_link').click(recordClick);
- $('.bookmark_delete').click(delBookmark);
- $('.bookmark_edit').click(showBookmark);
-
- bookmarks_loading = false;
- if (bookmarks.data.length) {
- updateOnBottom()
- }
- }
- });
-}
-
-// function addBookmark() {
-// Instead of creating editBookmark() function, Converted the one above to
-// addOrEditBookmark() to make .js file more compact.
-
-function addOrEditBookmark(event) {
- var id = $('#bookmark_add_id').val();
- var url = encodeEntities($('#bookmark_add_url').val());
- var title = encodeEntities($('#bookmark_add_title').val());
- var tags = encodeEntities($('#bookmark_add_tags').val());
- $("#firstrun").hide();
- if($.trim(url) == '') {
- OC.dialogs.alert('A valid bookmark url must be provided', 'Error creating bookmark');
- return false;
- }
- if($.trim(title) == '') {
- OC.dialogs.alert('A valid bookmark title must be provided', 'Error creating bookmark');
- return false;
- }
- if (id == 0) {
- $.ajax({
- type: 'POST',
- url: OC.filePath('bookmarks', 'ajax', 'addBookmark.php'),
- data: 'url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&tags=' + encodeURIComponent(tags),
- success: function(response){
- $('.bookmarks_input').val('');
- $('.bookmarks_list').empty();
- bookmarks_page = 0;
- getBookmarks();
- }
- });
- }
- else {
- $.ajax({
- type: 'POST',
- url: OC.filePath('bookmarks', 'ajax', 'editBookmark.php'),
- data: 'id=' + id + '&url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&tags=' + encodeURIComponent(tags),
- success: function(){
- $('.bookmarks_input').val('');
- $('#bookmark_add_id').val('0');
- $('.bookmarks_list').empty();
- bookmarks_page = 0;
- getBookmarks();
- }
- });
- }
-
-}
-
-function delBookmark(event) {
- var record = $(this).parent().parent();
- $.ajax({
- type: 'POST',
- url: OC.filePath('bookmarks', 'ajax', 'delBookmark.php'),
- data: 'id=' + record.data('id'),
- success: function(data){
- if (data.status == 'success') {
- record.remove();
- if($('.bookmarks_list').is(':empty')) {
- $("#firstrun").show();
- }
- }
- }
- });
-}
-
-function showBookmark(event) {
- var record = $(this).parent().parent();
- $('#bookmark_add_id').val(record.attr('data-id'));
- $('#bookmark_add_url').val(record.children('.bookmark_url:first').text());
- $('#bookmark_add_title').val(record.children('.bookmark_title:first').text());
- $('#bookmark_add_tags').val(record.children('.bookmark_tags:first').text());
-
- if ($('.bookmarks_add').css('display') == 'none') {
- $('.bookmarks_add').slideToggle();
- }
-}
-
-function replaceQueryString(url,param,value) {
- var re = new RegExp("([?|&])" + param + "=.*?(&|$)","i");
- if (url.match(re))
- return url.replace(re,'$1' + param + "=" + value + '$2');
- else
- return url + '&' + param + "=" + value;
-}
-
-function updateBookmarksList(bookmark) {
- var tags = encodeEntities(bookmark.tags).split(' ');
- var taglist = '';
- for ( var i=0, len=tags.length; i<len; ++i ){
- if(tags[i] != '')
- taglist = taglist + '<a class="bookmark_tag" href="'+replaceQueryString( String(window.location), 'tag', encodeURIComponent(tags[i])) + '">' + tags[i] + '</a> ';
- }
- if(!hasProtocol(bookmark.url)) {
- bookmark.url = 'http://' + bookmark.url;
- }
- if(bookmark.title == '') bookmark.title = bookmark.url;
- $('.bookmarks_list').append(
- '<div class="bookmark_single" data-id="' + bookmark.id +'" >' +
- '<p class="bookmark_actions">' +
- '<span class="bookmark_edit">' +
- '<img class="svg" src="'+OC.imagePath('core', 'actions/rename')+'" title="Edit">' +
- '</span>' +
- '<span class="bookmark_delete">' +
- '<img class="svg" src="'+OC.imagePath('core', 'actions/delete')+'" title="Delete">' +
- '</span>&nbsp;' +
- '</p>' +
- '<p class="bookmark_title">'+
- '<a href="' + encodeEntities(bookmark.url) + '" target="_blank" class="bookmark_link">' + encodeEntities(bookmark.title) + '</a>' +
- '</p>' +
- '<p class="bookmark_url"><a href="' + encodeEntities(bookmark.url) + '" target="_blank" class="bookmark_link">' + encodeEntities(bookmark.url) + '</a></p>' +
- '</div>'
- );
- if(taglist != '') {
- $('div[data-id="'+ bookmark.id +'"]').append('<p class="bookmark_tags">' + taglist + '</p>');
- }
-}
-
-function updateOnBottom() {
- //check wether user is on bottom of the page
- var top = $('.bookmarks_list>:last-child').position().top;
- var height = $('.bookmarks_list').height();
- // use a bit of margin to begin loading before we are really at the
- // bottom
- if (top < height * 1.2) {
- getBookmarks();
- }
-}
-
-function recordClick(event) {
- $.ajax({
- type: 'POST',
- url: OC.filePath('bookmarks', 'ajax', 'recordClick.php'),
- data: 'url=' + encodeURIComponent($(this).attr('href')),
- });
-}
-
-function encodeEntities(s){
- try {
- return $('<div/>').text(s).html();
- } catch (ex) {
- return "";
- }
-}
-
-function hasProtocol(url) {
- var regexp = /(ftp|http|https|sftp)/;
- return regexp.test(url);
-}
diff --git a/apps/bookmarks/js/bookmarksearch.js b/apps/bookmarks/js/bookmarksearch.js
deleted file mode 100644
index e8f5363c935..00000000000
--- a/apps/bookmarks/js/bookmarksearch.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright (c) 2012 David Iwanowitsch <david at unclouded dot de>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-$(document).ready(function(){
- OC.search.customResults['Bookm.'] = function(row,item){
- var a=row.find('a');
- a.attr('target','_blank');
- a.click(recordClick);
- }
-});
-
-function recordClick(event) {
- var jsFileLocation = $('script[src*=bookmarksearch]').attr('src');
- jsFileLocation = jsFileLocation.replace('js/bookmarksearch.js', '');
- $.ajax({
- type: 'POST',
- url: jsFileLocation + 'ajax/recordClick.php',
- data: 'url=' + encodeURI($(this).attr('href')),
- });
-}
diff --git a/apps/bookmarks/l10n/bg_BG.php b/apps/bookmarks/l10n/bg_BG.php
deleted file mode 100644
index 04d731b1074..00000000000
--- a/apps/bookmarks/l10n/bg_BG.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Отметки",
-"unnamed" => "неозаглавено",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Завлачете това в лентата с отметки на браузъра си и го натискайте, когато искате да отметнете бързо някоя страница:",
-"Read later" => "Отмятане",
-"Address" => "Адрес",
-"Title" => "Заглавие",
-"Tags" => "Етикети",
-"Save bookmark" => "Запис на отметката",
-"You have no bookmarks" => "Нямате отметки",
-"Bookmarklet <br />" => "Бутон за отметки <br />"
-);
diff --git a/apps/bookmarks/l10n/ca.php b/apps/bookmarks/l10n/ca.php
deleted file mode 100644
index cf90d9a8874..00000000000
--- a/apps/bookmarks/l10n/ca.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Adreces d'interès",
-"unnamed" => "sense nom",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arrossegueu-ho al navegador i feu-hi un clic quan volgueu marcar ràpidament una adreça d'interès:",
-"Read later" => "Llegeix més tard",
-"Address" => "Adreça",
-"Title" => "Títol",
-"Tags" => "Etiquetes",
-"Save bookmark" => "Desa l'adreça d'interès",
-"You have no bookmarks" => "No teniu adreces d'interès",
-"Bookmarklet <br />" => "Bookmarklet <br />"
-);
diff --git a/apps/bookmarks/l10n/cs_CZ.php b/apps/bookmarks/l10n/cs_CZ.php
deleted file mode 100644
index 2251969a26c..00000000000
--- a/apps/bookmarks/l10n/cs_CZ.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Záložky",
-"unnamed" => "nepojmenovaný",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Přetáhněte do Vašeho prohlížeče a kliněte, pokud si přejete rychle uložit stranu do záložek:",
-"Read later" => "Přečíst později",
-"Address" => "Adresa",
-"Title" => "Název",
-"Tags" => "Tagy",
-"Save bookmark" => "Uložit záložku",
-"You have no bookmarks" => "Nemáte žádné záložky",
-"Bookmarklet <br />" => "Záložky <br />"
-);
diff --git a/apps/bookmarks/l10n/de.php b/apps/bookmarks/l10n/de.php
deleted file mode 100644
index 14a54f1ccee..00000000000
--- a/apps/bookmarks/l10n/de.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Lesezeichen",
-"unnamed" => "unbenannt",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ziehen Sie dies zu Ihren Browser-Lesezeichen und klicken Sie darauf, wenn Sie eine Website schnell den Lesezeichen hinzufügen wollen.",
-"Read later" => "Später lesen",
-"Address" => "Adresse",
-"Title" => "Titel",
-"Tags" => "Tags",
-"Save bookmark" => "Lesezeichen speichern",
-"You have no bookmarks" => "Sie haben keine Lesezeichen",
-"Bookmarklet <br />" => "Bookmarklet <br />"
-);
diff --git a/apps/bookmarks/l10n/el.php b/apps/bookmarks/l10n/el.php
deleted file mode 100644
index f282a1bbf85..00000000000
--- a/apps/bookmarks/l10n/el.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Σελιδοδείκτες",
-"unnamed" => "ανώνυμο",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Σύρετε αυτό στους σελιδοδείκτες του περιηγητή σας και κάντε κλικ επάνω του, όταν θέλετε να προσθέσετε σύντομα μια ιστοσελίδα ως σελιδοδείκτη:",
-"Read later" => "Ανάγνωση αργότερα",
-"Address" => "Διεύθυνση",
-"Title" => "Τίτλος",
-"Tags" => "Ετικέτες",
-"Save bookmark" => "Αποθήκευση σελιδοδείκτη",
-"You have no bookmarks" => "Δεν έχετε σελιδοδείκτες",
-"Bookmarklet <br />" => "Εφαρμογίδιο Σελιδοδεικτών <br />"
-);
diff --git a/apps/bookmarks/l10n/eo.php b/apps/bookmarks/l10n/eo.php
deleted file mode 100644
index 808cda8a041..00000000000
--- a/apps/bookmarks/l10n/eo.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Legosignoj",
-"unnamed" => "nenomita",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ŝovu tion ĉi al la legosignoj de via TTT-legilo kaj klaku ĝin, se vi volas rapide legosignigi TTT-paĝon:",
-"Read later" => "Legi poste",
-"Address" => "Adreso",
-"Title" => "Titolo",
-"Tags" => "Etikedoj",
-"Save bookmark" => "Konservi legosignon",
-"You have no bookmarks" => "Vi havas neniun legosignon"
-);
diff --git a/apps/bookmarks/l10n/es.php b/apps/bookmarks/l10n/es.php
deleted file mode 100644
index 071b0dda707..00000000000
--- a/apps/bookmarks/l10n/es.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Marcadores",
-"unnamed" => "sin nombre",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arrastra desde aquí a los marcadores de tu navegador, y haz clic cuando quieras marcar una página web rápidamente:",
-"Read later" => "Leer después",
-"Address" => "Dirección",
-"Title" => "Título",
-"Tags" => "Etiquetas",
-"Save bookmark" => "Guardar marcador",
-"You have no bookmarks" => "No tienes marcadores",
-"Bookmarklet <br />" => "Bookmarklet <br />"
-);
diff --git a/apps/bookmarks/l10n/et_EE.php b/apps/bookmarks/l10n/et_EE.php
deleted file mode 100644
index da9e4d92a6f..00000000000
--- a/apps/bookmarks/l10n/et_EE.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Järjehoidjad",
-"unnamed" => "nimetu",
-"Read later" => "Loe hiljem",
-"Address" => "Aadress",
-"Title" => "Pealkiri",
-"Tags" => "Sildid",
-"Save bookmark" => "Salvesta järjehoidja",
-"You have no bookmarks" => "Sul pole järjehoidjaid"
-);
diff --git a/apps/bookmarks/l10n/fa.php b/apps/bookmarks/l10n/fa.php
deleted file mode 100644
index b46ce911d41..00000000000
--- a/apps/bookmarks/l10n/fa.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "نشانک‌ها",
-"unnamed" => "بدون‌نام",
-"Address" => "آدرس",
-"Title" => "عنوان",
-"Save bookmark" => "ذخیره نشانک",
-"You have no bookmarks" => "شما هیچ نشانکی ندارید"
-);
diff --git a/apps/bookmarks/l10n/fi_FI.php b/apps/bookmarks/l10n/fi_FI.php
deleted file mode 100644
index c814747411b..00000000000
--- a/apps/bookmarks/l10n/fi_FI.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Kirjanmerkit",
-"unnamed" => "nimetön",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Vedä tämä selaimesi kirjanmerkkipalkkiin ja napsauta sitä, kun haluat lisätä kirjanmerkin nopeasti:",
-"Read later" => "Lue myöhemmin",
-"Address" => "Osoite",
-"Title" => "Otsikko",
-"Tags" => "Tunnisteet",
-"Save bookmark" => "Tallenna kirjanmerkki",
-"You have no bookmarks" => "Sinulla ei ole kirjanmerkkejä",
-"Bookmarklet <br />" => "Kirjanmerkitsin <br />"
-);
diff --git a/apps/bookmarks/l10n/fr.php b/apps/bookmarks/l10n/fr.php
deleted file mode 100644
index 508c82369fb..00000000000
--- a/apps/bookmarks/l10n/fr.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Favoris",
-"unnamed" => "sans titre",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Glissez ceci dans les favoris de votre navigateur, et cliquer dessus lorsque vous souhaitez ajouter la page en cours à vos marques-pages :",
-"Read later" => "Lire plus tard",
-"Address" => "Adresse",
-"Title" => "Titre",
-"Tags" => "Étiquettes",
-"Save bookmark" => "Sauvegarder le favori",
-"You have no bookmarks" => "Vous n'avez aucun favori",
-"Bookmarklet <br />" => "Gestionnaire de favoris <br />"
-);
diff --git a/apps/bookmarks/l10n/it.php b/apps/bookmarks/l10n/it.php
deleted file mode 100644
index 862d75bde45..00000000000
--- a/apps/bookmarks/l10n/it.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Segnalibri",
-"unnamed" => "senza nome",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Quando vuoi creare rapidamente un segnalibro, trascinalo sui segnalibri del browser e fai clic su di esso:",
-"Read later" => "Leggi dopo",
-"Address" => "Indirizzo",
-"Title" => "Titolo",
-"Tags" => "Tag",
-"Save bookmark" => "Salva segnalibro",
-"You have no bookmarks" => "Non hai segnalibri",
-"Bookmarklet <br />" => "Bookmarklet <br />"
-);
diff --git a/apps/bookmarks/l10n/lt_LT.php b/apps/bookmarks/l10n/lt_LT.php
deleted file mode 100644
index 58faddc2331..00000000000
--- a/apps/bookmarks/l10n/lt_LT.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php $TRANSLATIONS = array(
-"unnamed" => "be pavadinimo"
-);
diff --git a/apps/bookmarks/l10n/nb_NO.php b/apps/bookmarks/l10n/nb_NO.php
deleted file mode 100644
index f0efeaca34d..00000000000
--- a/apps/bookmarks/l10n/nb_NO.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Bokmerker",
-"unnamed" => "uten navn",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Dra denne over din nettlesers bokmerker og klikk den, hvis du ønsker å hurtig legge til bokmerke for en nettside",
-"Read later" => "Les senere",
-"Address" => "Adresse",
-"Title" => "Tittel",
-"Tags" => "Etikett",
-"Save bookmark" => "Lagre bokmerke",
-"You have no bookmarks" => "Du har ingen bokmerker",
-"Bookmarklet <br />" => "Bokmerke <br />"
-);
diff --git a/apps/bookmarks/l10n/nl.php b/apps/bookmarks/l10n/nl.php
deleted file mode 100644
index e5e0894b516..00000000000
--- a/apps/bookmarks/l10n/nl.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Bladwijzers",
-"unnamed" => "geen naam",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Sleep dit naar uw browser bladwijzers en klik erop, wanneer u een webpagina snel wilt voorzien van een bladwijzer:",
-"Read later" => "Lees later",
-"Address" => "Adres",
-"Title" => "Titel",
-"Tags" => "Tags",
-"Save bookmark" => "Bewaar bookmark",
-"You have no bookmarks" => "U heeft geen bookmarks"
-);
diff --git a/apps/bookmarks/l10n/ru.php b/apps/bookmarks/l10n/ru.php
deleted file mode 100644
index 3abc089e3f5..00000000000
--- a/apps/bookmarks/l10n/ru.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Закладки",
-"unnamed" => "без имени",
-"Read later" => "Прочитать позже",
-"Address" => "Адрес",
-"Title" => "Заголовок",
-"Tags" => "Метки",
-"Save bookmark" => "Сохранить закладки",
-"You have no bookmarks" => "У вас нет закладок",
-"Bookmarklet <br />" => "Букмарклет <br />"
-);
diff --git a/apps/bookmarks/l10n/sl.php b/apps/bookmarks/l10n/sl.php
deleted file mode 100644
index 32a41629082..00000000000
--- a/apps/bookmarks/l10n/sl.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Zaznamki",
-"unnamed" => "neimenovano",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Povlecite to povezavo med zaznamke v vašem brskalniku in jo, ko želite ustvariti zaznamek trenutne strani, preprosto kliknite:",
-"Read later" => "Preberi kasneje",
-"Address" => "Naslov",
-"Title" => "Ime",
-"Tags" => "Oznake",
-"Save bookmark" => "Shrani zaznamek",
-"You have no bookmarks" => "Nimate zaznamkov",
-"Bookmarklet <br />" => "Bookmarklet <br />"
-);
diff --git a/apps/bookmarks/l10n/sv.php b/apps/bookmarks/l10n/sv.php
deleted file mode 100644
index 689bd452f12..00000000000
--- a/apps/bookmarks/l10n/sv.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "Bokmärken",
-"unnamed" => "namnlös",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Dra till din webbläsares bokmärken och klicka på det när du vill bokmärka en webbsida snabbt:",
-"Read later" => "Läs senare",
-"Address" => "Adress",
-"Title" => "Titel",
-"Tags" => "Taggar",
-"Save bookmark" => "Spara bokmärke",
-"You have no bookmarks" => "Du har inga bokmärken",
-"Bookmarklet <br />" => "Skriptbokmärke <br />"
-);
diff --git a/apps/bookmarks/l10n/th_TH.php b/apps/bookmarks/l10n/th_TH.php
deleted file mode 100644
index 64a148efabc..00000000000
--- a/apps/bookmarks/l10n/th_TH.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "รายการโปรด",
-"unnamed" => "ยังไม่มีชื่อ",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "ลากสิ่งนี้ไปไว้ที่รายการโปรดในโปรแกรมบราวเซอร์ของคุณ แล้วคลิกที่นั่น, เมื่อคุณต้องการเก็บหน้าเว็บเพจเข้าไปไว้ในรายการโปรดอย่างรวดเร็ว",
-"Read later" => "อ่านภายหลัง",
-"Address" => "ที่อยู่",
-"Title" => "ชื่อ",
-"Tags" => "ป้ายกำกับ",
-"Save bookmark" => "บันทึกรายการโปรด",
-"You have no bookmarks" => "คุณยังไม่มีรายการโปรด",
-"Bookmarklet <br />" => "Bookmarklet <br />"
-);
diff --git a/apps/bookmarks/l10n/xgettextfiles b/apps/bookmarks/l10n/xgettextfiles
deleted file mode 100644
index cd555432390..00000000000
--- a/apps/bookmarks/l10n/xgettextfiles
+++ /dev/null
@@ -1,5 +0,0 @@
-../appinfo/app.php
-../lib/search.php
-../templates/settings.php
-../templates/addBm.php
-../templates/list.php
diff --git a/apps/bookmarks/l10n/zh_CN.php b/apps/bookmarks/l10n/zh_CN.php
deleted file mode 100644
index 0510738c979..00000000000
--- a/apps/bookmarks/l10n/zh_CN.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Bookmarks" => "书签",
-"unnamed" => "未命名",
-"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "拖曳此处到您的浏览器书签处,点击可以将网页快速添加到书签中。",
-"Read later" => "稍后阅读",
-"Address" => "地址",
-"Title" => "标题",
-"Tags" => "标签",
-"Save bookmark" => "保存书签",
-"You have no bookmarks" => "您暂无书签",
-"Bookmarklet <br />" => "书签应用"
-);
diff --git a/apps/bookmarks/lib/bookmarks.php b/apps/bookmarks/lib/bookmarks.php
deleted file mode 100644
index e1e13388902..00000000000
--- a/apps/bookmarks/lib/bookmarks.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-/**
- * ownCloud - bookmarks plugin
- *
- * @author Arthur Schiwon
- * @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * This class manages bookmarks
- */
-class OC_Bookmarks_Bookmarks{
-
- /**
- * @brief Finds all bookmarks, matching the filter
- * @param offset result offset
- * @param sqlSortColumn sort result with this column
- * @param filter can be: empty -> no filter, a string -> filter this, a string array -> filter for all strings
- * @param filterTagOnly if true, filter affacts only tags, else filter affects url, title and tags
- * @return void
- */
- public static function findBookmarks($offset, $sqlSortColumn, $filter, $filterTagOnly){
- //OCP\Util::writeLog('bookmarks', 'findBookmarks ' .$offset. ' '.$sqlSortColumn.' '. $filter.' '. $filterTagOnly ,OCP\Util::DEBUG);
- $CONFIG_DBTYPE = OCP\Config::getSystemValue( 'dbtype', 'sqlite' );
-
- $params=array(OCP\USER::getUser());
-
- if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
- $_gc_separator = ', \' \'';
- } else {
- $_gc_separator = 'SEPARATOR \' \'';
- }
-
- if($filter){
- if($CONFIG_DBTYPE == 'pgsql' )
- $tagString = 'array_to_string(array_agg(tag), \' \')';
- else
- $tagString = 'tags';
-
- $sqlFilterTag = 'HAVING ';
- if(is_array($filter)){
- $first = true;
- $filterstring = '';
- foreach ($filter as $singleFilter){
- $filterstring = $filterstring . ($first?'':' AND ') . $tagString.' LIKE ? ';
- $params[] = '%'.$singleFilter.'%';
- $first=false;
- }
- $sqlFilterTag = $sqlFilterTag . $filterstring;
- } else{
- $sqlFilterTag = $sqlFilterTag .$tagString.' LIKE ? ';
- $params[] = '%'.$filter.'%';
- }
- } else {
- $sqlFilterTag = '';
- }
-
- if($CONFIG_DBTYPE == 'pgsql' ){
- $query = OCP\DB::prepare('
- SELECT `id`, `url`, `title`, '.($filterTagOnly?'':'`url` || `title` ||').' array_to_string(array_agg(`tag`), \' \') as `tags`
- FROM `*PREFIX*bookmarks`
- LEFT JOIN `*PREFIX*bookmarks_tags` ON `*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
- WHERE
- `*PREFIX*bookmarks`.`user_id` = ?
- GROUP BY `id`, `url`, `title`
- '.$sqlFilterTag.'
- ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC',
- 10,$offset);
- } else {
- if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' )
- $concatFunction = '(url || title || ';
- else
- $concatFunction = 'Concat(Concat( url, title), ';
-
- $query = OCP\DB::prepare('
- SELECT `id`, `url`, `title`, '
- .($filterTagOnly?'':$concatFunction).
- 'CASE WHEN `*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
- THEN GROUP_CONCAT( `tag` ' .$_gc_separator. ' )
- ELSE \' \'
- END '
- .($filterTagOnly?'':')').'
- AS `tags`
- FROM `*PREFIX*bookmarks`
- LEFT JOIN `*PREFIX*bookmarks_tags` ON 1=1
- WHERE (`*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
- OR `*PREFIX*bookmarks`.`id` NOT IN (
- SELECT `*PREFIX*bookmarks_tags`.`bookmark_id` FROM `*PREFIX*bookmarks_tags`
- )
- )
- AND `*PREFIX*bookmarks`.`user_id` = ?
- GROUP BY `url`
- '.$sqlFilterTag.'
- ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC',
- 10, $offset);
- }
-
- $bookmarks = $query->execute($params)->fetchAll();
- return $bookmarks;
- }
-
- public static function deleteUrl($id)
- {
- $user = OCP\USER::getUser();
-
- $query = OCP\DB::prepare("
- SELECT `id` FROM `*PREFIX*bookmarks`
- WHERE `id` = ?
- AND `user_id` = ?
- ");
-
- $result = $query->execute(array($id, $user));
- $id = $result->fetchOne();
- if ($id === false) {
- return false;
- }
-
- $query = OCP\DB::prepare("
- DELETE FROM `*PREFIX*bookmarks`
- WHERE `id` = $id
- ");
-
- $result = $query->execute();
-
- $query = OCP\DB::prepare("
- DELETE FROM `*PREFIX*bookmarks_tags`
- WHERE `bookmark_id` = $id
- ");
-
- $result = $query->execute();
- return true;
- }
-}
diff --git a/apps/bookmarks/lib/search.php b/apps/bookmarks/lib/search.php
deleted file mode 100644
index 1e6a3ce910b..00000000000
--- a/apps/bookmarks/lib/search.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * ownCloud - bookmarks plugin
- *
- * @author David Iwanowitsch
- * @copyright 2012 David Iwanowitsch <david at unclouded dot de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-class OC_Search_Provider_Bookmarks extends OC_Search_Provider{
- function search($query){
- $results=array();
-
- $offset = 0;
- $sqlSortColumn = 'id';
-
- $searchquery=array();
- if(substr_count($query, ' ') > 0){
- $searchquery = explode(' ', $query);
- }else{
- $searchquery = $query;
- }
-
-// OCP\Util::writeLog('bookmarks', 'search ' .$query ,OCP\Util::DEBUG);
- $bookmarks = OC_Bookmarks_Bookmarks::findBookmarks($offset, $sqlSortColumn, $searchquery, false);
-// OCP\Util::writeLog('bookmarks', 'found ' .count($bookmarks) ,OCP\Util::DEBUG);
- //$l = new OC_l10n('bookmarks'); //resulttype can't be localized, javascript relies on that type
- foreach($bookmarks as $bookmark){
- $results[]=new OC_Search_Result($bookmark['title'],'', $bookmark['url'],'Bookm.');
- }
-
- return $results;
- }
-}
diff --git a/apps/bookmarks/settings.php b/apps/bookmarks/settings.php
deleted file mode 100644
index 6db36176330..00000000000
--- a/apps/bookmarks/settings.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-/**
- * Copyright (c) 2011 Marvin Thomas Rabe <mrabe@marvinrabe.de>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-$tmpl = new OCP\Template( 'bookmarks', 'settings');
-
-return $tmpl->fetchPage();
diff --git a/apps/bookmarks/templates/addBm.php b/apps/bookmarks/templates/addBm.php
deleted file mode 100644
index 357e0a18f25..00000000000
--- a/apps/bookmarks/templates/addBm.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Read later - ownCloud</title>
- </head>
- <body>
- <div class="message"><h1>Saved!</h1></div>
- <a href="javascript:self.close()" >Close the window</a>
- </body>
-</html> \ No newline at end of file
diff --git a/apps/bookmarks/templates/bookmarklet.php b/apps/bookmarks/templates/bookmarklet.php
deleted file mode 100644
index 1802814d4bb..00000000000
--- a/apps/bookmarks/templates/bookmarklet.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-function createBookmarklet() {
- $l = OC_L10N::get('bookmarks');
- echo '<small>' . $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:') . '</small>'
- . '<a class="button bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OCP\Util::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
- . $l->t('Read later') . '</a>';
-}
diff --git a/apps/bookmarks/templates/list.php b/apps/bookmarks/templates/list.php
deleted file mode 100644
index 4b84b438900..00000000000
--- a/apps/bookmarks/templates/list.php
+++ /dev/null
@@ -1,26 +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.
- */
-?>
-<input type="hidden" id="bookmarkFilterTag" value="<?php if(isset($_GET['tag'])) echo OCP\Util::sanitizeHTML($_GET['tag']); ?>" />
-<div id="controls">
- <input type="hidden" id="bookmark_add_id" value="0" />
- <input type="text" id="bookmark_add_url" placeholder="<?php echo $l->t('Address'); ?>" class="bookmarks_input" />
- <input type="text" id="bookmark_add_title" placeholder="<?php echo $l->t('Title'); ?>" class="bookmarks_input" />
- <input type="text" id="bookmark_add_tags" placeholder="<?php echo $l->t('Tags'); ?>" class="bookmarks_input" />
- <input type="submit" value="<?php echo $l->t('Save bookmark'); ?>" id="bookmark_add_submit" />
-</div>
-<div class="bookmarks_list">
-</div>
-<div id="firstrun" style="display: none;">
- <?php
- echo $l->t('You have no bookmarks');
- require_once(OC_App::getAppPath('bookmarks') .'/templates/bookmarklet.php');
- createBookmarklet();
- ?>
-</div>
diff --git a/apps/bookmarks/templates/settings.php b/apps/bookmarks/templates/settings.php
deleted file mode 100644
index 31edf7478bf..00000000000
--- a/apps/bookmarks/templates/settings.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * Copyright (c) 2011 Marvin Thomas Rabe <mrabe@marvinrabe.de>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-?>
-<form id="bookmarks">
- <fieldset class="personalblock">
- <span class="bold"><?php echo $l->t('Bookmarklet <br />');?></span>
- <?php
- require_once('bookmarklet.php');
- createBookmarklet();
- ?>
- </fieldset>
-</form>