Changeset 95fcc33 in github


Ignore:
Timestamp:
Sep 21, 2008 6:18:28 AM (5 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
e93e54f
Parents:
e2c610e
Message:

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

Location:
program
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • program/include/html.php

    rf5d3769 r95fcc33  
    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     * 
  • program/steps/addressbook/func.inc

    re2c610e r95fcc33  
    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 
  • program/steps/mail/func.inc

    re2c610e r95fcc33  
    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 
  • program/steps/settings/identities.inc

    re2c610e r95fcc33  
    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.