Move newapp flag out of loop. Only needs to be set once. IE: coding optimization

pull/2/head
Squidly271 2017-10-15 07:52:16 -04:00
parent 6bfd5f5e49
commit 2ad90315eb
2 changed files with 7 additions and 5 deletions

Binary file not shown.

View File

@ -1106,6 +1106,12 @@ case 'get_content':
$display = array();
$official = array();
if ( $newApp == "true" ) {
file_put_contents($communityPaths['newFlag'],"new category is being displayed");
} else {
@unlink($communityPaths['newFlag']);
}
foreach ($file as $template) {
if ( $template['Blacklist'] ) {
continue;
@ -1154,11 +1160,7 @@ case 'get_content':
$template['MyPath'] = $template['PluginURL'];
}
}
if ( $newApp == "true" ) {
file_put_contents($communityPaths['newFlag'],"new category is being displayed");
} else {
@unlink($communityPaths['newFlag']);
}
if ( ($newApp == "true") && ($template['Date'] < $newAppTime) ) { continue; }
if ( $category && ! preg_match($category,$template['Category'])) { continue; }