mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Some cleanup
This commit is contained in:
parent
1278604ff2
commit
c351e1422f
Binary file not shown.
@ -299,7 +299,6 @@ function fixTemplates($template) {
|
|||||||
$statistics['caFixed']++;
|
$statistics['caFixed']++;
|
||||||
$statistics['fixedTemplates'][$template['Repo']][$template['Repository']][] = "Multiple Category tags or Category present but empty";
|
$statistics['fixedTemplates'][$template['Repo']][$template['Repository']][] = "Multiple Category tags or Category present but empty";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !is_string($template['Overview']) ) {
|
if ( !is_string($template['Overview']) ) {
|
||||||
unset($template['Overview']);
|
unset($template['Overview']);
|
||||||
}
|
}
|
||||||
@ -309,7 +308,6 @@ function fixTemplates($template) {
|
|||||||
$statistics['caFixed']++;
|
$statistics['caFixed']++;
|
||||||
$statistics['fixedTemplates'][$template['Repo']][$template['Repository']][] = "Multiple Authors / Repositories Found";
|
$statistics['fixedTemplates'][$template['Repo']][$template['Repository']][] = "Multiple Authors / Repositories Found";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_array($template['PluginURL']) ) { # due to coppit
|
if ( is_array($template['PluginURL']) ) { # due to coppit
|
||||||
$template['PluginURL'] = $template['PluginURL'][1];
|
$template['PluginURL'] = $template['PluginURL'][1];
|
||||||
$statistics['caFixed']++;
|
$statistics['caFixed']++;
|
||||||
@ -340,7 +338,6 @@ function fixTemplates($template) {
|
|||||||
if ( ( stripos($template['RepoName'],' beta') > 0 ) ) {
|
if ( ( stripos($template['RepoName'],' beta') > 0 ) ) {
|
||||||
$template['Beta'] = "true";
|
$template['Beta'] = "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
$template['Support'] = validURL($template['Support']);
|
$template['Support'] = validURL($template['Support']);
|
||||||
$template['Project'] = validURL($template['Project']);
|
$template['Project'] = validURL($template['Project']);
|
||||||
$template['DonateLink'] = validURL($template['DonateLink']);
|
$template['DonateLink'] = validURL($template['DonateLink']);
|
||||||
@ -491,16 +488,6 @@ function logger($string) {
|
|||||||
shell_exec("logger ".escapeshellarg($string));
|
shell_exec("logger ".escapeshellarg($string));
|
||||||
}
|
}
|
||||||
|
|
||||||
###########################################
|
|
||||||
# #
|
|
||||||
# Function to send a dynamix notification #
|
|
||||||
# #
|
|
||||||
###########################################
|
|
||||||
function notify($event,$subject,$description,$message,$type="normal") {
|
|
||||||
$command = '/usr/local/emhttp/plugins/dynamix/scripts/notify -e "'.$event.'" -s "'.$subject.'" -d "'.$description.'" -m "'.$message.'" -i "'.$type.'"';
|
|
||||||
shell_exec($command);
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# #
|
# #
|
||||||
# Function to check for a valid URL #
|
# Function to check for a valid URL #
|
||||||
@ -556,16 +543,8 @@ function getSortOrder($sortArray) {
|
|||||||
function caGetMode() {
|
function caGetMode() {
|
||||||
global $communityPaths, $communitySettings;
|
global $communityPaths, $communitySettings;
|
||||||
|
|
||||||
if ( is_file($communityPaths['LegacyMode']) ) {
|
$script = ( is_file($communityPaths['LegacyMode']) ) ? "$('#updateButton').html('appFeed Mode');" : "$('#updateButton').html('Legacy Mode');";
|
||||||
$script = "$('#updateButton').html('appFeed Mode');";
|
$script .= ( is_file($communityPaths['LegacyMode'] ) || ($communitySettings['maintainer'] == "yes") ) ? "$('#updateButton').show();" : "$('#updateButton').hide();";
|
||||||
} else {
|
|
||||||
$script = "$('#updateButton').html('Legacy Mode');";
|
|
||||||
}
|
|
||||||
if ( is_file($communityPaths['LegacyMode']) || ($communitySettings['maintainer'] == "yes") ) {
|
|
||||||
$script .= "$('#updateButton').show();";
|
|
||||||
} else {
|
|
||||||
$script .= "$('#updateButton').hide();";
|
|
||||||
}
|
|
||||||
return "<script>$script</script>";
|
return "<script>$script</script>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user