Skip to content

Commit

Permalink
Remove unneeded variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Feb 8, 2019
1 parent 60f9b6e commit 4f06405
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 3 additions & 7 deletions controllers/Sources.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function show() {
'<a class="source-export" href="opmlexport">' . \F3::get('lang_source_export') . '</a>' .
'<a class="source-opml" href="opml">' . \F3::get('lang_source_opml');
$sourcesHtml = '</a>';
$i = 0;

foreach ($sourcesDao->getWithIcon() as $source) {
$this->view->source = $source;
Expand Down Expand Up @@ -93,7 +92,6 @@ public function params() {
*/
public function renderSources(array $sources) {
$html = '';
$itemsDao = new \daos\Items();
foreach ($sources as $source) {
$this->view->source = $source['title'];
$this->view->sourceid = $source['id'];
Expand Down Expand Up @@ -317,9 +315,9 @@ public function listSources() {
$sources = $sourcesDao->getWithIcon();

// get last icon
for ($i = 0; $i < count($sources); ++$i) {
$sources[$i]['params'] = json_decode(html_entity_decode($sources[$i]['params']), true);
$sources[$i]['error'] = $sources[$i]['error'] === null ? '' : $sources[$i]['error'];
foreach ($sources as &$source) {
$source['params'] = json_decode(html_entity_decode($source['params']), true);
$source['error'] = $source['error'] === null ? '' : $source['error'];
}

$this->view->jsonSuccess($sources);
Expand Down Expand Up @@ -348,8 +346,6 @@ public function spouts() {
public function stats() {
$this->needsLoggedInOrPublicMode();

$itemDao = new \daos\Items();

// load sources
$sourcesDao = new \daos\Sources();
$sources = $sourcesDao->getWithUnread();
Expand Down
5 changes: 0 additions & 5 deletions helpers/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ public static function getGlobalCssFileName() {
private function genMinified($type) {
self::$staticmtime[$type] = self::maxmtime(\F3::get($type));

if ($type === self::STATIC_RESOURCE_JS) {
$filename = self::getGlobalJsFileName();
} elseif ($type === self::STATIC_RESOURCE_CSS) {
$filename = self::getGlobalCssFileName();
}
$target = \F3::get('BASEDIR') . '/public/' . self::$staticPrefix . '.' . $type;

// build if needed
Expand Down

0 comments on commit 4f06405

Please sign in to comment.