Merge branch 'master' of github.com:roundcube/roundcubemail
| | |
| | | - Fix error when using back button after sending an email (#1490009) |
| | | - Fix removing signature when switching to identity with an empty sig in HTML mode (#1490470) |
| | | - Disable links list generation on html-to-text conversion of identities or composed message (#1490437) |
| | | - Fix "washing" of style elements wrapped into many lines |
| | | |
| | | RELEASE 1.1.2 |
| | | ------------- |
| | |
| | | $this->xmlapi->set_output('json'); |
| | | $this->xmlapi->set_debug(0); |
| | | |
| | | if ($this->setPassword($_SESSION['username'], $newpass)) { |
| | | return PASSWORD_SUCCESS; |
| | | } |
| | | else { |
| | | return PASSWORD_ERROR; |
| | | } |
| | | return $this->setPassword($_SESSION['username'], $newpass); |
| | | } |
| | | |
| | | /** |
| | | * Change email account password |
| | | * |
| | | * Returns true on success or false on failure. |
| | | * @param string $password email account password |
| | | * @return bool |
| | | * @param string $address Email address/username |
| | | * @param string $password Email account password |
| | | * |
| | | * @return int|array Operation status |
| | | */ |
| | | function setPassword($address, $password) |
| | | { |
| | |
| | | |
| | | $data['password'] = $password; |
| | | |
| | | $query = $this->xmlapi->api2_query($this->cuser, 'Email', 'passwdpop', $data); |
| | | $query = json_decode($query, true); |
| | | $query = $this->xmlapi->api2_query($this->cuser, 'Email', 'passwdpop', $data); |
| | | $query = json_decode($query, true); |
| | | $result = $query['cpanelresult']['data'][0]; |
| | | |
| | | if ($query['cpanelresult']['data'][0]['result'] == 1) { |
| | | return true; |
| | | if ($result['result'] == 1) { |
| | | return PASSWORD_SUCCESS; |
| | | } |
| | | |
| | | return false; |
| | | if ($result['reason']) { |
| | | return array( |
| | | 'code' => PASSWORD_ERROR, |
| | | 'message' => $result['reason'], |
| | | ); |
| | | } |
| | | |
| | | return PASSWORD_ERROR; |
| | | } |
| | | } |
| | |
| | | $this->raw = self::charset_convert($this->raw, $detected_charset); |
| | | } |
| | | |
| | | // consider FN empty if the same as the primary e-mail address |
| | | if ($this->raw['FN'][0][0] == $this->raw['EMAIL'][0][0]) { |
| | | $this->raw['FN'][0][0] = ''; |
| | | } |
| | | |
| | | // find well-known address fields |
| | | $this->displayname = $this->raw['FN'][0][0]; |
| | | $this->surname = $this->raw['N'][0][0]; |
| | |
| | | { |
| | | $result = array(); |
| | | |
| | | // Remove unwanted white-space characters so regular expressions below work better |
| | | $style = preg_replace('/[\n\r\s\t]+/', ' ', $style); |
| | | |
| | | foreach (explode(';', $style) as $declaration) { |
| | | if (preg_match('/^\s*([a-z\-]+)\s*:\s*(.*)\s*$/i', $declaration, $match)) { |
| | | $cssid = $match[1]; |
| | |
| | | 'ml' => 'ml_IN', |
| | | 'ml_ML' => 'ml_IN', |
| | | 'pl' => 'pl_PL', |
| | | 'tr' => 'tr_TR', |
| | | 'tw' => 'zh_TW', |
| | | 'si' => 'si_LK', |
| | | 'sl' => 'sl_SI', |
| | |
| | | |
| | | $this->assertRegExp('|line-height: 1;|', $washed, "Untouched line-height (#1489917)"); |
| | | $this->assertRegExp('|; height: 10px|', $washed, "Fixed height units"); |
| | | |
| | | $html = "<div style=\"padding: 0px\n 20px;border:1px solid #000;\"></div>"; |
| | | $expected = "<div style=\"padding: 0px 20px; border: 1px solid #000\"></div>"; |
| | | |
| | | $washer = new rcube_washtml; |
| | | $washed = $washer->wash($html); |
| | | |
| | | $this->assertTrue(strpos($washed, $expected) !== false, "White-space and new-line characters handling"); |
| | | } |
| | | |
| | | /** |