Skip to content

Commit dea7b56

Browse files
committed
Remove unneeded variables
1 parent dcaef9d commit dea7b56

2 files changed

Lines changed: 3 additions & 12 deletions

File tree

controllers/Sources.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public function show() {
3131
'<a class="source-export" href="opmlexport">' . \F3::get('lang_source_export') . '</a>' .
3232
'<a class="source-opml" href="opml">' . \F3::get('lang_source_opml');
3333
$sourcesHtml = '</a>';
34-
$i = 0;
3534

3635
foreach ($sourcesDao->getWithIcon() as $source) {
3736
$this->view->source = $source;
@@ -93,7 +92,6 @@ public function params() {
9392
*/
9493
public function renderSources(array $sources) {
9594
$html = '';
96-
$itemsDao = new \daos\Items();
9795
foreach ($sources as $source) {
9896
$this->view->source = $source['title'];
9997
$this->view->sourceid = $source['id'];
@@ -317,9 +315,9 @@ public function listSources() {
317315
$sources = $sourcesDao->getWithIcon();
318316

319317
// get last icon
320-
for ($i = 0; $i < count($sources); ++$i) {
321-
$sources[$i]['params'] = json_decode(html_entity_decode($sources[$i]['params']), true);
322-
$sources[$i]['error'] = $sources[$i]['error'] === null ? '' : $sources[$i]['error'];
318+
foreach ($sources as &$source) {
319+
$source['params'] = json_decode(html_entity_decode($source['params']), true);
320+
$source['error'] = $source['error'] === null ? '' : $source['error'];
323321
}
324322

325323
$this->view->jsonSuccess($sources);
@@ -348,8 +346,6 @@ public function spouts() {
348346
public function stats() {
349347
$this->needsLoggedInOrPublicMode();
350348

351-
$itemDao = new \daos\Items();
352-
353349
// load sources
354350
$sourcesDao = new \daos\Sources();
355351
$sources = $sourcesDao->getWithUnread();

helpers/View.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,6 @@ public static function getGlobalCssFileName() {
184184
private function genMinified($type) {
185185
self::$staticmtime[$type] = self::maxmtime(\F3::get($type));
186186

187-
if ($type === self::STATIC_RESOURCE_JS) {
188-
$filename = self::getGlobalJsFileName();
189-
} elseif ($type === self::STATIC_RESOURCE_CSS) {
190-
$filename = self::getGlobalCssFileName();
191-
}
192187
$target = \F3::get('BASEDIR') . '/public/' . self::$staticPrefix . '.' . $type;
193188

194189
// build if needed

0 commit comments

Comments
 (0)