Cut dependencies to rcmail class
| | |
| | | */ |
| | | public function validate(&$save_data, $autofix = false) |
| | | { |
| | | $rcmail = rcmail::get_instance(); |
| | | $rcmail = rcube::get_instance(); |
| | | |
| | | // check validity of email addresses |
| | | foreach ($this->get_col_values('email', $save_data, true) as $email) { |
| | |
| | | */ |
| | | public static function compose_display_name($contact, $full_email = false) |
| | | { |
| | | $contact = rcmail::get_instance()->plugins->exec_hook('contact_displayname', $contact); |
| | | $contact = rcube::get_instance()->plugins->exec_hook('contact_displayname', $contact); |
| | | $fn = $contact['name']; |
| | | |
| | | if (!$fn) // default display name composition according to vcard standard |
| | |
| | | static $compose_mode; |
| | | |
| | | if (!isset($compose_mode)) // cache this |
| | | $compose_mode = rcmail::get_instance()->config->get('addressbook_name_listing', 0); |
| | | $compose_mode = rcube::get_instance()->config->get('addressbook_name_listing', 0); |
| | | |
| | | if ($compose_mode == 3) |
| | | $fn = join(' ', array($contact['surname'] . ',', $contact['firstname'], $contact['middlename'])); |
| | |
| | | */ |
| | | public function register_task($task, $owner) |
| | | { |
| | | // tasks are irrelevant in framework mode |
| | | if (!class_exists('rcmail', false)) |
| | | return true; |
| | | |
| | | if ($task != asciiwords($task)) { |
| | | rcube::raise_error(array('code' => 526, 'type' => 'php', |
| | | 'file' => __FILE__, 'line' => __LINE__, |