+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* Manage the download, validation, and rendering of community messages
const DEFAULT_PERMISSION = 'administer CiviCRM';
/**
- * Default time to wait before retrying
+ * Default time to wait before retrying.
*/
const DEFAULT_RETRY = 7200; // 2 hours
protected $messagesUrl;
/**
- * Create default instance
+ * Create default instance.
*
* @return CRM_Core_CommunityMessages
*/
}
/**
- * Download document from URL and parse as JSON
+ * Download document from URL and parse as JSON.
*
* @return NULL|array
* parsed JSON
}
/**
- * Pick a message to display
+ * Pick a message to display.
*
* @return NULL|array
*/
* @return bool
*/
public function validateDocument($document) {
- if (!isset($document['ttl']) || !is_integer($document['ttl'])) {
+ if (!isset($document['ttl']) || !is_int($document['ttl'])) {
return FALSE;
}
- if (!isset($document['retry']) || !is_integer($document['retry'])) {
+ if (!isset($document['retry']) || !is_int($document['retry'])) {
return FALSE;
}
if (!isset($document['messages']) || !is_array($document['messages'])) {