aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r--engine/lib/elgglib.php29
1 files changed, 19 insertions, 10 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 1d52c0534..9a09d4f72 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -85,8 +85,8 @@ function current_page_url() {
/**
* This is a factory function which produces an ElggCache object suitable for caching file load paths.
*
- * TODO: Can this be done in a cleaner way?
- * TODO: Swap to memcache etc?
+ * @todo Can this be done in a cleaner way?
+ * @todo Swap to memcache etc?
*/
function elgg_get_filepath_cache() {
global $CONFIG;
@@ -654,6 +654,7 @@ function add_to_register($register_name, $subregister_name, $subregister_value,
* @param string $register_name The name of the top-level register
* @param string $subregister_name The name of the subregister
* @return true|false Depending on success
+ * @since 1.7.0
*/
function remove_from_register($register_name, $subregister_name) {
global $CONFIG;
@@ -963,6 +964,7 @@ function register_elgg_event_handler($event, $object_type, $function, $priority
* @param string $event The event type
* @param string $object_type The object type
* @param string $function The function name
+ * @since 1.7.0
*/
function unregister_elgg_event_handler($event, $object_type, $function) {
global $CONFIG;
@@ -1046,6 +1048,7 @@ function register_plugin_hook($hook, $type, $function, $priority = 500) {
* @param string $hook The name of the hook
* @param string $entity_type The name of the type of entity (eg "user", "object" etc)
* @param string $function The name of a valid function to be run
+ * @since 1.7.0
*/
function unregister_plugin_hook($hook, $entity_type, $function) {
global $CONFIG;
@@ -1130,7 +1133,7 @@ function __elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars) {
switch ($errno) {
case E_USER_ERROR:
- error_log("ERROR: $error");
+ error_log("PHP ERROR: $error");
register_error("ERROR: $error");
// Since this is a fatal error, we want to stop any further execution but do so gracefully.
@@ -1139,13 +1142,13 @@ function __elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars) {
case E_WARNING :
case E_USER_WARNING :
- error_log("WARNING: $error");
+ error_log("PHP WARNING: $error");
break;
default:
global $CONFIG;
if (isset($CONFIG->debug) && $CONFIG->debug === 'NOTICE') {
- error_log("NOTICE: $error");
+ error_log("PHP NOTICE: $error");
}
}
@@ -1164,6 +1167,7 @@ function __elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars) {
* @param str $message User message
* @param str $level NOTICE | WARNING | ERROR | DEBUG
* @return bool
+ * @since 1.7.0
*/
function elgg_log($message, $level='NOTICE') {
global $CONFIG;
@@ -1211,6 +1215,7 @@ function elgg_log($message, $level='NOTICE') {
* @param bool $to_screen
* @param string $level
* @return void
+ * @since 1.7.0
*/
function elgg_dump($value, $to_screen = TRUE, $level = 'NOTICE') {
global $CONFIG;
@@ -1394,6 +1399,7 @@ function run_function_once($functionname, $timelastupdatedcheck = 0) {
* @param str $version human-readable *release* version the function was deprecated. No bloody A, B, (R)C, or D.
*
* @return bool
+ * @since 1.7.0
*/
function elgg_deprecated_notice($msg, $dep_version) {
// if it's a major release behind, visual and logged
@@ -1620,6 +1626,7 @@ function is_not_null($string) {
* @param $options
* @param $singulars
* @return array
+ * @since 1.7.0
*/
function elgg_normalise_plural_options_array($options, $singulars) {
foreach ($singulars as $singular) {
@@ -1659,7 +1666,7 @@ function full_url() {
* Useful function found in the comments on the PHP man page for ip2long.
* Returns 1 if an IP matches a given range.
*
- * TODO: Check licence... assuming this is PD since it was found several places on the interwebs..
+ * @todo Check licence... assuming this is PD since it was found several places on the interwebs..
* please check or rewrite.
*
* Matches:
@@ -1832,7 +1839,7 @@ interface Friendable {
* @param array $parts Associative array of URL components like parse_url() returns
* @param bool $htmlencode HTML Encode the url?
* @return str Full URL
- * @since 1.7
+ * @since 1.7.0
*/
function elgg_http_build_url(array $parts, $html_encode = TRUE) {
// build only what's given to us.
@@ -1858,7 +1865,7 @@ function elgg_http_build_url(array $parts, $html_encode = TRUE) {
* @param str $link Full action URL
* @param bool $htmlencode html encode the url?
* @return str URL with action tokens
- * @since 1.7
+ * @since 1.7.0
*/
function elgg_add_action_tokens_to_url($url, $html_encode = TRUE) {
$components = parse_url($url);
@@ -1897,6 +1904,7 @@ function elgg_validate_action_url($url) {
* @param string $url
* @param string $element
* @return string
+ * @since 1.7.0
*/
function elgg_http_remove_url_query_element($url, $element) {
$url_array = parse_url($url);
@@ -1924,6 +1932,7 @@ function elgg_http_remove_url_query_element($url, $element) {
* @param str $url
* @param array $elements k/v pairs.
* @return str
+ * @since 1.7.0
*/
function elgg_http_add_url_query_elements($url, array $elements) {
$url_array = parse_url($url);
@@ -2100,7 +2109,7 @@ function elgg_set_active_sticky_form($form_name) {
*
* @param str $setting
* @return int
- * @since 1.7
+ * @since 1.7.0
* @link http://www.php.net/manual/en/function.ini-get.php
*/
function elgg_get_ini_setting_in_bytes($setting) {
@@ -2416,7 +2425,7 @@ define('ACCESS_PUBLIC', 2);
define('ACCESS_FRIENDS', -2);
/**
- * @since 1.7
+ * @since 1.7.0
*/
define('ELGG_ENTITIES_ANY_VALUE', NULL);
define('ELGG_ENTITIES_NO_VALUE', 0);