diff options
| author | 2018-03-04 15:26:24 +0100 | |
|---|---|---|
| committer | 2018-03-04 15:26:24 +0100 | |
| commit | f0fd273199682881b805e968ca36df4ccdbfa7a1 (patch) | |
| tree | 0f87fcc515fb493193f9c58a9a0ed19f4caf07e8 /app | |
| parent | 5ebeb9e3e5d46195a83211140c1d28d58be19b2a (diff) | |
| parent | a37b95f6779e6e2035f0efb72cf5144e7fad2ea3 (diff) | |
Merge pull request #1810 from FreshRSS/dev1.10.1
FreshRSS 1.10.1
Diffstat (limited to 'app')
| -rwxr-xr-x | app/Controllers/entryController.php | 3 | ||||
| -rwxr-xr-x | app/Controllers/feedController.php | 2 | ||||
| -rw-r--r-- | app/FreshRSS.php | 2 | ||||
| -rw-r--r-- | app/Models/Auth.php | 3 | ||||
| -rw-r--r-- | app/Models/EntryDAO.php | 27 | ||||
| -rw-r--r-- | app/Models/Feed.php | 2 | ||||
| -rw-r--r-- | app/Models/FeedDAO.php | 24 | ||||
| -rw-r--r-- | app/i18n/cz/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/de/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/en/conf.php | 2 | ||||
| -rwxr-xr-x | app/i18n/es/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/fr/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/he/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/it/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/kr/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/nl/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/pt-br/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/ru/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/tr/conf.php | 2 | ||||
| -rw-r--r-- | app/i18n/zh-cn/conf.php | 2 | ||||
| -rw-r--r-- | app/shares.php | 129 | ||||
| -rw-r--r-- | app/views/configure/sharing.phtml | 6 |
22 files changed, 192 insertions, 32 deletions
diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php index 9c6b248a9..28f0cb745 100755 --- a/app/Controllers/entryController.php +++ b/app/Controllers/entryController.php @@ -169,6 +169,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController { $nb_month_old = max(FreshRSS_Context::$user_conf->old_entries, 1); $date_min = time() - (3600 * 24 * 30 * $nb_month_old); + $entryDAO = FreshRSS_Factory::createEntryDao(); $feedDAO = FreshRSS_Factory::createFeedDao(); $feeds = $feedDAO->listFeeds(); $nb_total = 0; @@ -182,7 +183,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController { } if ($feed_history >= 0) { - $nb = $feedDAO->cleanOldEntries($feed->id(), $date_min, $feed_history); + $nb = $entryDAO->cleanOldEntries($feed->id(), $date_min, $feed_history); if ($nb > 0) { $nb_total += $nb; Minz_Log::debug($nb . ' old entries cleaned in feed [' . $feed->url() . ']'); diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 7f66b10db..af732951f 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -408,7 +408,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $entryDAO->beginTransaction(); } - $nb = $feedDAO->cleanOldEntries($feed->id(), + $nb = $entryDAO->cleanOldEntries($feed->id(), $date_min, max($feed_history, count($entries) + 10)); if ($nb > 0) { diff --git a/app/FreshRSS.php b/app/FreshRSS.php index f53c85bfb..25fd429a2 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -128,7 +128,7 @@ class FreshRSS extends Minz_FrontController { } header("X-Content-Type-Options: nosniff"); - FreshRSS_Share::load(join_path(DATA_PATH, 'shares.php')); + FreshRSS_Share::load(join_path(APP_PATH, 'shares.php')); self::loadStylesAndScripts(); } } diff --git a/app/Models/Auth.php b/app/Models/Auth.php index 32b673b6d..8c711308c 100644 --- a/app/Models/Auth.php +++ b/app/Models/Auth.php @@ -63,7 +63,6 @@ class FreshRSS_Auth { $login_ok = $current_user != ''; if ($login_ok) { Minz_Session::_param('currentUser', $current_user); - Minz_Session::_param('REMOTE_USER', $current_user); } return $login_ok; case 'none': @@ -102,6 +101,7 @@ class FreshRSS_Auth { } Minz_Session::_param('loginOk', self::$login_ok); + Minz_Session::_param('REMOTE_USER', httpAuthUser()); } /** @@ -133,6 +133,7 @@ class FreshRSS_Auth { self::$login_ok = false; Minz_Session::_param('loginOk'); Minz_Session::_param('csrf'); + Minz_Session::_param('REMOTE_USER'); $system_conf = Minz_Configuration::get('system'); $username = ''; diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 70135e7a0..8cdebedc5 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -560,6 +560,33 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return $affected; } + public function cleanOldEntries($id_feed, $date_min, $keep = 15) { //Remember to call updateCachedValue($id_feed) or updateCachedValues() just after + $sql = 'DELETE FROM `' . $this->prefix . 'entry` ' + . 'WHERE id_feed=:id_feed AND id<=:id_max ' + . 'AND is_favorite=0 ' //Do not remove favourites + . 'AND `lastSeen` < (SELECT maxLastSeen FROM (SELECT (MAX(e3.`lastSeen`)-99) AS maxLastSeen FROM `' . $this->prefix . 'entry` e3 WHERE e3.id_feed=:id_feed) recent) ' //Do not remove the most newly seen articles, plus a few seconds of tolerance + . 'AND id NOT IN (SELECT id FROM (SELECT e2.id FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=:id_feed ORDER BY id DESC LIMIT :keep) keep)'; //Double select: MySQL doesn't support 'LIMIT & IN/ALL/ANY/SOME subquery' + $stm = $this->bd->prepare($sql); + + if ($stm) { + $id_max = intval($date_min) . '000000'; + $stm->bindParam(':id_feed', $id_feed, PDO::PARAM_INT); + $stm->bindParam(':id_max', $id_max, PDO::PARAM_STR); + $stm->bindParam(':keep', $keep, PDO::PARAM_INT); + } + + if ($stm && $stm->execute()) { + return $stm->rowCount(); + } else { + $info = $stm == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $stm->errorInfo(); + if ($this->autoUpdateDb($info)) { + return $this->cleanOldEntries($id_feed, $date_min, $keep); + } + Minz_Log::error('SQL error cleanOldEntries: ' . $info[2]); + return false; + } + } + public function searchByGuid($id_feed, $guid) { // un guid est unique pour un flux donné $sql = 'SELECT id, guid, title, author, ' diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 13ab13df9..196d94931 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -355,7 +355,7 @@ class FreshRSS_Feed extends Minz_Model { $this->id(), $item->get_id(false, false), $title === null ? '' : $title, - $author === null ? '' : html_only_entity_decode(strip_tags($author->name)), + $author === null ? '' : html_only_entity_decode(strip_tags($author->name == null ? $author->email : $author->name)), $content === null ? '' : $content, $link === null ? '' : $link, $date ? $date : time() diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 011b3d112..0c25ab0ba 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -353,30 +353,6 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return $affected; } - public function cleanOldEntries($id, $date_min, $keep = 15) { //Remember to call updateCachedValue($id) or updateCachedValues() just after - $sql = 'DELETE FROM `' . $this->prefix . 'entry` ' - . 'WHERE id_feed=:id_feed AND id<=:id_max ' - . 'AND is_favorite=0 ' //Do not remove favourites - . 'AND `lastSeen` < (SELECT maxLastSeen FROM (SELECT (MAX(e3.`lastSeen`)-99) AS maxLastSeen FROM `' . $this->prefix . 'entry` e3 WHERE e3.id_feed=:id_feed) recent) ' //Do not remove the most newly seen articles, plus a few seconds of tolerance - . 'AND id NOT IN (SELECT id FROM (SELECT e2.id FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=:id_feed ORDER BY id DESC LIMIT :keep) keep)'; //Double select: MySQL doesn't support 'LIMIT & IN/ALL/ANY/SOME subquery' - $stm = $this->bd->prepare($sql); - - if ($stm) { - $id_max = intval($date_min) . '000000'; - $stm->bindParam(':id_feed', $id, PDO::PARAM_INT); - $stm->bindParam(':id_max', $id_max, PDO::PARAM_STR); - $stm->bindParam(':keep', $keep, PDO::PARAM_INT); - } - - if ($stm && $stm->execute()) { - return $stm->rowCount(); - } else { - $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); - Minz_Log::error('SQL error cleanOldEntries: ' . $info[2]); - return false; - } - } - public static function daoToFeed($listDAO, $catID = null) { $list = array(); diff --git a/app/i18n/cz/conf.php b/app/i18n/cz/conf.php index 649724e80..a7bcf6c08 100644 --- a/app/i18n/cz/conf.php +++ b/app/i18n/cz/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Sdílení', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'Více informací', 'print' => 'Tisk', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'Jméno pro zobrazení', 'share_url' => 'Jakou URL použít pro sdílení', diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php index 9f1edffb9..6b0d7c7f9 100644 --- a/app/i18n/de/conf.php +++ b/app/i18n/de/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Teilen', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'E-Mail', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'Weitere Informationen', 'print' => 'Drucken', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'Anzuzeigender Teilen-Name', 'share_url' => 'Zu verwendende Teilen-URL', diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index 60231b825..a1c3fc949 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Sharing', + 'add' => 'Add a sharing method', 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'More information', 'print' => 'Print', + 'remove' => 'Remove sharing method', 'shaarli' => 'Shaarli', 'share_name' => 'Share name to display', 'share_url' => 'Share URL to use', diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php index 65858fefe..464bebc4f 100755 --- a/app/i18n/es/conf.php +++ b/app/i18n/es/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Compartir', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'Más información', 'print' => 'Print', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'Compartir nombre a mostrar', 'share_url' => 'Compatir URL a usar', diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index b4c39e1ca..402a97b1c 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Partage', + 'add' => 'Ajouter une méthode de partage', 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Courriel', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'Plus d’informations', 'print' => 'Print', + 'remove' => 'Supprimer la méthode de partage', 'shaarli' => 'Shaarli', 'share_name' => 'Nom du partage à afficher', 'share_url' => 'URL du partage à utiliser', diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php index 50d1936a8..3d0534fdc 100644 --- a/app/i18n/he/conf.php +++ b/app/i18n/he/conf.php @@ -123,6 +123,7 @@ return array( ), 'sharing' => array( '_' => 'שיתוף', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'דואר אלקטרוני', @@ -130,6 +131,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'מידע נוסף', 'print' => 'הדפסה', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'שיתוף שם לתצוגה', 'share_url' => 'לשימוש שתפו URL', diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php index 9e20236f1..5ab343c4d 100644 --- a/app/i18n/it/conf.php +++ b/app/i18n/it/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Condivisione', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'Ulteriori informazioni', 'print' => 'Stampa', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'Nome condivisione', 'share_url' => 'URL condivisione', diff --git a/app/i18n/kr/conf.php b/app/i18n/kr/conf.php index 31b042f57..c9e91a804 100644 --- a/app/i18n/kr/conf.php +++ b/app/i18n/kr/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => '공유', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => '메일', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => '자세한 정보', 'print' => '인쇄', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => '표시할 이름', 'share_url' => '사용할 공유 URL', diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php index 360e1c5e7..847c735d1 100644 --- a/app/i18n/nl/conf.php +++ b/app/i18n/nl/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Delen', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'Meer informatie', 'print' => 'Afdrukken', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'Gedeelde naam om weer te geven', 'share_url' => 'Deel URL voor gebruik', diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php index 71b6afb20..864c80e61 100644 --- a/app/i18n/pt-br/conf.php +++ b/app/i18n/pt-br/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Compartilhando', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'Mais informação', 'print' => 'Imprimir', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'Nome de visualização para compartilhar', 'share_url' => 'URL utilizada para compartilhar', diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php index 15109dd15..1b5cd8085 100644 --- a/app/i18n/ru/conf.php +++ b/app/i18n/ru/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Sharing', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'More information', 'print' => 'Print', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'Share name to display', 'share_url' => 'Share URL to use', diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php index 596adaf9a..0671da79e 100644 --- a/app/i18n/tr/conf.php +++ b/app/i18n/tr/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => 'Paylaşım', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => 'Daha fazla bilgi', 'print' => 'Yazdır', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => 'Paylaşım ismi', 'share_url' => 'Paylaşım URL si', diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index 2e068be42..c57738c5b 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -126,6 +126,7 @@ return array( ), 'sharing' => array( '_' => '分享', + 'add' => 'Add a sharing method', // TODO 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -133,6 +134,7 @@ return array( 'g+' => 'Google+', 'more_information' => '更多信息', 'print' => '打印', + 'remove' => 'Remove sharing method', // TODO 'shaarli' => 'Shaarli', 'share_name' => '名称', 'share_url' => '地址', diff --git a/app/shares.php b/app/shares.php new file mode 100644 index 000000000..5403fd48c --- /dev/null +++ b/app/shares.php @@ -0,0 +1,129 @@ +<?php + +/* + * This is a configuration file. You shouldn't modify it unless you know what + * you are doing. If you want to add a share type, this is where you need to do + * it. + * + * For each share there is different configuration options. Here is the description + * of those options: + * - url is a mandatory option. It is a string representing the share URL. It + * supports 3 different placeholders for custom data. The ~URL~ placeholder + * represents the URL of the system used to share, it is configured by the + * user. The ~LINK~ placeholder represents the link of the shared article. + * The ~TITLE~ placeholder represents the title of the shared article. + * - transform is an array of transformation to apply on links and titles + * - help is a URL to a help page + * - form is the type of form to display during configuration. It's either + * 'simple' or 'advanced'. 'simple' is used when only the name is configurable, + * 'advanced' is used when the name and the location are configurable. + * - method is the HTTP method (POST or GET) used to share a link. + */ + +return array( + 'shaarli' => array( + 'url' => '~URL~?post=~LINK~&title=~TITLE~&source=FreshRSS', + 'transform' => array('rawurlencode'), + 'help' => 'http://sebsauvage.net/wiki/doku.php?id=php:shaarli', + 'form' => 'advanced', + 'method' => 'GET', + ), + 'blogotext' => array( + 'url' => '~URL~/admin/links.php?url=~LINK~', + 'transform' => array(), + 'help' => 'http://lehollandaisvolant.net/blogotext/fr/', + 'form' => 'advanced', + 'method' => 'GET', + ), + 'wallabag' => array( + 'url' => '~URL~?action=add&url=~LINK~', + 'transform' => array( + 'link' => array('base64_encode'), + 'title' => array(), + ), + 'help' => 'http://www.wallabag.org/', + 'form' => 'advanced', + 'method' => 'GET', + ), + 'wallabagv2' => array( + 'url' => '~URL~/bookmarklet?url=~LINK~', + 'transform' => array( + 'link' => array('rawurlencode'), + 'title' => array(), + ), + 'help' => 'http://www.wallabag.org/', + 'form' => 'advanced', + 'method' => 'GET', + ), + 'diaspora' => array( + 'url' => '~URL~/bookmarklet?url=~LINK~&title=~TITLE~', + 'transform' => array('rawurlencode'), + 'help' => 'https://diasporafoundation.org/', + 'form' => 'advanced', + 'method' => 'GET', + ), + 'movim' => array( + 'url' => '~URL~/?share/~LINK~', + 'transform' => array('rawurlencode', 'urlencode'), + 'help' => 'https://github.com/edhelas/movim', + 'form' => 'advanced', + 'method' => 'GET', + ), + 'twitter' => array( + 'url' => 'https://twitter.com/share?url=~LINK~&text=~TITLE~', + 'transform' => array('rawurlencode'), + 'form' => 'simple', + 'method' => 'GET', + ), + 'g+' => array( + 'url' => 'https://plus.google.com/share?url=~LINK~', + 'transform' => array('rawurlencode'), + 'form' => 'simple', + 'method' => 'GET', + ), + 'facebook' => array( + 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&t=~TITLE~', + 'transform' => array('rawurlencode'), + 'form' => 'simple', + 'method' => 'GET', + ), + 'email' => array( + 'url' => 'mailto:?subject=~TITLE~&body=~LINK~', + 'transform' => array('rawurlencode'), + 'form' => 'simple', + 'method' => 'GET', + ), + 'print' => array( + 'url' => '#', + 'transform' => array(), + 'form' => 'simple', + 'method' => 'GET', + ), + 'jdh' => array( + 'url' => 'https://www.journalduhacker.net/stories/new?url=~LINK~&title=~TITLE~', + 'transform' => array('rawurlencode'), + 'form' => 'simple', + 'method' => 'GET', + ), + 'Known' => array( + 'url' => '~URL~/share?share_url=~LINK~&share_title=~TITLE~', + 'transform' => array('rawurlencode'), + 'help' => 'https://withknown.com/', + 'form' => 'advanced', + 'method' => 'GET', + ), + 'gnusocial' => array( + 'url' => '~URL~/notice/new?content=~TITLE~%20~LINK~', + 'transform' => array('urlencode'), + 'help' => 'https://gnu.io/social/', + 'form' => 'advanced', + 'method' => 'GET', + ), + 'mastodon' => array( + 'url' => '~URL~/api/v1/statuses', + 'transform' => array(), + 'form' => 'advanced', + 'method' => 'POST', + 'field' => 'status', + ), +); diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml index b0e6618fa..026659007 100644 --- a/app/views/configure/sharing.phtml +++ b/app/views/configure/sharing.phtml @@ -14,7 +14,7 @@ <div class="stick"> <input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" /> <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?php echo _t('conf.sharing.share_url'); ?>" size="64" /> - <a href="#" class="remove btn btn-attention" data-remove="group-share-##key##"><?php echo _i('close'); ?></a></div> + <a href="#" class="remove btn btn-attention" data-remove="group-share-##key##" title="<?php echo _t('conf.sharing.remove'); ?>"><?php echo _i('close'); ?></a></div> <a target="_blank" rel="noreferrer" class="btn" title="<?php echo _t('conf.sharing.more_information'); ?>" href="##help##"><?php echo _i('help'); ?></a> </div></div>'> <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> @@ -39,7 +39,7 @@ <?php } else { ?> <input type="url" id="share_<?php echo $key; ?>_url" name="share[<?php echo $key; ?>][url]" class="extend" value="<?php echo $share->baseUrl(); ?>" placeholder="<?php echo _t('gen.short.not_applicable'); ?>" size="64" disabled/> <?php } ?> - <a href='#' class='remove btn btn-attention' data-remove="group-share-<?php echo $key; ?>"><?php echo _i('close'); ?></a> + <a href='#' class='remove btn btn-attention' data-remove="group-share-<?php echo $key; ?>" title="<?php echo _t('conf.sharing.remove'); ?>"><?php echo _i('close'); ?></a> </div> <?php if ($share->formType() === 'advanced') { ?> <a target="_blank" rel="noreferrer" class="btn" title="<?php echo _t('conf.sharing.more_information'); ?>" href="<?php echo $share->help(); ?>"><?php echo _i('help'); ?></a> @@ -57,7 +57,7 @@ </option> <?php } ?> </select> - <a href='#' class='share add btn'><?php echo _i('add'); ?></a> + <a href='#' class='share add btn' title="<?php echo _t('conf.sharing.add'); ?>"><?php echo _i('add'); ?></a> </div> </div> |
