]> git.mxchange.org Git - friendica.git/blobdiff - include/identity.php
Added some documentation
[friendica.git] / include / identity.php
index a9d0963e6c22ac676145116322c539291ed46126..fdd28f81ce40f4f3f2bee76b5a9f826ef54113d8 100644 (file)
@@ -181,6 +181,11 @@ function get_profiledata_by_nick($nickname, $uid = 0, $profile = 0) {
  * @return HTML string stuitable for sidebar inclusion
  * 
  * @note Returns empty string if passed $profile is wrong type or not populated
+ * 
+ * @hooks 'profile_sidebar_enter'
+ *      array $profile - profile data
+ * @hooks 'profile_sidebar'
+ *      array $arr
  */
 function profile_sidebar($profile, $block = 0) {
        $a = get_app();
@@ -295,6 +300,7 @@ function profile_sidebar($profile, $block = 0) {
                $account_type = "";
 
        if((x($profile,'address') == 1)
+                       || (x($profile,'location') == 1)
                        || (x($profile,'locality') == 1)
                        || (x($profile,'region') == 1)
                        || (x($profile,'postal-code') == 1)
@@ -361,8 +367,10 @@ function profile_sidebar($profile, $block = 0) {
        if (isset($p["about"]))
                $p["about"] = bbcode($p["about"]);
 
-       if (isset($p["location"]))
-               $p["location"] = bbcode($p["location"]);
+       if (isset($p["address"]))
+               $p["address"] = bbcode($p["address"]);
+       else
+               $p["address"] = bbcode($p["location"]);
 
        if (isset($p["photo"]))
                $p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL);