aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/importExportController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-03-22 17:56:07 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-03-22 17:56:07 +0100
commit5081ffaf39699398f83be97e47b72444e5bcd5d1 (patch)
treecf07bc40c955510785198ed74bbc931ee209439b /app/Controllers/importExportController.php
parent69deb27f654a0d5d5e6fe77733d56a9c4fd29e03 (diff)
Minz: remove one layer of ob_ (experimental)
https://github.com/marienfressinaud/FreshRSS/issues/303#issuecomment-38351311 https://github.com/marienfressinaud/FreshRSS/issues/163 * Remove Minz_Response (not needed anymore) * Move Minz_Request::reseted to Minz_Dispatcher::reset()
Diffstat (limited to 'app/Controllers/importExportController.php')
-rw-r--r--app/Controllers/importExportController.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
index 458814676..f697f4c9e 100644
--- a/app/Controllers/importExportController.php
+++ b/app/Controllers/importExportController.php
@@ -65,7 +65,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
$export_all = Minz_Request::param('export_all', false);
// code from https://stackoverflow.com/questions/1061710/php-zip-files-on-the-fly
- $file = tempnam("tmp", "zip");
+ $file = tempnam('tmp', 'zip');
$zip = new ZipArchive();
$zip->open($file, ZipArchive::OVERWRITE);
@@ -101,17 +101,11 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
}
$this->view->categories = $list;
-
- // TODO: add a parameter to renderHelper in order to get a variable
- ob_start();
- $this->view->renderHelper('export/opml');
- return ob_get_clean();
+ return $this->view->helperToString('export/opml');
}
private function generate_articles($type) {
- // TODO: same here + we should get articles according to $type
- ob_start();
- $this->view->renderHelper('export/articles');
- return ob_get_clean();
+ // TODO: we should get articles according to $type
+ return $this->view->helperToString('export/articles');
}
}