[Fixed syntax Tijmen de Mes **20211020130932 Ignore-this: 4d6d17aa38d757adaa47b868582e2b66 ] hunk ./library/sip_settings.php 246 - $this->url=$this->settingsPage; - if (!$this->isEmbedded()) { - $this->url.="?account=$this->account"; + $this->url=$this->settingsPage; + if (!$this->isEmbedded()) { + $this->url.="?account=$this->account"; hunk ./library/sip_settings.php 250 - $this->url.=sprintf("?1=1&realm=%s",urlencode($_REQUEST['realm'])); + $this->url.=sprintf("?1=1&realm=%s",urlencode($_REQUEST['realm'])); hunk ./library/sip_settings.php 252 - $this->url.=sprintf("&user_agent=%s",urlencode($_REQUEST['user_agent'])); + $this->url.=sprintf("&user_agent=%s",urlencode($_REQUEST['user_agent'])); hunk ./library/sip_settings.php 356 - if (!$this->isEmbedded() && $this->show_download_tab && !in_array("trunking",$this->groups)) { + if (!$this->isEmbedded() && $this->show_download_tab && !in_array("trunking",$this->groups)) { hunk ./library/sip_settings.php 874 - $this->xcap_root = rtrim($this->xcap_root,'/')."@".$this->domain."/"; + $this->xcap_root = rtrim($this->xcap_root,'/')."@".$this->domain."/"; hunk ./library/sip_settings.php 916 - $this->showAboveTabs(); + $this->showAboveTabs(); hunk ./library/sip_settings.php 918 - $this->showUnderTabs(); + $this->showUnderTabs(); hunk ./library/sip_settings.php 932 - $this->chapterTableStop(); + $this->chapterTableStop(); hunk ./library/sip_settings.php 1393 - dprint("is reseller"); - $this->sms_changes_allowed = true; + dprint("is reseller"); + $this->sms_changes_allowed = true; hunk ./library/sip_settings.php 2058 - if ($_REQUEST['task'] == 'upload') { + if ($_REQUEST['task'] == 'upload') { hunk ./library/sip_settings.php 2161 - if ($this->login_type != 'subscriber' && $_REQUEST['task'] == 'delete_identity_proof' && $_REQUEST['confirm']) { + if ($this->login_type != 'subscriber' && $_REQUEST['task'] == 'delete_identity_proof' && $_REQUEST['confirm']) { hunk ./library/sip_settings.php 2192 - hunk ./library/sip_settings.php 2196 - if (!in_array("payments",$this->groups)) { + if (!in_array("payments",$this->groups)) { hunk ./library/sip_settings.php 2201 - printf ("%s%s%s%s%s%s%s", - _("Name"), - _("Document"), - _("Type"), - _("Size"), - _("Date"), - _("Last digits"), - _("Mobile Number") + printf( + "%s%s%s%s%s%s%s", + _("Name"), + _("Document"), + _("Type"), + _("Size"), + _("Date"), + _("Last digits"), + _("Mobile Number") hunk ./library/sip_settings.php 2212 - if ($this->login_type != 'subscriber') { + if ($this->login_type != 'subscriber') { hunk ./library/sip_settings.php 2224 - printf (" %s%s %s %s KB %s%s%s", - $this->db->f('name'), - $download_url, - $this->db->f('file_name'), - $this->db->f('file_type'), - number_format($this->db->f('file_size')/1024,2), - $this->db->f('file_date'), - $this->db->f('last_digits'), - $this->db->f('mobile_number') + printf( + " %s%s %s %s KB %s%s%s", + $this->db->f('name'), + $download_url, + $this->db->f('file_name'), + $this->db->f('file_type'), + number_format($this->db->f('file_size')/1024,2), + $this->db->f('file_date'), + $this->db->f('last_digits'), + $this->db->f('mobile_number') hunk ./library/sip_settings.php 2236 - if ($this->login_type != 'subscriber') { + if ($this->login_type != 'subscriber') { hunk ./library/sip_settings.php 2239 - printf ("%s",$delete_url,_("Confirm")); + printf("%s", $delete_url, _("Confirm")); hunk ./library/sip_settings.php 2242 - printf ("%s",$delete_url,$this->delete_img); + printf("%s", $delete_url, $this->delete_img); hunk ./library/sip_settings.php 2246 - printf (""); + printf(""); hunk ./library/sip_settings.php 2357 - hunk ./library/sip_settings.php 2359 - $query=sprintf("select * from subscriber_docs + $query = sprintf("select * from subscriber_docs hunk ./library/sip_settings.php 2794 - $did_processor->createOrder($data); + $did_processor->createOrder($data); hunk ./library/sip_settings.php 2813 - hunk ./library/sip_settings.php 2827 - $did_processor->renewOrder($data); + $did_processor->renewOrder($data); hunk ./library/sip_settings.php 2833 - hunk ./library/sip_settings.php 2834 - $chapter=sprintf(_("Cancel Number")); + $chapter = sprintf(_("Cancel Number")); hunk ./library/sip_settings.php 2850 - hunk ./library/sip_settings.php 2851 - $chapter=sprintf(_("Register New Number")); + $chapter = sprintf(_("Register New Number")); hunk ./library/sip_settings.php 3027 - printf (_("Download and install %s preconfigured with your SIP account:"), $this->blink_download_url, $this->show_download_tab); + printf(_("Download and install %s preconfigured with your SIP account:"), $this->blink_download_url, $this->show_download_tab); hunk ./library/sip_settings.php 3030 - printf (" - - - - - + printf( + " + + + + + + ", + rand(), + $this->blink_download_url, + rawurlencode(json_encode($_account)) + ); + print ""; + + } else { + print ""; + + print "

"; + printf( + _("To download %s visit %s"), + $this->show_download_tab, + $this->blink_download_url, + $this->blink_download_url + ); + print ""; + } + + print ""; + + printf( + _("If you have already installed %s, you can configure it to use your SIP account:"), + $this->show_download_tab + ); + + print ""; + print ""; + + printf( + " + + + + + hunk ./library/sip_settings.php 3076 - $this->blink_download_url, - rawurlencode(json_encode($_account)) - ); - print ""; - - } else { - print ""; - - print "

"; - printf (_("To download %s visit %s"),$this->show_download_tab, $this->blink_download_url, $this->blink_download_url); - print ""; - } - - print ""; - - printf (_("If you have already installed %s, you can configure it to use your SIP account:"), $this->show_download_tab); - - print ""; - print ""; - - printf (" - - - - - - ", - rand(), - $this->show_download_tab, - urlencode(json_encode($_account)) + $this->show_download_tab, + urlencode(json_encode($_account)) hunk ./library/sip_settings.php 4090 - $rpid=trim($rpid); + $rpid=trim($rpid); hunk ./library/sip_settings.php 4138 - if (in_array($key,$this->groups) && !$val) { - if ($this->quota) { + if (in_array($key,$this->groups) && !$val) { + if ($this->quota) { hunk ./library/sip_settings.php 4147 - if (!$this->prepaid_changes_allowed) { + if (!$this->prepaid_changes_allowed) { hunk ./library/sip_settings.php 4153 - if (!in_array($key,$this->groups) && $val) { - $this->setPreference('last_sip_quota',strval($this->quota)); + if (!in_array($key,$this->groups) && $val) { + $this->setPreference('last_sip_quota',strval($this->quota)); hunk ./library/sip_settings.php 4245 - $newACLarray[]=$_grp; + $newACLarray[]=$_grp; hunk ./library/sip_settings.php 4286 - if ($this->store_clear_text_passwords) { - $result->password=$sip_password; + if ($this->store_clear_text_passwords) { + $result->password=$sip_password; hunk ./library/sip_settings.php 4321 - + hunk ./library/sip_settings.php 4413 - - $result->properties=$this->properties; - - if (!$result->quota) $result->quota=0; + $result->properties=$this->properties; + + if (!$result->quota) $result->quota=0; hunk ./library/sip_settings.php 4585 - $this->diversions=$diversions; + $this->diversions=$diversions; hunk ./library/sip_settings.php 4715 - $diversions[$key]=$this->diversions[$key]; + $diversions[$key]=$this->diversions[$key]; hunk ./library/sip_settings.php 4721 - $diversions['nocondition']='empty'; + $diversions['nocondition']='empty'; hunk ./library/sip_settings.php 4726 - $result = $this->SipPort->setCallDiversions($this->sipId,$diversions); + $result = $this->SipPort->setCallDiversions($this->sipId,$diversions); hunk ./library/sip_settings.php 4732 - printf ("

Error (SipPort): %s (%s): %s",$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); + printf( + "

Error (SipPort): %s (%s): %s", + $error_msg, + $error_fault->detail->exception->errorcode, + $error_fault->detail->exception->errorstring + ); hunk ./library/sip_settings.php 4775 - $password=$this->RandomPassword(); - - $_account = array("sipId" => $this->sipId, - "name" => $this->fullName, - "password" => $password, - "email" => $this->email, - "options" => array("delete"=>1) - + $password = $this->RandomPassword(); + + $_account = array( + "sipId" => $this->sipId, + "name" => $this->fullName, + "password" => $password, + "email" => $this->email, + "options" => array("delete" => 1) hunk ./library/sip_settings.php 4786 - $result = $this->VoicemailPort->addAccount($_account); + $result = $this->VoicemailPort->addAccount($_account); hunk ./library/sip_settings.php 7512 - - hunk ./library/sip_settings.php 7526 - dprint ("SipSettings->deleteAccount($this->account, $this->email)"); + dprint("SipSettings->deleteAccount($this->account, $this->email)"); hunk ./library/sip_settings.php 7541 - $subject = sprintf("Removal of SIP account %s",$this->account); + $subject = sprintf("Removal of SIP account %s", $this->account); hunk ./library/sip_settings.php 7544 - $this->expire_date = date("Y-m-d H:i:s",strtotime("+2 days")); + $this->expire_date = date("Y-m-d H:i:s", strtotime("+2 days")); hunk ./library/sip_settings.php 7582 - $mime->setHTMLBody($bodyhtml); + $mime->setHTMLBody($bodyhtml); hunk ./library/sip_settings.php 7592 - $this->Preferences['account_delete_request']=1; + $this->Preferences['account_delete_request'] = 1; hunk ./library/sip_settings.php 7596 - printf (_("Removal email has been sent to %s"), $this->email); + printf(_("Removal email has been sent to %s"), $this->email); hunk ./library/sip_settings.php 7603 - dprint ("SipSettings->sendEmail($this->email)"); + dprint("SipSettings->sendEmail($this->email)"); hunk ./library/sip_settings.php 7618 - $subject = sprintf("SIP Account settings %s",$this->account); + $subject = sprintf("SIP Account settings %s", $this->account); hunk ./library/sip_settings.php 7644 - if (in_array("free-pstn",$this->groups)) $this->allowPSTN=1; // used by smarty + if (in_array("free-pstn", $this->groups)) $this->allowPSTN=1; // used by smarty hunk ./library/sip_settings.php 7675 - $mime->setHTMLBody($bodyhtml); + $mime->setHTMLBody($bodyhtml); hunk ./library/sip_settings.php 7698 - dprint ("SipSettings->sendChangedEmail($this->email)"); + dprint("SipSettings->sendChangedEmail($this->email)"); hunk ./library/sip_settings.php 7756 - $mime->setHTMLBody($bodyhtml); + $mime->setHTMLBody($bodyhtml); hunk ./library/sip_settings.php 7772 - hunk ./library/sip_settings.php 7773 - $subject=sprintf ("The account %s was removed from IP Address: %s",$this->account, $this->ip); + $subject = sprintf("The account %s was removed from IP Address: %s",$this->account, $this->ip); hunk ./library/sip_settings.php 7776 - hunk ./library/sip_settings.php 7779 - dprint ("SipSettings->sendPasswordEmail($this->email)"); + dprint("SipSettings->sendPasswordEmail($this->email)"); hunk ./library/sip_settings.php 7791 - $this->expire=date("Y-m-d H:i:s",strtotime("+30 minutes")); - $query=sprintf("insert into memcache set `key`='email_%s', `value`='%s', `expire`='%s'", - $identifier, - json_encode($insert_data), - $this->expire ); + $this->expire = date("Y-m-d H:i:s",strtotime("+30 minutes")); + $query = sprintf( + "insert into memcache set `key`='email_%s', `value`='%s', `expire`='%s'", + $identifier, + json_encode($insert_data), + $this->expire + ); hunk ./library/sip_settings.php 7811 - $subject = sprintf("Password reset for %s",$this->account); + $subject = sprintf("Password reset for %s", $this->account); hunk ./library/sip_settings.php 7856 - dprint ("checkSettings()"); + dprint("checkSettings()"); hunk ./library/sip_settings.php 7859 - ${$el}=trim($_REQUEST[$el]); + ${$el} = trim($_REQUEST[$el]); hunk ./library/sip_settings.php 7863 - $this->error=_("Invalid Expiration Period"); + $this->error = _("Invalid Expiration Period"); hunk ./library/sip_settings.php 7868 - $this->error=_("Invalid Quota"); + $this->error = _("Invalid Quota"); hunk ./library/sip_settings.php 7873 - $this->error=_("Missing Timezone"); + $this->error = _("Missing Timezone"); hunk ./library/sip_settings.php 7878 - $this->error=_("Invalid E-mail Address"); + $this->error = _("Invalid E-mail Address"); hunk ./library/sip_settings.php 7882 - $rpid=preg_replace("/[^0-9\x]/","",$rpid); - - if (preg_match("/^0+([1-9]\d*)$/",$rpid,$m)) $rpid=$m[1]; - - $quickdial=preg_replace("/[^0-9]/","",$quickdial); - - if (!strlen($accept_temporary_group)) $accept_temporary_remain=0; - if (!$accept_temporary_remain) $accept_temporary_group=""; - if (!$anonymous) $anonymous="0"; + $rpid = preg_replace("/[^0-9\x]/", "", $rpid); + + if (preg_match("/^0+([1-9]\d*)$/", $rpid, $m)) $rpid=$m[1]; + + $quickdial = preg_replace("/[^0-9]/", "", $quickdial); + + if (!strlen($accept_temporary_group)) $accept_temporary_remain = 0; + if (!$accept_temporary_remain) $accept_temporary_group = ""; + if (!$anonymous) $anonymous = "0";