diff --git a/ajax/addBookmark.php b/ajax/addBookmark.php index b4d0f33d..baf3a288 100644 --- a/ajax/addBookmark.php +++ b/ajax/addBookmark.php @@ -28,9 +28,10 @@ $RUNTIME_NOSETUPFS=true; // Check if we are a user OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('bookmarks'); OCP\JSON::callCheck(); -require_once(OC::$APPSROOT . '/apps/bookmarks/bookmarksHelper.php'); +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)); \ No newline at end of file +OCP\JSON::success(array('data' => $id)); diff --git a/ajax/delBookmark.php b/ajax/delBookmark.php index 140da2a3..26437ea0 100644 --- a/ajax/delBookmark.php +++ b/ajax/delBookmark.php @@ -21,13 +21,10 @@ * */ -//no apps or filesystem -$RUNTIME_NOSETUPFS=true; - - - // Check if we are a user OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); + OCP\JSON::checkAppEnabled('bookmarks'); OCP\JSON::callCheck(); diff --git a/ajax/editBookmark.php b/ajax/editBookmark.php index 8c1b19cf..617021e4 100644 --- a/ajax/editBookmark.php +++ b/ajax/editBookmark.php @@ -21,16 +21,12 @@ * */ -//no apps or filesystem -$RUNTIME_NOSETUPFS=true; - - - // Check if we are a user OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('bookmarks'); 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')"; diff --git a/ajax/recordClick.php b/ajax/recordClick.php index 332d5826..785056dc 100644 --- a/ajax/recordClick.php +++ b/ajax/recordClick.php @@ -21,11 +21,6 @@ * */ -//no apps or filesystem -$RUNTIME_NOSETUPFS=true; - - - // Check if we are a user OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('bookmarks'); diff --git a/ajax/updateList.php b/ajax/updateList.php index 4de2475d..cf9a2cf9 100644 --- a/ajax/updateList.php +++ b/ajax/updateList.php @@ -22,11 +22,6 @@ * */ -//no apps or filesystem -$RUNTIME_NOSETUPFS=true; - - - // Check if we are a user OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('bookmarks'); diff --git a/appinfo/app.php b/appinfo/app.php index 8a8f4438..f4bca9df 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -10,8 +10,6 @@ OC::$CLASSPATH['OC_Bookmarks_Bookmarks'] = 'apps/bookmarks/lib/bookmarks.php'; OC::$CLASSPATH['OC_Search_Provider_Bookmarks'] = 'apps/bookmarks/lib/search.php'; -OCP\App::register( array( 'order' => 70, 'id' => 'bookmark', 'name' => 'Bookmarks' )); - $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'))); diff --git a/bookmarksHelper.php b/bookmarksHelper.php index cb0ca06c..988042fc 100644 --- a/bookmarksHelper.php +++ b/bookmarksHelper.php @@ -90,7 +90,8 @@ function addBookmark($url, $title, $tags='') { if(empty($title)) { $metadata = getURLMetadata($url); - $title = $metadata['title']; + if(isset($metadata['title'])) // Check for problems fetching the title + $title = $metadata['title']; } if(empty($title)) { diff --git a/img/bookmarks.png b/img/bookmarks.png index b92e4f50..3e8eed23 100644 Binary files a/img/bookmarks.png and b/img/bookmarks.png differ diff --git a/l10n/bg_BG.php b/l10n/bg_BG.php new file mode 100644 index 00000000..04d731b1 --- /dev/null +++ b/l10n/bg_BG.php @@ -0,0 +1,12 @@ + "Отметки", +"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
" => "Бутон за отметки
" +); diff --git a/l10n/ca.php b/l10n/ca.php new file mode 100644 index 00000000..cf90d9a8 --- /dev/null +++ b/l10n/ca.php @@ -0,0 +1,12 @@ + "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
" => "Bookmarklet
" +); diff --git a/l10n/cs_CZ.php b/l10n/cs_CZ.php new file mode 100644 index 00000000..2251969a --- /dev/null +++ b/l10n/cs_CZ.php @@ -0,0 +1,12 @@ + "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
" => "Záložky
" +); diff --git a/l10n/de.php b/l10n/de.php new file mode 100644 index 00000000..14a54f1c --- /dev/null +++ b/l10n/de.php @@ -0,0 +1,12 @@ + "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
" => "Bookmarklet
" +); diff --git a/l10n/el.php b/l10n/el.php new file mode 100644 index 00000000..f282a1bb --- /dev/null +++ b/l10n/el.php @@ -0,0 +1,12 @@ + "Σελιδοδείκτες", +"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
" => "Εφαρμογίδιο Σελιδοδεικτών
" +); diff --git a/l10n/eo.php b/l10n/eo.php new file mode 100644 index 00000000..808cda8a --- /dev/null +++ b/l10n/eo.php @@ -0,0 +1,11 @@ + "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/l10n/es.php b/l10n/es.php new file mode 100644 index 00000000..071b0dda --- /dev/null +++ b/l10n/es.php @@ -0,0 +1,12 @@ + "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
" => "Bookmarklet
" +); diff --git a/l10n/et_EE.php b/l10n/et_EE.php new file mode 100644 index 00000000..da9e4d92 --- /dev/null +++ b/l10n/et_EE.php @@ -0,0 +1,10 @@ + "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/l10n/fa.php b/l10n/fa.php new file mode 100644 index 00000000..b46ce911 --- /dev/null +++ b/l10n/fa.php @@ -0,0 +1,8 @@ + "نشانک‌ها", +"unnamed" => "بدون‌نام", +"Address" => "آدرس", +"Title" => "عنوان", +"Save bookmark" => "ذخیره نشانک", +"You have no bookmarks" => "شما هیچ نشانکی ندارید" +); diff --git a/l10n/fi_FI.php b/l10n/fi_FI.php new file mode 100644 index 00000000..c8147474 --- /dev/null +++ b/l10n/fi_FI.php @@ -0,0 +1,12 @@ + "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
" => "Kirjanmerkitsin
" +); diff --git a/l10n/fr.php b/l10n/fr.php new file mode 100644 index 00000000..508c8236 --- /dev/null +++ b/l10n/fr.php @@ -0,0 +1,12 @@ + "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
" => "Gestionnaire de favoris
" +); diff --git a/l10n/it.php b/l10n/it.php new file mode 100644 index 00000000..862d75bd --- /dev/null +++ b/l10n/it.php @@ -0,0 +1,12 @@ + "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
" => "Bookmarklet
" +); diff --git a/l10n/lt_LT.php b/l10n/lt_LT.php new file mode 100644 index 00000000..58faddc2 --- /dev/null +++ b/l10n/lt_LT.php @@ -0,0 +1,3 @@ + "be pavadinimo" +); diff --git a/l10n/nb_NO.php b/l10n/nb_NO.php new file mode 100644 index 00000000..12e63887 --- /dev/null +++ b/l10n/nb_NO.php @@ -0,0 +1,11 @@ + "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" +); diff --git a/l10n/sl.php b/l10n/sl.php new file mode 100644 index 00000000..32a41629 --- /dev/null +++ b/l10n/sl.php @@ -0,0 +1,12 @@ + "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
" => "Bookmarklet
" +); diff --git a/l10n/sv.php b/l10n/sv.php new file mode 100644 index 00000000..689bd452 --- /dev/null +++ b/l10n/sv.php @@ -0,0 +1,12 @@ + "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
" => "Skriptbokmärke
" +); diff --git a/l10n/th_TH.php b/l10n/th_TH.php new file mode 100644 index 00000000..64a148ef --- /dev/null +++ b/l10n/th_TH.php @@ -0,0 +1,12 @@ + "รายการโปรด", +"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
" => "Bookmarklet
" +); diff --git a/lib/bookmarks.php b/lib/bookmarks.php index d569bf52..e1e13388 100644 --- a/lib/bookmarks.php +++ b/lib/bookmarks.php @@ -145,4 +145,3 @@ class OC_Bookmarks_Bookmarks{ return true; } } -?> diff --git a/templates/addBm.php b/templates/addBm.php index dbe673f5..357e0a18 100644 --- a/templates/addBm.php +++ b/templates/addBm.php @@ -3,9 +3,9 @@ Read later - ownCloud -

Saved!

+ Close the window \ No newline at end of file diff --git a/templates/list.php b/templates/list.php index fdd2b19f..4b84b438 100644 --- a/templates/list.php +++ b/templates/list.php @@ -7,7 +7,7 @@ * See the COPYING-README file. */ ?> - +
@@ -20,7 +20,7 @@