| | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | +-----------------------------------------------------------------------+ |
| | | |
| | | $Id$ |
| | | |
| | | */ |
| | | */ |
| | | |
| | | |
| | | /** |
| | |
| | | if (preg_match('/Revision:\s(\d+)/', @shell_exec('svn info'), $regs)) |
| | | $ver .= ' [SVN r'.$regs[1].']'; |
| | | } |
| | | else if (is_file(INSTALL_PATH . '.git/index')) { |
| | | if (preg_match('/Date:\s+([^\n]+)/', @shell_exec('git log -1'), $regs)) { |
| | | if ($date = date('Ymd.Hi', strtotime($regs[1]))) { |
| | | $ver .= ' [GIT '.$date.']'; |
| | | } |
| | | } |
| | | } |
| | | $content = html::quote($ver); |
| | | } |
| | | else if ($object == 'steptitle') { |
| | |
| | | array($this, 'file_callback'), $output); |
| | | |
| | | // trigger hook with final HTML content to be sent |
| | | $hook = rcmail::get_instance()->plugins->exec_hook("send_page", array('content' => $output)); |
| | | $hook = $this->app->plugins->exec_hook("send_page", array('content' => $output)); |
| | | if (!$hook['abort']) { |
| | | if ($this->charset != RCMAIL_CHARSET) { |
| | | echo rcube_charset::convert($hook['content'], RCMAIL_CHARSET, $this->charset); |
| | |
| | | */ |
| | | protected function file_callback($matches) |
| | | { |
| | | $file = $matches[3]; |
| | | $file = $matches[3]; |
| | | |
| | | // correct absolute paths |
| | | if ($file[0] == '/') { |
| | | $file = $this->base_path . $file; |
| | | if ($file[0] == '/') { |
| | | $file = $this->base_path . $file; |
| | | } |
| | | |
| | | // add file modification timestamp |
| | | if (preg_match('/\.(js|css)$/', $file)) { |
| | | if (preg_match('/\.(js|css)$/', $file)) { |
| | | if ($fs = @filemtime($file)) { |
| | | $file .= '?s=' . $fs; |
| | | } |
| | | } |
| | | |
| | | return $matches[1] . '=' . $matches[2] . $file . $matches[4]; |
| | | return $matches[1] . '=' . $matches[2] . $file . $matches[4]; |
| | | } |
| | | |
| | | |
| | |
| | | 'GB2312' => 'GB2312 ('.$this->app->gettext('chinese').')', |
| | | ); |
| | | |
| | | if (!empty($_POST['_charset'])) |
| | | $set = $_POST['_charset']; |
| | | else if (!empty($attrib['selected'])) |
| | | $set = $attrib['selected']; |
| | | else |
| | | $set = $this->get_charset(); |
| | | if (!empty($_POST['_charset'])) { |
| | | $set = $_POST['_charset']; |
| | | } |
| | | else if (!empty($attrib['selected'])) { |
| | | $set = $attrib['selected']; |
| | | } |
| | | else { |
| | | $set = $this->get_charset(); |
| | | } |
| | | |
| | | $set = strtoupper($set); |
| | | if (!isset($charsets[$set])) |
| | | $charsets[$set] = $set; |
| | | $set = strtoupper($set); |
| | | if (!isset($charsets[$set])) { |
| | | $charsets[$set] = $set; |
| | | } |
| | | |
| | | $select = new html_select($field_attrib); |
| | | $select->add(array_values($charsets), array_keys($charsets)); |