aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-08-06 12:48:39 +0545
committerPhil Davis <phil.davis@inf.org>2015-08-06 12:48:39 +0545
commitae3edf8905294ac471503692af8c8aa92ba85fc2 (patch)
tree62625187701f6b36ac303e51c8f540e2157fc344
parentbad0f316bf513e8a7b61646ceb2e1ddb3bf2b03d (diff)
downloadpfsense-packages-ae3edf8905294ac471503692af8c8aa92ba85fc2.tar.gz
pfsense-packages-ae3edf8905294ac471503692af8c8aa92ba85fc2.tar.bz2
pfsense-packages-ae3edf8905294ac471503692af8c8aa92ba85fc2.zip
Notes package code style
-rw-r--r--config/notes/notes.inc42
-rw-r--r--config/notes/notes.xml78
-rw-r--r--pkg_config.10.xml2
3 files changed, 57 insertions, 65 deletions
diff --git a/config/notes/notes.inc b/config/notes/notes.inc
index f4bfe2cc..29b51396 100644
--- a/config/notes/notes.inc
+++ b/config/notes/notes.inc
@@ -3,10 +3,10 @@
/*
/* ========================================================================== */
/*
- notes.inc
- Copyright (C) 2008 Mark J Crane
- All rights reserved.
- */
+ notes.inc
+ Copyright (C) 2008 Mark J Crane
+ All rights reserved.
+*/
/* ========================================================================== */
/*
Redistribution and use in source and binary forms, with or without
@@ -31,61 +31,53 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-function notes_sync_package()
-{
-
- //global $config;
+function notes_sync_package() {
+
+ //global $config;
}
-
-function notes_install_command()
-{
+
+function notes_install_command() {
global $config;
conf_mount_rw();
config_lock();
if (!is_dir('/usr/local/www/packages/')) {
- exec("mkdir /usr/local/www/packages/");
+ exec("mkdir /usr/local/www/packages/");
}
-
+
//if (!is_dir('/usr/local/www/packages/notes/')) {
// exec("mkdir /usr/local/www/packages/notes/");
//}
-
//rename PHP files from .tmp to .php
//exec("cp /tmp/notes.tmp /usr/local/www/packages/phpservice/notes.php");
//unlink_if_exists("/tmp/notes.tmp");
-
- //write_config();
+ //write_config();
-
//write_rcfile(array(
// "file" => "notes.sh",
// "start" => "/usr/local/bin/php /usr/local/pkg/notes.php",
// "stop" => "rm /tmp/phpmonitor.pid"
// )
//);
-
-
+
notes_sync_package();
-
- //if (pkg_is_service_running('notes')) {
+ //if (pkg_is_service_running('notes')) {
//documentation purposes
//}
conf_mount_ro();
config_unlock();
-
+
}
-function notes_deinstall_command()
-{
+function notes_deinstall_command() {
conf_mount_rw();
config_lock();
@@ -93,7 +85,7 @@ function notes_deinstall_command()
unlink_if_exists("/usr/local/pkg/notes.inc");
conf_mount_ro();
config_unlock();
-
+
}
?> \ No newline at end of file
diff --git a/config/notes/notes.xml b/config/notes/notes.xml
index 513bf922..34d2f676 100644
--- a/config/notes/notes.xml
+++ b/config/notes/notes.xml
@@ -2,46 +2,46 @@
<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
<packagegui>
- <copyright>
- <![CDATA[
+ <copyright>
+ <![CDATA[
/* $Id$ */
/* ========================================================================== */
/*
- notes.xml
- Copyright (C) 2008 Mark J Crane
- All rights reserved.
- */
+ notes.xml
+ Copyright (C) 2008 Mark J Crane
+ All rights reserved.
+*/
/* ========================================================================== */
/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
/* ========================================================================== */
- ]]>
- </copyright>
- <description>Notes</description>
- <requirements>Describe your package requirements here</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
+ ]]>
+ </copyright>
+ <description>Notes</description>
+ <requirements>Describe your package requirements here</requirements>
+ <faq>Currently there are no FAQ items provided.</faq>
<name>Notes</name>
- <version>0.2.3</version>
+ <version>0.2.5</version>
<title>Settings</title>
<include_file>/usr/local/pkg/notes.inc</include_file>
<menu>
@@ -56,24 +56,24 @@
<text>Settings</text>
<url>/pkg_edit.php?xml=notes.xml</url>
<active/>
- </tab>
+ </tab>
</tabs>
- <configpath>installedpackages->package->$packagename->configuration->notes</configpath>
+ <configpath>installedpackages->package->$packagename->configuration->notes</configpath>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
+ <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/notes/notes.inc</item>
</additional_files_needed>
<adddeleteeditpagefields>
<columnitem>
<fielddescr>Title</fielddescr>
<fieldname>title</fieldname>
- </columnitem>
+ </columnitem>
<columnitem>
<fielddescr>Category</fielddescr>
<fieldname>category</fieldname>
</columnitem>
- </adddeleteeditpagefields>
+ </adddeleteeditpagefields>
<fields>
<field>
<fielddescr>Title</fielddescr>
@@ -86,7 +86,7 @@
<fieldname>category</fieldname>
<description>Enter a category.</description>
<type>input</type>
- </field>
+ </field>
<field>
<fielddescr>&lt;b&gt;Notes&lt;/b&gt; &lt;br /&gt; &lt;br /&gt;</fielddescr>
<fieldname>notes</fieldname>
@@ -94,16 +94,16 @@
<type>textarea</type>
<encoding>base64</encoding>
<size>30</size>
- <cols>70</cols>
+ <cols>70</cols>
<rows>20</rows>
</field>
- </fields>
+ </fields>
<custom_add_php_command>
</custom_add_php_command>
<custom_php_resync_config_command>
notes_sync_package();
</custom_php_resync_config_command>
- <custom_delete_php_command>
+ <custom_delete_php_command>
notes_sync_package();
</custom_delete_php_command>
<custom_php_install_command>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 60f28e41..0b3866cc 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -315,7 +315,7 @@
<category>Status</category>
<pkginfolink/>
<config_file>https://packages.pfsense.org/packages/config/notes/notes.xml</config_file>
- <version>0.2.4</version>
+ <version>0.2.5</version>
<status>Alpha</status>
<required_version>2.2</required_version>
<maintainer>markjcrane@gmail.com</maintainer>