Aleksander Machniak
2016-04-12 a0f38f5fd87ca6e5a5cab916e48c15877d52b3b1
Small code style improvements
3 files modified
28 ■■■■■ changed files
program/include/rcmail.php 10 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/html.php 16 ●●●●● patch | view | raw | blame | history
tests/Framework/LdapGeneric.php 2 ●●● patch | view | raw | blame | history
program/include/rcmail.php
@@ -2171,7 +2171,7 @@
    /**
     * Returns supported font-family specifications
     *
     * @param string $font  Font name
     * @param string $font Font name
     *
     * @param string|array Font-family specification array or string (if $font is used)
     */
@@ -2203,8 +2203,8 @@
    /**
     * Create a human readable string for a number of bytes
     *
     * @param int    Number of bytes
     * @param string Size unit
     * @param int    $bytes Number of bytes
     * @param string &$unit Size unit
     *
     * @return string Byte string
     */
@@ -2235,7 +2235,7 @@
    /**
     * Returns real size (calculated) of the message part
     *
     * @param rcube_message_part  Message part
     * @param rcube_message_part $part Message part
     *
     * @return string Part size (and unit)
     */
@@ -2319,6 +2319,8 @@
     * Get resource file content (with assets_dir support)
     *
     * @param string $name File name
     *
     * @return string File content
     */
    public function get_resource_content($name)
    {
program/lib/Roundcube/html.php
@@ -25,14 +25,15 @@
class html
{
    protected $tagname;
    protected $content;
    protected $attrib  = array();
    protected $allowed = array();
    protected $content;
    public static $doctype = 'xhtml';
    public static $lc_tags = true;
    public static $common_attrib = array('id','class','style','title','align','unselectable','tabindex','role');
    public static $containers = array('iframe','div','span','p','h1','h2','h3','ul','form','textarea','table','thead','tbody','tr','th','td','style','script');
    public static $containers    = array('iframe','div','span','p','h1','h2','h3','ul','form','textarea','table','thead','tbody','tr','th','td','style','script');
    public static $bool_attrib   = array('checked','multiple','disabled','selected','autofocus','readonly');
    /**
@@ -279,7 +280,7 @@
    /**
     * Create string with attributes
     *
     * @param array $attrib  Associative arry with tag attributes
     * @param array $attrib  Associative array with tag attributes
     * @param array $allowed List of allowed attributes
     *
     * @return string Valid attribute string
@@ -319,8 +320,9 @@
            }
            // attributes with no value
            if (in_array($key, array('checked', 'multiple', 'disabled', 'selected', 'autofocus'))) {
            if (in_array($key, self::$bool_attrib)) {
                if ($value) {
                    // @TODO: minimize attribute in non-xhtml mode
                    $attrib_arr[] = $key . '="' . $key . '"';
                }
            }
@@ -460,7 +462,7 @@
    protected $tagname = 'input';
    protected $type    = 'hidden';
    protected $allowed = array('type','name','value','onchange','disabled','readonly');
    protected $fields_arr = array();
    protected $fields  = array();
    /**
     * Constructor
@@ -481,7 +483,7 @@
     */
    public function add($attrib)
    {
        $this->fields_arr[] = $attrib;
        $this->fields[] = $attrib;
    }
    /**
@@ -492,7 +494,7 @@
    public function show()
    {
        $out = '';
        foreach ($this->fields_arr as $attrib) {
        foreach ($this->fields as $attrib) {
            $out .= self::tag($this->tagname, array('type' => $this->type) + $attrib);
        }
tests/Framework/LdapGeneric.php
@@ -14,7 +14,7 @@
    function test_class()
    {
        // skip test if Net_LDAP3 does not exist
        if (!class_exists('Net_LDAP3')) {
        if (!@class_exists('Net_LDAP3')) {
            $this->markTestSkipped('The Net_LDAP3 package not available.');
        }