]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/ExtendedProfile/ExtendedProfilePlugin.php
Merged
[quix0rs-gnu-social.git] / plugins / ExtendedProfile / ExtendedProfilePlugin.php
index aa456c2f9b700890103592f3a9a1dde8ec9c84ae..12541437020c7ced92cd3b73852d294d9d94a630 100644 (file)
@@ -29,7 +29,7 @@ if (!defined('STATUSNET')) {
  */
 class ExtendedProfilePlugin extends Plugin
 {
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array(
             'name' => 'ExtendedProfile',
@@ -48,11 +48,11 @@ class ExtendedProfilePlugin extends Plugin
      *
      * Hook for RouterInitialized event.
      *
-     * @param Net_URL_Mapper $m URL mapper
+     * @param URLMapper $m URL mapper
      *
      * @return boolean hook return
      */
-    function onStartInitializeRouter($m)
+    public function onStartInitializeRouter(URLMapper $m)
     {
         $m->connect(
             ':nickname/detail',
@@ -81,7 +81,8 @@ class ExtendedProfilePlugin extends Plugin
 
     function onEndShowAccountProfileBlock(HTMLOutputter $out, Profile $profile) {
         $user = User::getKV('id', $profile->id);
-        if ($user) {
+
+        if ($user instanceof User) {
             $url = common_local_url('profiledetail', array('nickname' => $user->nickname));
             // TRANS: Link text on user profile page leading to extended profile page.
             $out->element('a', array('href' => $url, 'class' => 'profiledetail'), _m('More details...'));