summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-03-29 19:10:18 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-03-29 19:10:18 +0100
commit7676a197a4767f735dabae6ad9cf40ef65e91aa7 (patch)
tree554a94797327f3059dcc60dcf275e69e00c77df3
parentd464833922e9cc00948698aed0a2af1f0b55e101 (diff)
Fix typo + improve detection OPML file
-rw-r--r--app/Controllers/importExportController.php7
-rw-r--r--app/views/importExport/index.phtml2
2 files changed, 5 insertions, 4 deletions
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
index 6194ce214..cbadeb6ca 100644
--- a/app/Controllers/importExportController.php
+++ b/app/Controllers/importExportController.php
@@ -115,7 +115,8 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
if (substr_compare($filename, '.zip', -4) === 0) {
return 'zip';
- } elseif (substr_compare($filename, '.opml', -5) === 0) {
+ } elseif (substr_compare($filename, '.opml', -5) === 0 ||
+ substr_compare($filename, '.xml', -4) === 0) {
return 'opml';
} elseif (strcmp($filename, 'starred.json') === 0) {
return 'json_starred';
@@ -144,7 +145,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
// on calcule la date des articles les plus anciens qu'on accepte
$nb_month_old = $this->view->conf->old_entries;
- $date_min = time() -(3600 * 24 * 30 * $nb_month_old);
+ $date_min = time() - (3600 * 24 * 30 * $nb_month_old);
// la variable $error permet de savoir si une erreur est survenue
// Le but est de ne pas arrêter l'import même en cas d'erreur
@@ -294,7 +295,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
$this->view->type = 'starred';
$this->view->entries = $this->entryDAO->listWhere(
's', '', 'all', 'ASC',
- $entryDAO->countUnreadReadFavorites()['all']
+ $this->entryDAO->countUnreadReadFavorites()['all']
);
} elseif ($type == 'feed' && !is_null($feed)) {
$this->view->list_title = Minz_Translate::t("feed_list", $feed->name());
diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml
index 386c88648..309058959 100644
--- a/app/views/importExport/index.phtml
+++ b/app/views/importExport/index.phtml
@@ -34,7 +34,7 @@
<?php echo Minz_Translate::t ('export_starred'); ?>
</label>
- <select name="export_feeds[]" size="10" multiple="multiple">
+ <select name="export_feeds[]" size="<?php echo min(10, count($this->feeds)); ?>" multiple="multiple">
<?php foreach ($this->feeds as $feed) { ?>
<option value="<?php echo $feed->id(); ?>"><?php echo $feed->name(); ?></option>
<?php } ?>