Prevents warning.
[platal.git] / modules / profile.php
index f9b08fa..5a23f80 100644 (file)
@@ -318,6 +318,8 @@ class ProfileModule extends PLModule
             $opened_tab = $hrpid;
             $hrpid = $aux;
             $url_error = true;
+        } else {
+            $url_error = false;
         }
         $profile = $this->findProfile($hrpid);
         if (! ($profile instanceof Profile) && ($profile == PL_NOT_FOUND || $profile == PL_FORBIDDEN)) {
@@ -399,7 +401,7 @@ class ProfileModule extends PLModule
         $page->assign('address', array());
     }
 
-    function handler_ajax_tel(&$page, $prefid, $prefname, $telid)
+    function handler_ajax_tel(&$page, $prefid, $prefname, $telid, $subField, $mainField, $mainId)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/phone.tpl', NO_SKIN);
@@ -408,6 +410,11 @@ class ProfileModule extends PLModule
         $page->assign('telid', $telid);
         $phone = new Phone();
         $page->assign('tel', $phone->toFormArray());
+        if ($mainField) {
+            $page->assign('subField', $subField);
+            $page->assign('mainField', $mainField);
+            $page->assign('mainId', $mainId);
+        }
     }
 
     function handler_ajax_edu(&$page, $eduid, $class)