Changeset 950 for plugins/contribute/_admin.php
- Timestamp:
- 03/26/09 22:36:27 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/contribute/_admin.php
r909 r950 111 111 if (!empty($author)) 112 112 { 113 $str .= 113 $str .= '<p>'. 114 114 '<label class="classic" for="contribute_author">'. 115 115 __('Author:'). … … 118 118 '</p>'; 119 119 120 $mailto = ''; 120 $str .= '<p>'. 121 '<label class="classic" for="contribute_mail">'. 122 __('Email:'). 123 form::field('contribute_mail',10,255,html::escapeHTML($mail),'maximal'). 124 '</label>'; 125 126 # mailto: link 121 127 if ((!empty($mail)) && (text::isEmail($mail))) 122 128 { 123 $ mailto= '<br />'.'<a href="mailto:'.html::escapeHTML($mail).'">'.129 $str .= '<br />'.'<a href="mailto:'.html::escapeHTML($mail).'">'. 124 130 __('Send an e-mail').'</a>'; 125 131 } 126 132 127 $str .= '<p>'. 128 '<label class="classic" for="contribute_mail">'. 129 __('Email:'). 130 form::field('contribute_mail',10,255,html::escapeHTML($mail),'maximal'). 131 '</label>'. 132 $mailto. 133 '</p>'; 133 $str .= '</p>'; 134 134 135 $link = ''; 135 $str .= '<p>'. 136 '<label class="classic" for="contribute_site">'. 137 __('Web site:'). 138 form::field('contribute_site',10,255,html::escapeHTML($site),'maximal'). 139 '</label>'; 136 140 141 # display a link to the site 137 142 # prevent malformed URLs 138 143 # inspirated by /dotclear/inc/clearbricks/net.http/class.net.http.php … … 140 145 { 141 146 $parsed_url = @parse_url($site); 142 $host = (($parsed_url != false) ? '['.$parsed_url['host'].']' : ''); 143 if (!empty($host)) 147 if (($parsed_url !== false) && isset($parsed_url['host'])) 144 148 { 145 $link = '<br />'.'<a href="'.html::escapeHTML($site).'">'. 146 html::escapeHTML($host).'</a>'; 149 $str .= '<br />'.'[<a href="'.html::escapeHTML($site).'"'. 150 ' title="'.html::escapeHTML($site).'">'. 151 html::escapeHTML($parsed_url['host']).'</a>]'; 147 152 } 148 153 } 149 154 150 $str .= '<p>'. 151 '<label class="classic" for="contribute_site">'. 152 __('Web site:'). 153 form::field('contribute_site',10,255,html::escapeHTML($site),'maximal'). 154 '</label>'. 155 $link. 156 '</p>'; 155 $str .= '</p>'; 157 156 158 157 echo
Note: See TracChangeset
for help on using the changeset viewer.