Aleksander Machniak
2015-08-10 cb4149cc6cf9d440d07b389591954b4b03a1f82f
Merge branch 'master' of github.com:roundcube/roundcubemail
6 files modified
50 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
plugins/password/drivers/cpanel.php 32 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_vcard.php 5 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_washtml.php 3 ●●●●● patch | view | raw | blame | history
program/localization/index.inc 1 ●●●● patch | view | raw | blame | history
tests/Framework/Washtml.php 8 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -37,6 +37,7 @@
- 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
-------------
plugins/password/drivers/cpanel.php
@@ -49,20 +49,16 @@
        $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)
    {
@@ -75,13 +71,21 @@
        $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;
    }
}
program/lib/Roundcube/rcube_vcard.php
@@ -124,11 +124,6 @@
            $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];
program/lib/Roundcube/rcube_washtml.php
@@ -174,6 +174,9 @@
    {
        $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];
program/localization/index.inc
@@ -149,6 +149,7 @@
  'ml' => 'ml_IN',
  'ml_ML' => 'ml_IN',
  'pl' => 'pl_PL',
  'tr' => 'tr_TR',
  'tw' => 'zh_TW',
  'si' => 'si_LK',
  'sl' => 'sl_SI',
tests/Framework/Washtml.php
@@ -182,6 +182,14 @@
        $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");
    }
    /**