mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Move newapp flag out of loop. Only needs to be set once. IE: coding optimization
This commit is contained in:
parent
6bfd5f5e49
commit
2ad90315eb
BIN
archive/community.applications-2017.10.15.txz
Normal file
BIN
archive/community.applications-2017.10.15.txz
Normal file
Binary file not shown.
@ -1106,6 +1106,12 @@ case 'get_content':
|
|||||||
$display = array();
|
$display = array();
|
||||||
$official = array();
|
$official = array();
|
||||||
|
|
||||||
|
if ( $newApp == "true" ) {
|
||||||
|
file_put_contents($communityPaths['newFlag'],"new category is being displayed");
|
||||||
|
} else {
|
||||||
|
@unlink($communityPaths['newFlag']);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($file as $template) {
|
foreach ($file as $template) {
|
||||||
if ( $template['Blacklist'] ) {
|
if ( $template['Blacklist'] ) {
|
||||||
continue;
|
continue;
|
||||||
@ -1154,11 +1160,7 @@ case 'get_content':
|
|||||||
$template['MyPath'] = $template['PluginURL'];
|
$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 ( ($newApp == "true") && ($template['Date'] < $newAppTime) ) { continue; }
|
||||||
if ( $category && ! preg_match($category,$template['Category'])) { continue; }
|
if ( $category && ! preg_match($category,$template['Category'])) { continue; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user