aboutsummaryrefslogtreecommitdiffstats
path: root/config/filer
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-08-06 13:04:04 +0545
committerPhil Davis <phil.davis@inf.org>2015-08-06 13:04:04 +0545
commitd35ab996334be40d61a9ac2db78b408b00056c62 (patch)
treed1b033e3453e0ac583b94b4653343d999bbf86ba /config/filer
parentbad0f316bf513e8a7b61646ceb2e1ddb3bf2b03d (diff)
downloadpfsense-packages-d35ab996334be40d61a9ac2db78b408b00056c62.tar.gz
pfsense-packages-d35ab996334be40d61a9ac2db78b408b00056c62.tar.bz2
pfsense-packages-d35ab996334be40d61a9ac2db78b408b00056c62.zip
Filer package code style
Diffstat (limited to 'config/filer')
-rw-r--r--config/filer/filer.inc12
-rw-r--r--config/filer/filer.xml12
2 files changed, 12 insertions, 12 deletions
diff --git a/config/filer/filer.inc b/config/filer/filer.inc
index 3a012dd2..7b795acb 100644
--- a/config/filer/filer.inc
+++ b/config/filer/filer.inc
@@ -44,7 +44,7 @@ function sync_package_filer() {
if ($config['installedpackages']['filer']['config'] != "") {
$count = 0;
foreach ($config['installedpackages']['filer']['config'] as $file) {
- if ($file['filedata']=="" && file_exists($file['fullfile'])) {
+ if ($file['filedata'] == "" && file_exists($file['fullfile'])) {
$config['installedpackages']['filer']['config'][$count]['filedata'] = base64_encode(file_get_contents($file['fullfile']));
$file['filedata'] = base64_encode(file_get_contents($file['fullfile']));
$update_conf++;
@@ -65,10 +65,10 @@ function sync_package_filer() {
switch ($file['background']) {
case "background":
mwexec_bg($file['cmd']);
- break;
+ break;
case "foreground":
mwexec($file['cmd']);
- break;
+ break;
}
}
}
@@ -90,13 +90,13 @@ function filer_validate_input($post, &$input_errors) {
continue;
}
if (substr($key, 0, 3) == "mod" && !preg_match("/^0?[0-7]{3}$/", $value)) {
- $input_errors[] = "{$value} is not valid permissions mode number.";
+ $input_errors[] = "{$value} is not valid permissions mode number.";
}
if (substr($key, 0, 11) == "description" && !preg_match("@^[a-zA-Z0-9 _/.-]+$@", $value)) {
- $input_errors[] = "Do not use special characters in description.";
+ $input_errors[] = "Do not use special characters in description.";
}
if (substr($key, 0, 8) == "fullfile" && !preg_match("@^[a-zA-Z0-9_/.-]+$@", $value)) {
- $input_errors[] = "Do not use special characters in filename.";
+ $input_errors[] = "Do not use special characters in filename.";
}
}
}
diff --git a/config/filer/filer.xml b/config/filer/filer.xml
index ab49bb21..57125927 100644
--- a/config/filer/filer.xml
+++ b/config/filer/filer.xml
@@ -44,7 +44,7 @@
]]>
</copyright>
<name>filer</name>
- <version>0.60.2</version>
+ <version>0.60.4</version>
<title>Filer</title>
<include_file>/usr/local/pkg/filer.inc</include_file>
<additional_files_needed>
@@ -84,14 +84,14 @@
<columnitem>
<fielddescr>Description</fielddescr>
<fieldname>description</fieldname>
- </columnitem>
+ </columnitem>
</adddeleteeditpagefields>
<fields>
<field>
<type>listtopic</type>
<fieldname>temp</fieldname>
<name>File configuration</name>
- </field>
+ </field>
<field>
<fielddescr>File</fielddescr>
<fieldname>fullfile</fieldname>
@@ -129,7 +129,7 @@
<type>listtopic</type>
<fieldname>temp</fieldname>
<name>Command to run after file save/sync.</name>
- </field>
+ </field>
<field>
<fielddescr>Script/Command</fielddescr>
<fieldname>cmd</fieldname>
@@ -142,7 +142,7 @@
<fielddescr>Execute mode</fielddescr>
<fieldname>background</fieldname>
<type>select</type>
- <options>
+ <options>
<option>
<name>Background (default)</name>
<value>background</value>
@@ -164,7 +164,7 @@
</custom_php_validation_command>
<custom_delete_php_command>
sync_package_filer();
- </custom_delete_php_command>
+ </custom_delete_php_command>
<custom_php_resync_config_command>
sync_package_filer();
</custom_php_resync_config_command>