Permalink
Browse files

Fixed strict standards warning

  • Loading branch information...
1 parent 3b5613a commit a0260c5f49e76cdb0cfcff7649fb16147e47652b @soonick committed Aug 6, 2013
Showing with 29 additions and 29 deletions.
  1. +1 −1 classes/Pommo_Helper_Messages.php
  2. +15 −15 classes/Pommo_Validate.php
  3. +13 −13 form_generate.php
@@ -26,7 +26,7 @@ class Pommo_Helper_Messages
// to: email to send message to [str]
// type: message type type [str] either; 'subscribe', 'unsubscribe', 'confirm', 'activate', 'update', or 'password'
// code: confirmation code [str]
- function sendMessage($p = array('to' => false, 'type' => false, 'code' => false)) {
+ public static function sendMessage($p = array('to' => false, 'type' => false, 'code' => false)) {
$logger = Pommo::$_logger;
// retrieve messages
View
@@ -3,7 +3,7 @@
/**
* Original Code Copyright (C) 2005, 2006, 2007, 2008 Brice Burgess <bhb@iceburg.net>
* released originally under GPLV2
- *
+ *
* This file is part of poMMo.
*
* poMMo is free software: you can redistribute it and/or modify
@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with Pommo. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* This fork is from https://github.com/soonick/poMMo
* Please see docs/contribs for Contributors
*
@@ -56,7 +56,7 @@ public function setPost($post)
* Adds Data to the array to be checked
*
* @param string $name - Name of the input type (ie ID='name')
- * @param string $type - Type to check. Valid Values
+ * @param string $type - Type to check. Valid Values
* Email
* date
* dateTime
@@ -173,7 +173,7 @@ public function checkData()
/**
* getErrors
* Returns what the validation errors were
- *
+ *
* @param void
*
* @return array Array containing all error messages
@@ -186,36 +186,36 @@ public function getErrors()
/**
* subscriberData
* Validates supplied subscriber data against fields
- *
+ *
* @param array $in - The subscriber Data
* array $p - A parameter array with values as follows :-
- * boolean prune - if true, prune the data array
+ * boolean prune - if true, prune the data array
* (passed by reference) to only recognized/checked
* fields
* boolean ignore - if true, invalid fields will be pruned
* from $in array -- no error thrown
- * boolean ignoreInactive - if true, invalid inactive
- * fields will be pruned from $in array - no error
+ * boolean ignoreInactive - if true, invalid inactive
+ * fields will be pruned from $in array - no error
* thrown
- * boolean active - if true, only check data against
+ * boolean active - if true, only check data against
* active fields. Typically true if subscribing via
- * form, false if admin importing.
- * boolean skipReq - if true, skip the required check
+ * form, false if admin importing.
+ * boolean skipReq - if true, skip the required check
* AND empty fields.
* boolean log - if true, log invalid fields as error.
* Typically true if subscribing via form, false if
* admin importing.
- *
+ *
* @return boolean validation status
- *
- * NOTE: has the MAGIC FUNCTIONALITY of converting date field input
+ *
+ * NOTE: has the MAGIC FUNCTIONALITY of converting date field input
* to a UNIX TIMESTAMP. This is necessary for quick SQL comparisson of dates, etc.
* NOTE: has the MAGIC FUNCTINALITY of changing "true"/"false" to checkbox "on"/off equivelent
* NOTE: has the MAGIC FUNCTIONALITY of trimming leading and trailing whitepace
* NOTE: has the MAGIC FUNCTIONALITY of shortening value to 60 characters (or 255 if a comment type)
* TODO -> should fields be passed by reference? e.g. are they usually already available when subscriberData() is called?
*/
- function subscriberData(&$in, $p = array())
+ public static function subscriberData(&$in, $p = array())
{
$defaults = array(
'prune' => true,
View
@@ -1,23 +1,23 @@
<?php
/**
* Copyright (C) 2005, 2006, 2007, 2008 Brice Burgess <bhb@iceburg.net>
- *
+ *
* This file is part of poMMo (http://www.pommo.org)
- *
- * poMMo is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
+ *
+ * poMMo is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2, or any later version.
- *
+ *
* poMMo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with program; see the file docs/LICENSE. If not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
/**********************************
INITIALIZATION METHODS
*********************************/
@@ -27,7 +27,7 @@
Pommo::init();
$logger = Pommo::$_logger;
$dbo = Pommo::$_dbo;
-
+
// URL which processes the form input + adds (or warns) subscriber to pending table.
$signup_url = "http://" . $_SERVER['HTTP_HOST'] . Pommo::$_baseUrl . "process.php";
?>
@@ -52,7 +52,7 @@
<!-- Set "ACTION" to the URL of poMMo's process.php
process.php located in the "user" directory of your poMMo installation.
** poMMo attempted to detect this location, and it may not need to be changed. ** -->
-
+
<form method="post" action="<?php echo $signup_url; ?>" name="<?php echo $form_name; ?>">
<fieldset>
<legend>Subscribe</legend>
@@ -64,7 +64,7 @@
</div>
<?php
-$fields = & Pommo_Fields::get(array('active' => TRUE,'byName' => FALSE));
+$fields = Pommo_Fields::get(array('active' => TRUE,'byName' => FALSE));
foreach (array_keys($fields) as $field_id) {
$field = & $fields[$field_id];
@@ -74,7 +74,7 @@
echo "<!-- BEGIN INPUT FOR FIELD \"".$field['name']."\" -->\r\n<div>\r\n<label for=\"field".$field_id."\">".$field['prompt'].":</label>\r\n";
switch ($field['type']) {
- case "checkbox": // checkbox
+ case "checkbox": // checkbox
if (empty($field['normally']))
echo "\r\n<input type=\"checkbox\" name=\"d[".$field_id."]\" id=\"field".$field_id."\" />";
else
@@ -93,7 +93,7 @@
echo "<option value=\"".htmlspecialchars($option)."\" selected=\"selected\"> ".$option."</option>\r\n";
else
echo "<option value=\"".htmlspecialchars($option)."\"> ".$option."</option>\r\n";
- }
+ }
echo "</select>\r\n";
break;
@@ -121,7 +121,7 @@
<!-- *** DO NOT CHANGE name="pommo_signup" ! ***
If you'd like to change the button text change the "value=" text. -->
-
+
<input type="hidden" name="pommo_signup" value="true" />
<input type="submit" value="<?php echo Pommo::_T('Subscribe'); ?>" />

0 comments on commit a0260c5

Please sign in to comment.