moved to apps repository

This commit is contained in:
Frank Karlitschek 2012-08-26 17:30:07 +02:00
parent 32bad688bd
commit 72e9a2ce57
1174 changed files with 0 additions and 297345 deletions

View File

@ -1,21 +0,0 @@
<?php
OC::$CLASSPATH['OC_Admin_Audit_Hooks_Handlers'] = 'apps/admin_audit/lib/hooks_handlers.php';
OCP\Util::connectHook('OCP\User', 'pre_login', 'OC_Admin_Audit_Hooks_Handlers', 'pre_login');
OCP\Util::connectHook('OCP\User', 'post_login', 'OC_Admin_Audit_Hooks_Handlers', 'post_login');
OCP\Util::connectHook('OCP\User', 'logout', 'OC_Admin_Audit_Hooks_Handlers', 'logout');
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_rename, 'OC_Admin_Audit_Hooks_Handlers', 'rename');
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_create, 'OC_Admin_Audit_Hooks_Handlers', 'create');
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_copy, 'OC_Admin_Audit_Hooks_Handlers', 'copy');
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_write, 'OC_Admin_Audit_Hooks_Handlers', 'write');
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_read, 'OC_Admin_Audit_Hooks_Handlers', 'read');
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_delete, 'OC_Admin_Audit_Hooks_Handlers', 'delete');
//FIXME OC_Share does no longer exist
/*
OCP\Util::connectHook('OC_Share', 'public', 'OC_Admin_Audit_Hooks_Handlers', 'share_public');
OCP\Util::connectHook('OC_Share', 'public-download', 'OC_Admin_Audit_Hooks_Handlers', 'share_public_download');
OCP\Util::connectHook('OC_Share', 'user', 'OC_Admin_Audit_Hooks_Handlers', 'share_user');
*/

View File

@ -1,11 +0,0 @@
<?xml version="1.0"?>
<info>
<id>admin_audit</id>
<name>Log audit info</name>
<version>0.1</version>
<licence>AGPL</licence>
<author>Bart Visscher</author>
<require>4</require>
<description>Audit user actions in Owncloud</description>
<shipped>true</shipped>
</info>

View File

@ -1,73 +0,0 @@
<?php
class OC_Admin_Audit_Hooks_Handlers {
static public function pre_login($params) {
$path = $params['uid'];
self::log('Trying login '.$user);
}
static public function post_login($params) {
$path = $params['uid'];
self::log('Login '.$user);
}
static public function logout($params) {
$user = OCP\User::getUser();
self::log('Logout '.$user);
}
static public function rename($params) {
$oldpath = $params[OC_Filesystem::signal_param_oldpath];
$newpath = $params[OC_Filesystem::signal_param_newpath];
$user = OCP\User::getUser();
self::log('Rename "'.$oldpath.'" to "'.$newpath.'" by '.$user);
}
static public function create($params) {
$path = $params[OC_Filesystem::signal_param_path];
$user = OCP\User::getUser();
self::log('Create "'.$path.'" by '.$user);
}
static public function copy($params) {
$oldpath = $params[OC_Filesystem::signal_param_oldpath];
$newpath = $params[OC_Filesystem::signal_param_newpath];
$user = OCP\User::getUser();
self::log('Copy "'.$oldpath.'" to "'.$newpath.'" by '.$user);
}
static public function write($params) {
$path = $params[OC_Filesystem::signal_param_path];
$user = OCP\User::getUser();
self::log('Write "'.$path.'" by '.$user);
}
static public function read($params) {
$path = $params[OC_Filesystem::signal_param_path];
$user = OCP\User::getUser();
self::log('Read "'.$path.'" by '.$user);
}
static public function delete($params) {
$path = $params[OC_Filesystem::signal_param_path];
$user = OCP\User::getUser();
self::log('Delete "'.$path.'" by '.$user);
}
static public function share_public($params) {
$path = $params['source'];
$token = $params['token'];
$user = OCP\User::getUser();
self::log('Shared "'.$path.'" with public, token="'.$token.'" by '.$user);
}
static public function share_public_download($params) {
$path = $params['source'];
$token = $params['token'];
$user = $_SERVER['REMOTE_ADDR'];
self::log('Download of shared "'.$path.'" token="'.$token.'" by '.$user);
}
static public function share_user($params) {
$path = $params['source'];
$permissions = $params['permissions'];
$with = $params['with'];
$user = OCP\User::getUser();
//$rw = $permissions & OC_Share::WRITE ? 'w' : 'o'; //FIXME OC_Share no longer exists, hack to check permissions
$rw = $permissions & 1 ? 'w' : 'o';
self::log('Shared "'.$path.'" (r'.$rw.') with user "'.$with.'" by '.$user);
}
static protected function log($msg) {
OCP\Util::writeLog('admin_audit', $msg, OCP\Util::INFO);
}
}

View File

@ -1,4 +0,0 @@
<?php
$l=OC_L10N::get('admin_dependencies_chk');
OCP\App::registerAdmin('admin_dependencies_chk','settings');

View File

@ -1,10 +0,0 @@
<?xml version="1.0"?>
<info>
<id>admin_dependencies_chk</id>
<name>ownCloud dependencies info</name>
<licence>AGPL</licence>
<author>Brice Maron (eMerzh)</author>
<require>4</require>
<shipped>true</shipped>
<description>Display OwnCloud's dependencies informations (missings modules, ...)</description>
</info>

View File

@ -1 +0,0 @@
0.01

View File

@ -1,9 +0,0 @@
#status_list legend { font-weight: bold; color: #888888; }
.state > li { margin-bottom: 3px; padding-left: 0.5em; list-style-type: circle; }
.state .state_module { font-weight:bold; text-shadow: 0 1px 0 #DDD; cursor:help;}
.state_used ul, .state_used li { display:inline; }
.state_ok .state_module { color: #009700; }
.state_warning .state_module { color: #FF9B29; }
.state_error .state_module { color: #FF3B3B; }

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "El mòdul php-json és necessari per moltes aplicacions per comunicacions internes",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "El mòdul php-curl és necessari per mostrar el títol de la pàgina quan s'afegeixen adreces d'interès",
"The php-gd module is needed to create thumbnails of your images" => "El mòdul php-gd és necessari per generar miniatures d'imatges",
"The php-ldap module is needed connect to your ldap server" => "El mòdul php-ldap és necessari per connectar amb el servidor ldap",
"The php-zip module is needed download multiple files at once" => "El mòdul php-zip és necessari per baixar múltiples fitxers de cop",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "El mòdul php-mb_multibyte és necessari per gestionar correctament la codificació.",
"The php-ctype module is needed validate data." => "El mòdul php-ctype és necessari per validar dades.",
"The php-xml module is needed to share files with webdav." => "El mòdul php-xml és necessari per compatir els fitxers amb webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "La directiva allow_url_fopen de php.ini hauria d'establir-se en 1 per accedir a la base de coneixements dels servidors OCS",
"The php-pdo module is needed to store owncloud data into a database." => "El mòdul php-pdo és necessari per desar les dades d'ownCloud en una base de dades.",
"Dependencies status" => "Estat de dependències",
"Used by :" => "Usat per:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Modul php-json je třeba pro vzájemnou komunikaci mnoha aplikací",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Modul php-curl je třeba pro zobrazení titulu strany v okamžiku přidání záložky",
"The php-gd module is needed to create thumbnails of your images" => "Modul php-gd je třeba pro tvorbu náhledů Vašich obrázků",
"The php-ldap module is needed connect to your ldap server" => "Modul php-ldap je třeba pro připojení na Váš ldap server",
"The php-zip module is needed download multiple files at once" => "Modul php-zip je třeba pro souběžné stahování souborů",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Modul php-mb_multibyte je třeba pro správnou funkci kódování.",
"The php-ctype module is needed validate data." => "Modul php-ctype je třeba k ověřování dat.",
"The php-xml module is needed to share files with webdav." => "Modul php-xml je třeba ke sdílení souborů prostřednictvím WebDAV.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Příkaz allow_url_fopen ve Vašem php.ini souboru by měl být nastaven na 1 kvůli získávání informací z OCS serverů",
"The php-pdo module is needed to store owncloud data into a database." => "Modul php-pdo je třeba pro ukládání dat ownCloud do databáze",
"Dependencies status" => "Status závislostí",
"Used by :" => "Používáno:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Das Modul php-json wird von vielen Anwendungen zur internen Kommunikation benötigt.",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Das Modul php-curl wird benötigt, um den Titel der Seite für die Lesezeichen hinzuzufügen.",
"The php-gd module is needed to create thumbnails of your images" => "Das Modul php-gd wird für die Erzeugung der Vorschaubilder benötigt.",
"The php-ldap module is needed connect to your ldap server" => "Das Modul php-ldap wird für die Verbindung mit dem LDAP-Server benötigt.",
"The php-zip module is needed download multiple files at once" => "Das Modul php-zip wird für den gleichzeitigen Download mehrerer Dateien benötigt.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Das Modul php_mb_multibyte wird benötigt, um das Encoding richtig zu handhaben.",
"The php-ctype module is needed validate data." => "Das Modul php-ctype wird benötigt, um Daten zu prüfen.",
"The php-xml module is needed to share files with webdav." => "Das Modul php-xml wird benötigt, um Dateien über WebDAV zu teilen.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Die Richtlinie allow_url_fopen in Ihrer php.ini sollte auf 1 gesetzt werden, um die Wissensbasis vom OCS-Server abrufen.",
"The php-pdo module is needed to store owncloud data into a database." => "Das Modul php-pdo wird benötigt, um Daten in der Datenbank zu speichern.",
"Dependencies status" => "Status der Abhängigkeiten",
"Used by :" => "Benutzt von:"
);

View File

@ -1,4 +0,0 @@
<?php $TRANSLATIONS = array(
"Dependencies status" => "Κατάσταση εξαρτήσεων",
"Used by :" => "Χρησιμοποιήθηκε από:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "La modulo php-json necesas por komuniko inter la multaj aplikaĵoj",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "La modulo php-curl necesas por venigi la paĝotitolon dum aldono de legosigno",
"The php-gd module is needed to create thumbnails of your images" => "La modulo php-gd necesas por krei bildetojn.",
"The php-ldap module is needed connect to your ldap server" => "La modulo php-ldap necesas por konekti al via LDAP-servilo.",
"The php-zip module is needed download multiple files at once" => "La modulo php-zip necesas por elŝuti plurajn dosierojn per unu fojo.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "La modulo php-mb_multibyte necesas por ĝuste administri la kodprezenton.",
"The php-ctype module is needed validate data." => "La modulo php-ctype necesas por validkontroli datumojn.",
"The php-xml module is needed to share files with webdav." => "La modulo php-xml necesas por kunhavigi dosierojn per WebDAV.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "La ordono allow_url_fopen de via php.ini devus valori 1 por ricevi scibazon el OCS-serviloj",
"The php-pdo module is needed to store owncloud data into a database." => "La modulo php-pdo necesas por konservi datumojn de ownCloud en datumbazo.",
"Dependencies status" => "Stato de dependoj",
"Used by :" => "Uzata de:"
);

View File

@ -1,4 +0,0 @@
<?php $TRANSLATIONS = array(
"Dependencies status" => "Estado de las dependencias",
"Used by :" => "Usado por:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "php-json moodul on vajalik paljude rakenduse poolt omvahelise suhtlemise jaoks",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "php-curl moodul on vajalik lehe pealkirja tõmbamiseks järjehoidja lisamisel",
"The php-gd module is needed to create thumbnails of your images" => "php-gd moodul on vajalik sinu piltidest pisipiltide loomiseks",
"The php-ldap module is needed connect to your ldap server" => "php-ldap moodul on vajalik sinu ldap serveriga ühendumiseks",
"The php-zip module is needed download multiple files at once" => "php-zip moodul on vajalik mitme faili korraga alla laadimiseks",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "php-mb_multibyte moodul on vajalik kodeerimise korrektseks haldamiseks.",
"The php-ctype module is needed validate data." => "php-ctype moodul on vajalik andmete kontrollimiseks.",
"The php-xml module is needed to share files with webdav." => "php-xml moodul on vajalik failide jagamiseks webdav-iga.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Sinu php.ini failis oleva direktiivi allow_url_fopen väärtuseks peaks määrama 1, et saaks tõmmata teadmistebaasi OCS-i serveritest",
"The php-pdo module is needed to store owncloud data into a database." => "php-pdo moodul on vajalik owncloudi andmete salvestamiseks andmebaasi.",
"Dependencies status" => "Sõltuvuse staatus",
"Used by :" => "Kasutab :"
);

View File

@ -1,9 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-gd module is needed to create thumbnails of your images" => "php-gd-moduuli vaaditaan, jotta kuvista on mahdollista luoda esikatselukuvia",
"The php-ldap module is needed connect to your ldap server" => "php-ldap-moduuli vaaditaan, jotta yhteys ldap-palvelimeen on mahdollista",
"The php-zip module is needed download multiple files at once" => "php-zip-moduuli vaaditaan, jotta useiden tiedostojen samanaikainen lataus on mahdollista",
"The php-xml module is needed to share files with webdav." => "php-xml-moduuli vaaditaan, jotta tiedostojen jako webdavia käyttäen on mahdollista",
"The php-pdo module is needed to store owncloud data into a database." => "php-pdo-moduuli tarvitaan, jotta ownCloud-tietojen tallennus tietokantaan on mahdollista",
"Dependencies status" => "Riippuvuuksien tila",
"Used by :" => "Käyttökohde:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Le module php-json est requis pour l'inter-communication de nombreux modules.",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Le module php-curl est requis afin de rapatrier le titre des pages lorsque vous ajoutez un marque-pages.",
"The php-gd module is needed to create thumbnails of your images" => "Le module php-gd est requis afin de permettre la création d'aperçus pour vos images.",
"The php-ldap module is needed connect to your ldap server" => "Le module php-ldap est requis afin de permettre la connexion à votre serveur ldap.",
"The php-zip module is needed download multiple files at once" => "Le module php-zip est requis pour le téléchargement simultané de plusieurs fichiers.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Le module php-mb_multibyte est requis pour une gestion correcte des encodages.",
"The php-ctype module is needed validate data." => "Le module php-ctype est requis pour la validation des données.",
"The php-xml module is needed to share files with webdav." => "Le module php-xml est requis pour le partage de fichiers via webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "La directive allow_url_fopen de votre fichier php.ini doit être à la valeur 1 afin de permettre le rapatriement de la base de connaissance depuis les serveurs OCS.",
"The php-pdo module is needed to store owncloud data into a database." => "le module php-pdo est requis pour le stockage des données ownCloud en base de données.",
"Dependencies status" => "Statut des dépendances",
"Used by :" => "Utilisé par :"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Il modulo php-json è richiesto per l'intercomunicazione di diverse applicazioni",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Il modulo php-curl è richiesto per scaricare il titolo della pagina quando si aggiunge un segnalibro",
"The php-gd module is needed to create thumbnails of your images" => "Il modulo php-gd è richiesto per creare miniature delle tue immagini",
"The php-ldap module is needed connect to your ldap server" => "Il modulo php-ldap è richiesto per collegarsi a un server ldap",
"The php-zip module is needed download multiple files at once" => "Il modulo php-zip è richiesto per scaricare diversi file contemporaneamente",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Il modulo php-mb_multibyte è richiesto per gestire correttamente la codifica.",
"The php-ctype module is needed validate data." => "Il modulo php-ctype è richiesto per la validazione dei dati.",
"The php-xml module is needed to share files with webdav." => "Il modulo php-xml è richiesto per condividere i file con webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "La direttiva allow_url_fopen del tuo php.ini deve essere impostata a 1 per recuperare la base di conoscenza dai server di OCS",
"The php-pdo module is needed to store owncloud data into a database." => "Il modulo php-pdo è richiesto per archiviare i dati di ownCloud in un database.",
"Dependencies status" => "Stato delle dipendenze",
"Used by :" => "Usato da:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "php-jsonモジュールはアプリケーション間の内部通信に必要です",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "php-curlモジュールはブックマーク追加時のページタイトル取得に必要です",
"The php-gd module is needed to create thumbnails of your images" => "php-gdモジュールはサムネイル画像の生成に必要です",
"The php-ldap module is needed connect to your ldap server" => "php-ldapモジュールはLDAPサーバへの接続に必要です",
"The php-zip module is needed download multiple files at once" => "php-zipモジュールは複数ファイルの同時ダウンロードに必要です",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "php-mb_multibyteモジュールはエンコードを正しく扱うために必要です",
"The php-ctype module is needed validate data." => "php-ctypeモジュールはデータのバリデーションに必要です",
"The php-xml module is needed to share files with webdav." => "php-xmlモジュールはWebDAVでのファイル共有に必要です",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "php.iniのallow_url_fopenはOCSサーバから知識ベースを取得するために1に設定しなくてはなりません",
"The php-pdo module is needed to store owncloud data into a database." => "php-pdoモジュールはデータベースにownCloudのデータを格納するために必要です",
"Dependencies status" => "依存関係の状況",
"Used by :" => "利用先 :"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Php-json modulis yra reikalingas duomenų keitimuisi tarp programų",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Php-curl modulis automatiškai nuskaito tinklapio pavadinimą kuomet išsaugoma žymelė.",
"The php-gd module is needed to create thumbnails of your images" => "Php-gd modulis yra naudojamas paveikslėlių miniatiūroms kurti.",
"The php-ldap module is needed connect to your ldap server" => "Php-ldap modulis yra reikalingas prisijungimui prie jūsų ldap serverio",
"The php-zip module is needed download multiple files at once" => "Php-zip modulis yra reikalingas kelių failų atsiuntimui iš karto.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Php-mb_multibyte modulis yra naudojamas apdoroti įvairius teksto kodavimo formatus.",
"The php-ctype module is needed validate data." => "Php-ctype modulis yra reikalingas duomenų tikrinimui.",
"The php-xml module is needed to share files with webdav." => "Php-xml modulis yra reikalingas failų dalinimuisi naudojant webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "allow_url_fopen direktyva turėtų būti nustatyta į \"1\" jei norite automatiškai gauti žinių bazės informaciją iš OCS serverių.",
"The php-pdo module is needed to store owncloud data into a database." => "Php-pdo modulis yra reikalingas duomenų saugojimui į owncloud duomenų bazę.",
"Dependencies status" => "Priklausomybės",
"Used by :" => "Naudojama:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Modulen php-jason blir benyttet til inter kommunikasjon",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Modulen php-curl blir brukt til å hente sidetittelen når bokmerke blir lagt til",
"The php-gd module is needed to create thumbnails of your images" => "Modulen php-gd blir benyttet til å lage miniatyr av bildene dine",
"The php-ldap module is needed connect to your ldap server" => "Modulen php-ldap benyttes for å koble til din ldapserver",
"The php-zip module is needed download multiple files at once" => "Modulen php-zup benyttes til å laste ned flere filer på en gang.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Modulen php-mb_multibyte benyttes til å håndtere korrekt tegnkoding.",
"The php-ctype module is needed validate data." => "Modulen php-ctype benyttes til å validere data.",
"The php-xml module is needed to share files with webdav." => "Modulen php-xml benyttes til å dele filer med webdav",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Direktivet allow_url_fopen i php.ini bør settes til 1 for å kunne hente kunnskapsbasen fra OCS-servere",
"The php-pdo module is needed to store owncloud data into a database." => "Modulen php-pdo benyttes til å lagre ownCloud data i en database.",
"Dependencies status" => "Avhengighetsstatus",
"Used by :" => "Benyttes av:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Moduł php-json jest wymagane przez wiele aplikacji do wewnętrznej łączności",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Modude php-curl jest wymagany do pobrania tytułu strony podczas dodawania zakładki",
"The php-gd module is needed to create thumbnails of your images" => "Moduł php-gd jest wymagany do tworzenia miniatury obrazów",
"The php-ldap module is needed connect to your ldap server" => "Moduł php-ldap jest wymagany aby połączyć się z serwerem ldap",
"The php-zip module is needed download multiple files at once" => "Moduł php-zip jest wymagany aby pobrać wiele plików na raz",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Moduł php-mb_multibyte jest wymagany do poprawnego zarządzania kodowaniem.",
"The php-ctype module is needed validate data." => "Moduł php-ctype jest wymagany do sprawdzania poprawności danych.",
"The php-xml module is needed to share files with webdav." => "Moduł php-xml jest wymagany do udostępniania plików przy użyciu protokołu webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Dyrektywy allow_url_fopen użytkownika php.ini powinna być ustawiona na 1 do pobierania bazy wiedzy z serwerów OCS",
"The php-pdo module is needed to store owncloud data into a database." => "Moduł php-pdo jest wymagany do przechowywania danych owncloud w bazie danych.",
"Dependencies status" => "Stan zależności",
"Used by :" => "Używane przez:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Модуль php-json необходим многим приложениям для внутренних связей",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Модуль php-curl необходим для получения заголовка страницы при добавлении закладок",
"The php-gd module is needed to create thumbnails of your images" => "Модуль php-gd необходим для создания уменьшенной копии для предпросмотра ваших картинок.",
"The php-ldap module is needed connect to your ldap server" => "Модуль php-ldap необходим для соединения с вашим ldap сервером",
"The php-zip module is needed download multiple files at once" => "Модуль php-zip необходим для загрузки нескольких файлов за раз",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Модуль php-mb_multibyte необходим для корректного управления кодировками.",
"The php-ctype module is needed validate data." => "Модуль php-ctype необходим для проверки данных.",
"The php-xml module is needed to share files with webdav." => "Модуль php-xml необходим для открытия файлов через webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Директива allow_url_fopen в файле php.ini должна быть установлена в 1 для получения базы знаний с серверов OCS",
"The php-pdo module is needed to store owncloud data into a database." => "Модуль php-pdo необходим для хранения данных ownСloud в базе данных.",
"Dependencies status" => "Статус зависимостей",
"Used by :" => "Используется:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Modul php-json je potreben za medsebojno komunikacijo veliko aplikacij.",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Modul php-curl je potreben za pridobivanje naslova strani pri dodajanju zaznamkov.",
"The php-gd module is needed to create thumbnails of your images" => "Modul php-gd je potreben za ustvarjanje sličic za predogled.",
"The php-ldap module is needed connect to your ldap server" => "Modul php-ldap je potreben za povezavo z vašim ldap strežnikom.",
"The php-zip module is needed download multiple files at once" => "Modul php-zip je potreben za prenašanje večih datotek hkrati.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Modul php-mb_multibyte je potreben za pravilno upravljanje kodiranja.",
"The php-ctype module is needed validate data." => "Modul php-ctype je potreben za preverjanje veljavnosti podatkov.",
"The php-xml module is needed to share files with webdav." => "Modul php-xml je potreben za izmenjavo datotek preko protokola WebDAV.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Direktiva allow_url_fopen v vaši php.ini datoteki mora biti nastavljena na 1, če želite omogočiti dostop do zbirke znanja na strežnikih OCS.",
"The php-pdo module is needed to store owncloud data into a database." => "Modul php-pdo je potreben za shranjevanje ownCloud podatkov v podatkovno zbirko.",
"Dependencies status" => "Stanje odvisnosti",
"Used by :" => "Uporablja:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "Modulen php-json behövs av många applikationer som interagerar.",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "Modulen php-curl behövs för att hämta sidans titel när du lägger till bokmärken.",
"The php-gd module is needed to create thumbnails of your images" => "Modulen php-gd behövs för att skapa miniatyrer av dina bilder.",
"The php-ldap module is needed connect to your ldap server" => "Modulen php-ldap behövs för att ansluta mot din ldapserver.",
"The php-zip module is needed download multiple files at once" => "Modulen php-zip behövs för att kunna ladda ner flera filer på en gång.",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "Modulen php-mb_multibyte behövs för att hantera korrekt teckenkodning.",
"The php-ctype module is needed validate data." => "Modulen php-ctype behövs för att validera data.",
"The php-xml module is needed to share files with webdav." => "Modulen php-xml behövs för att kunna dela filer med webdav.",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "Direktivet allow_url_fopen i php.ini bör sättas till 1 för att kunna hämta kunskapsbasen från OCS-servrar.",
"The php-pdo module is needed to store owncloud data into a database." => "Modulen php-pdo behövs för att kunna lagra ownCloud data i en databas.",
"Dependencies status" => "Beroenden status",
"Used by :" => "Används av:"
);

View File

@ -1,14 +0,0 @@
<?php $TRANSLATIONS = array(
"The php-json module is needed by the many applications for inter communications" => "โมดูล php-json จำเป็นต้องใช้สำหรับแอพพลิเคชั่นหลายๆตัวเพื่อการเชื่อมต่อสากล",
"The php-curl modude is needed to fetch the page title when adding a bookmarks" => "โมดูล php-curl จำเป็นต้องใช้สำหรับดึงข้อมูลชื่อหัวเว็บเมื่อเพิ่มเข้าไปยังรายการโปรด",
"The php-gd module is needed to create thumbnails of your images" => "โมดูล php-gd จำเป็นต้องใช้สำหรับสร้างรูปภาพขนาดย่อของรูปภาพของคุณ",
"The php-ldap module is needed connect to your ldap server" => "โมดูล php-ldap จำเป็นต้องใช้สำหรับการเชื่อมต่อกับเซิร์ฟเวอร์ ldap ของคุณ",
"The php-zip module is needed download multiple files at once" => "โมดูล php-zip จำเป็นต้องใช้สำหรับดาวน์โหลดไฟล์พร้อมกันหลายๆไฟล์ในครั้งเดียว",
"The php-mb_multibyte module is needed to manage correctly the encoding." => "โมดูล php-mb_multibyte จำเป็นต้องใช้สำหรับการจัดการการแปลงรหัสไฟล์อย่างถูกต้อง",
"The php-ctype module is needed validate data." => "โมดูล php-ctype จำเป็นต้องใช้สำหรับตรวจสอบความถูกต้องของข้อมูล",
"The php-xml module is needed to share files with webdav." => "โมดูล php-xml จำเป็นต้องใช้สำหรับแชร์ไฟล์ด้วย webdav",
"The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers" => "คำสั่ง allow_url_fopen ที่อยู่ในไฟล์ php.ini ของคุณ ควรกำหนดเป็น 1 เพื่อดึงข้อมูลของฐานความรู้ต่างๆจากเซิร์ฟเวอร์ของ OCS",
"The php-pdo module is needed to store owncloud data into a database." => "โมดูล php-pdo จำเป็นต้องใช้สำหรับจัดเก็บข้อมูลใน owncloud เข้าไปไว้ยังฐานข้อมูล",
"Dependencies status" => "สถานะการอ้างอิง",
"Used by :" => "ใช้งานโดย:"
);

View File

@ -1,102 +0,0 @@
<?php
/**
* ownCloud - user_ldap
*
* @author Brice Maron
* @copyright 2011 Brice Maron brice __from__ bmaron _DOT_ net
*
* 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/>.
*
*/
$l=OC_L10N::get('admin_dependencies_chk');
$tmpl = new OCP\Template( 'admin_dependencies_chk', 'settings');
$modules = array();
//Possible status are : ok, error, warning
$modules[] =array(
'status' => function_exists('json_encode') ? 'ok' : 'error',
'part'=> 'php-json',
'modules'=> array('core'),
'message'=> $l->t('The php-json module is needed by the many applications for inter communications'));
$modules[] =array(
'status' => function_exists('curl_init') ? 'ok' : 'error',
'part'=> 'php-curl',
'modules'=> array('bookmarks'),
'message'=> $l->t('The php-curl modude is needed to fetch the page title when adding a bookmarks'));
$modules[] =array(
'status' => function_exists('imagepng') ? 'ok' : 'error',
'part'=> 'php-gd',
'modules'=> array('gallery'),
'message'=> $l->t('The php-gd module is needed to create thumbnails of your images'));
$modules[] =array(
'status' => function_exists("ldap_bind") ? 'ok' : 'error',
'part'=> 'php-ldap',
'modules'=> array('user_ldap'),
'message'=> $l->t('The php-ldap module is needed connect to your ldap server'));
$modules[] =array(
'status' => class_exists('ZipArchive') ? 'ok' : 'warning',
'part'=> 'php-zip',
'modules'=> array('admin_export','core'),
'message'=> $l->t('The php-zip module is needed download multiple files at once'));
$modules[] =array(
'status' => function_exists('mb_detect_encoding') ? 'ok' : 'error',
'part'=> 'php-mb_multibyte ',
'modules'=> array('core'),
'message'=> $l->t('The php-mb_multibyte module is needed to manage correctly the encoding.'));
$modules[] =array(
'status' => function_exists('ctype_digit') ? 'ok' : 'error',
'part'=> 'php-ctype',
'modules'=> array('core'),
'message'=> $l->t('The php-ctype module is needed validate data.'));
$modules[] =array(
'status' => class_exists('DOMDocument') ? 'ok' : 'error',
'part'=> 'php-xml',
'modules'=> array('core'),
'message'=> $l->t('The php-xml module is needed to share files with webdav.'));
$modules[] =array(
'status' => ini_get('allow_url_fopen') == '1' ? 'ok' : 'error',
'part'=> 'allow_url_fopen',
'modules'=> array('core'),
'message'=> $l->t('The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers'));
$modules[] =array(
'status' => class_exists('PDO') ? 'ok' : 'warning',
'part'=> 'php-pdo',
'modules'=> array('core'),
'message'=> $l->t('The php-pdo module is needed to store owncloud data into a database.'));
foreach($modules as $key => $module) {
$enabled = false ;
foreach($module['modules'] as $app) {
if(OCP\App::isEnabled($app) || $app=='core'){
$enabled = true;
}
}
if($enabled == false) unset($modules[$key]);
}
OCP\UTIL::addStyle('admin_dependencies_chk', 'style');
$tmpl->assign( 'items', $modules );
return $tmpl->fetchPage();

View File

@ -1,16 +0,0 @@
<fieldset id="status_list" class="personalblock">
<legend><?php echo $l->t('Dependencies status');?></legend>
<ul class="state">
<?php foreach($_['items'] as $item):?>
<li class="state_<?php echo $item['status'];?>">
<span class="state_module" title="<?php echo $item['message'];?>"><?php echo $item['part'];?></span>
<div class="state_used"><?php echo $l->t('Used by :');?>
<ul>
<?php foreach($item['modules'] as $module):?>
<li><?php echo $module;?></li>
<?php endforeach;?>
</ul>
</li>
<?php endforeach;?>
</ul>
</fieldset>

View File

@ -1,33 +0,0 @@
<?php
/**
* ownCloud - admin_migrate
*
* @author Tom Needham
* @copyright 2012 Tom Needham tom@owncloud.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 Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OCP\App::registerAdmin('admin_migrate','settings');
// add settings page to navigation
$entry = array(
'id' => "admin_migrate_settings",
'order'=>1,
'href' => OCP\Util::linkTo( "admin_migrate", "settings.php" ),
'name' => 'Export'
);

View File

@ -1,11 +0,0 @@
<?xml version="1.0"?>
<info>
<id>admin_migrate</id>
<name>ownCloud Instance Migration</name>
<description>Import/Export your owncloud instance</description>
<licence>AGPL</licence>
<author>Thomas Schmidt and Tom Needham</author>
<require>4</require>
<shipped>true</shipped>
<default_enable/>
</info>

View File

@ -1 +0,0 @@
0.1

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Exporta aquesta instància de ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Això crearà un fitxer comprimit amb les dades d'aquesta instància ownCloud.\n Escolliu el tipus d'exportació:",
"Export" => "Exporta"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Export této instance ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Bude vytvořen komprimovaný soubor obsahující data této instance ownCloud.⏎ Zvolte typ exportu:",
"Export" => "Export"
);

View File

@ -1,4 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Eksporter ownCloud instans",
"Export" => "Eksporter"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Diese ownCloud-Instanz exportieren.",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Dies wird eine komprimierte Datei erzeugen, welche die Daten dieser ownCloud-Instanz enthält.\n Bitte wählen Sie den Exporttyp:",
"Export" => "Exportieren"
);

View File

@ -1,4 +0,0 @@
<?php $TRANSLATIONS = array(
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Αυτό θα δημιουργήσει ένα συμπιεσμένο αρχείο που θα περιέχει τα δεδομένα από αυτό το ownCloud.\n Παρακαλώ επιλέξτε τον τύπο εξαγωγής:",
"Export" => "Εξαγωγή"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Malenporti ĉi tiun aperon de ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Ĉi tio kreos densigitan dosieron, kiu enhavos la datumojn de ĉi tiu apero de ownCloud.\nBonvolu elekti la tipon de malenportado:",
"Export" => "Malenporti"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Exportar esta instancia de ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Se creará un archivo comprimido que contendrá los datos de esta instancia de owncloud.\n Por favor elegir el tipo de exportación:",
"Export" => "Exportar"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Ekspordi see ownCloudi paigaldus",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "See loob pakitud faili, milles on sinu owncloudi paigalduse andmed.\n Palun vali eksporditava faili tüüp:",
"Export" => "Ekspordi"
);

View File

@ -1,4 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Vie tämä ownCloud-istanssi",
"Export" => "Vie"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Exporter cette instance ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Ceci va créer une archive compressée contenant les données de cette instance ownCloud.\n Veuillez choisir le type d'export :",
"Export" => "Exporter"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Exporta esta instancia de ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Esto creará un ficheiro comprimido que contén os datos de esta instancia de ownCloud.\nPor favor escolla o modo de exportación:",
"Export" => "Exportar"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Esporta questa istanza di ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Questa operazione creerà un file compresso che contiene i dati dell'istanza di ownCloud. Scegli il tipo di esportazione:",
"Export" => "Esporta"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "ownCloudをエクスポート",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "このownCloudのデータを含む圧縮ファイルを生成します。\nエクスポートの種類を選択してください:",
"Export" => "エクスポート"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Eksportuoti šią ownCloud instaliaciją",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Bus sukurtas archyvas su visais owncloud duomenimis ir failais.\n Pasirinkite eksportavimo tipą:",
"Export" => "Eksportuoti"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Eksporter denne ownCloud forekomsten",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Dette vil opprette en komprimert fil som inneholder dataene fra denne ownCloud forekomsten.⏎ Vennligst velg eksporttype:",
"Export" => "Eksport"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Exporteer deze ownCloud instantie",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Dit maakt een gecomprimeerd bestand, met de inhoud van deze ownCloud instantie. Kies het export type:",
"Export" => "Exporteer"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Eksportuj instancję ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Spowoduje to utworzenie pliku skompresowanego, który zawiera dane tej instancji ownCloud.⏎ proszę wybrać typ eksportu:",
"Export" => "Eksport"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Экспортировать этот экземпляр ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Будет создан сжатый файл, содержащий данные этого экземпляра owncloud.\n Выберите тип экспорта:",
"Export" => "Экспорт"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Izvozi to ownCloud namestitev",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Ustvarjena bo stisnjena datoteka s podatki te ownCloud namestitve.\n Prosimo, če izberete vrsto izvoza:",
"Export" => "Izvozi"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "Exportera denna instans av ownCloud",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "Detta kommer att skapa en komprimerad fil som innehåller all data från denna instans av ownCloud.\n Välj exporttyp:",
"Export" => "Exportera"
);

View File

@ -1,5 +0,0 @@
<?php $TRANSLATIONS = array(
"Export this ownCloud instance" => "ส่งออกข้อมูลค่าสมมุติของ ownCloud นี้",
"This will create a compressed file that contains the data of this owncloud instance.\n Please choose the export type:" => "ส่วนนี้จะเป็นการสร้างไฟล์บีบอัดที่บรรจุข้อมูลค่าสมมุติของ ownCloud.\n กรุณาเลือกชนิดของการส่งออกข้อมูล:",
"Export" => "ส่งออก"
);

View File

@ -1,57 +0,0 @@
<?php
/**
* ownCloud - admin_migrate
*
* @author Thomas Schmidt
* @copyright 2011 Thomas Schmidt tom@opensuse.org
* @author Tom Needham
* @copyright 2012 Tom Needham tom@owncloud.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 Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OCP\User::checkAdminUser();
OCP\App::checkAppEnabled('admin_migrate');
// Export?
if (isset($_POST['admin_export'])) {
// Create the export zip
$response = json_decode( OC_Migrate::export( null, $_POST['export_type'] ) );
if( !$response->success ){
// Error
die('error');
} else {
$path = $response->data;
// Download it
header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=" . basename($path));
header("Content-Length: " . filesize($path));
@ob_end_clean();
readfile( $path );
unlink( $path );
}
// Import?
} else if( isset($_POST['admin_import']) ){
$from = $_FILES['owncloud_import']['tmp_name'];
if( !OC_Migrate::import( $from, 'instance' ) ){
die('failed');
}
} else {
// fill template
$tmpl = new OCP\Template('admin_migrate', 'settings');
return $tmpl->fetchPage();
}

View File

@ -1,31 +0,0 @@
<form id="export" action="#" method="post">
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Export this ownCloud instance');?></strong></legend>
<p><?php echo $l->t('This will create a compressed file that contains the data of this owncloud instance.
Please choose the export type:');?>
</p>
<h3>What would you like to export?</h3>
<p>
<input type="radio" name="export_type" value="instance" style="width:20px;" /> ownCloud instance (suitable for import )<br />
<input type="radio" name="export_type" value="system" style="width:20px;" /> ownCloud system files<br />
<input type="radio" name="export_type" value="userfiles" style="width:20px;" /> Just user files<br />
<input type="submit" name="admin_export" value="<?php echo $l->t('Export'); ?>" />
</fieldset>
</form>
<?php
/*
* EXPERIMENTAL
?>
<form id="import" action="#" method="post" enctype="multipart/form-data">
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Import an ownCloud instance. THIS WILL DELETE ALL CURRENT OWNCLOUD DATA');?></strong></legend>
<p><?php echo $l->t('All current ownCloud data will be replaced by the ownCloud instance that is uploaded.');?>
</p>
<p><input type="file" id="owncloud_import" name="owncloud_import"><label for="owncloud_import"><?php echo $l->t('ownCloud Export Zip File');?></label>
</p>
<input type="submit" name="admin_import" value="<?php echo $l->t('Import'); ?>" />
</fieldset>
</form>
<?php
*/
?>

View File

@ -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';

View File

@ -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));

View File

@ -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();

View File

@ -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);
}

View File

@ -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" );

View File

@ -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));

View File

@ -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');

View File

@ -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>

View File

@ -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>

View File

@ -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' );

View File

@ -1 +0,0 @@
0.2

View File

@ -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;
}
}

View File

@ -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;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

View File

@ -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();

View File

@ -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();
}
});
}

View File

@ -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);
}

View File

@ -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')),
});
}

View File

@ -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 />"
);

View File

@ -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 />"
);

View File

@ -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 />"
);

View File

@ -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 />"
);

View File

@ -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 />"
);

View File

@ -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"
);

View File

@ -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 />"
);

View File

@ -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"
);

View File

@ -1,8 +0,0 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "نشانک‌ها",
"unnamed" => "بدون‌نام",
"Address" => "آدرس",
"Title" => "عنوان",
"Save bookmark" => "ذخیره نشانک",
"You have no bookmarks" => "شما هیچ نشانکی ندارید"
);

View File

@ -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 />"
);

View File

@ -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 />"
);

View File

@ -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 />"
);

View File

@ -1,3 +0,0 @@
<?php $TRANSLATIONS = array(
"unnamed" => "be pavadinimo"
);

View File

@ -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 />"
);

View File

@ -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"
);

View File

@ -1,11 +0,0 @@
<?php $TRANSLATIONS = array(
"Bookmarks" => "Закладки",
"unnamed" => "без имени",
"Read later" => "Прочитать позже",
"Address" => "Адрес",
"Title" => "Заголовок",
"Tags" => "Метки",
"Save bookmark" => "Сохранить закладки",
"You have no bookmarks" => "У вас нет закладок",
"Bookmarklet <br />" => "Букмарклет <br />"
);

View File

@ -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 />"
);

View File

@ -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 />"
);

View File

@ -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 />"
);

View File

@ -1,5 +0,0 @@
../appinfo/app.php
../lib/search.php
../templates/settings.php
../templates/addBm.php
../templates/list.php

View File

@ -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 />" => "书签应用"
);

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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();

View File

@ -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>

View File

@ -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>';
}

View File

@ -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>

Some files were not shown because too many files have changed in this diff Show More