Changeset 1871 in subversion


Ignore:
Timestamp:
Sep 21, 2008 6:18:28 AM (5 years ago)
Author:
thomasb
Message:

Separate method to create iframe tags (with a list of allowed attributes)

Location:
trunk/roundcubemail/program
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/html.php

    r1869 r1871  
    182182 
    183183    /** 
     184     * Derrived method to create <iframe></iframe> 
     185     * 
     186     * @param mixed Hash array with tag attributes or string with frame source (src) 
     187     * @return string HTML code 
     188     * @see html::tag() 
     189     */ 
     190    public static function iframe($attr = null, $cont = null) 
     191    { 
     192        if (is_string($attr)) { 
     193            $attr = array('src' => $attr); 
     194        } 
     195        return self::tag('iframe', $attr, $cont, array_merge(self::$common_attrib, array('src','name','width','height','border','frameborder'))); 
     196    } 
     197 
     198    /** 
    184199     * Derrived method for line breaks 
    185200     * 
  • trunk/roundcubemail/program/steps/addressbook/func.inc

    r1870 r1871  
    157157  $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif'); 
    158158 
    159   return html::tag('iframe', $attrib); 
     159  return html::iframe($attrib); 
    160160  } 
    161161 
  • trunk/roundcubemail/program/steps/mail/func.inc

    r1870 r1871  
    409409  $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif'); 
    410410 
    411   return html::tag('iframe', $attrib); 
     411  return html::iframe($attrib); 
    412412  } 
    413413 
     
    11261126  $ctype_primary = strtolower($part->ctype_primary); 
    11271127 
    1128   $attrib['src'] = Q('./?'.str_replace('_frame=', ($ctype_primary=='text' ? '_show=' : '_preload='), $_SERVER['QUERY_STRING'])); 
    1129  
    1130   return html::tag('iframe', $attrib); 
     1128  $attrib['src'] = './?' . str_replace('_frame=', ($ctype_primary=='text' ? '_show=' : '_preload='), $_SERVER['QUERY_STRING']); 
     1129 
     1130  return html::iframe($attrib); 
    11311131  } 
    11321132 
  • trunk/roundcubemail/program/steps/settings/identities.inc

    r1870 r1871  
    3737  $OUTPUT->set_env('contentframe', $attrib['name']); 
    3838 
    39   return html::tag('iframe', $attrib); 
     39  return html::iframe($attrib); 
    4040  } 
    4141 
Note: See TracChangeset for help on using the changeset viewer.