Changeset 20047 for extensions/Piwecard/include/piwecard.class.php
- Timestamp:
- Jan 10, 2013, 10:34:55 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Piwecard/include/piwecard.class.php
r20032 r20047 154 154 $query = 'DELETE FROM ' . ECARD_TABLE .' WHERE date_validity < NOW();'; 155 155 pwg_query($query); 156 } 157 158 function is_valid_email($email_address) { 159 $syntax = '#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#'; 160 161 if(preg_match($syntax, $email_address)) 162 return true; 163 else 164 return false; 156 165 } 157 166 … … 214 223 // Template informations 215 224 $template->assign('ecard', array( 216 'subject' => l10n(' ecard_subject'),217 'message' => l10n(' ecard_message'),225 'subject' => l10n('piwecard_subject'), 226 'message' => l10n('piwecard_message'), 218 227 'sender_name' => $user['username'], 219 228 'sender_email' => $user['email'], 220 'recipient_name' => l10n(' ecard_recipient_name'),221 'recipient_email' => l10n(' ecard_recipient_email'),229 'recipient_name' => l10n('piwecard_recipient_name'), 230 'recipient_email' => l10n('piwecard_recipient_email'), 222 231 'copy' => $this->my_config['sender_copy'] ? 'checked="checked"' : '', 223 232 'changemail' => (!isset($user['email']) OR $this->my_config['sender_email_change']) ? '' : 'disabled="disabled"' … … 230 239 $template->append('ecard_validity', array( 231 240 'id' => $validity, 232 'name' => ($validity == 0) ? l10n(' ecard_nolimit') : $validity.' '.l10n('ecard_days'),241 'name' => ($validity == 0) ? l10n('piwecard_nolimit') : $validity.' '.l10n('piwecard_days'), 233 242 'selected' => ($this->my_config['validity_default'] == $validity ? 'checked' : '') 234 243 ) … … 237 246 } 238 247 239 foreach ($this->my_config['email_format '] as $email_format) {248 foreach ($this->my_config['email_format_authorized'] as $email_format) { 240 249 $template->append('ecard_email_format', array( 241 250 'id' => $email_format, 242 'name' => l10n(' ecard_mail_format_'.$email_format),251 'name' => l10n('piwecard_mail_format_'.$email_format), 243 252 'selected' => (($this->my_config['email_format_default'] == $email_format) ? '' : 'checked'), 244 253 )
Note: See TracChangeset
for help on using the changeset viewer.