Ignore:
Timestamp:
Apr 16, 2012 7:02:21 AM (13 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo
Children:
be98dfc2
Parents:
4372e92
Message:
  • Framework refactoring (I hope it's the last one): rcube,rcmail,rcube_ui -> rcube,rcmail,rcube_utils renamed main.inc into rcube_bc.inc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_output_html.php

    r0c25968 r1aceb9c  
    7575 
    7676        // add common javascripts 
    77         $this->add_script('var '.JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top'); 
     77        $this->add_script('var '.rcmail::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top'); 
    7878 
    7979        // don't wait for page onload. Call init at the bottom of the page (delayed) 
    80         $this->add_script(JS_OBJECT_NAME.'.init();', 'docready'); 
     80        $this->add_script(rcmail::JS_OBJECT_NAME.'.init();', 'docready'); 
    8181 
    8282        $this->scripts_path = 'program/js/'; 
     
    184184    public function add_gui_object($obj, $id) 
    185185    { 
    186         $this->add_script(JS_OBJECT_NAME.".gui_object('$obj', '$id');"); 
     186        $this->add_script(rcmail::JS_OBJECT_NAME.".gui_object('$obj', '$id');"); 
    187187    } 
    188188 
     
    458458        $out = ''; 
    459459        if (!$this->framed && !empty($this->js_env)) { 
    460             $out .= JS_OBJECT_NAME . '.set_env('.self::json_serialize($this->js_env).");\n"; 
     460            $out .= rcmail::JS_OBJECT_NAME . '.set_env('.self::json_serialize($this->js_env).");\n"; 
    461461        } 
    462462        if (!empty($this->js_labels)) { 
     
    471471            $out .= sprintf( 
    472472                "%s.%s(%s);\n", 
    473                 ($parent ? 'if(window.parent && parent.'.JS_OBJECT_NAME.') parent.' : '') . JS_OBJECT_NAME, 
     473                ($parent ? 'if(window.parent && parent.'.rcmail::JS_OBJECT_NAME.') parent.' : '') . rcmail::JS_OBJECT_NAME, 
    474474                preg_replace('/^parent\./', '', $method), 
    475475                implode(',', $args) 
     
    645645                "\$this->app->config->get('\\1',get_boolean('\\3'))", 
    646646                "\$this->env['\\1']", 
    647                 "rcube_ui::get_input_value('\\1', rcube_ui::INPUT_GPC)", 
     647                "rcube_utils::get_input_value('\\1', rcube_utils::INPUT_GPC)", 
    648648                "\$_COOKIE['\\1']", 
    649649                "\$this->browser->{'\\1'}", 
     
    813813                        break; 
    814814                    case 'request': 
    815                         $value = rcube_ui::get_input_value($name, rcube_ui::INPUT_GPC); 
     815                        $value = rcube_utils::get_input_value($name, rcube_utils::INPUT_GPC); 
    816816                        break; 
    817817                    case 'session': 
     
    918918            $this->add_script(sprintf( 
    919919                "%s.register_button('%s', '%s', '%s', '%s', '%s', '%s');", 
    920                 JS_OBJECT_NAME, 
     920                rcmail::JS_OBJECT_NAME, 
    921921                $command, 
    922922                $attrib['id'], 
     
    930930            if (in_array($attrib['command'], rcmail::$main_tasks)) { 
    931931                $attrib['href']    = $this->app->url(array('task' => $attrib['command'])); 
    932                 $attrib['onclick'] = sprintf("%s.command('switch-task','%s');return false", JS_OBJECT_NAME, $attrib['command']); 
     932                $attrib['onclick'] = sprintf("%s.command('switch-task','%s');return false", rcmail::JS_OBJECT_NAME, $attrib['command']); 
    933933            } 
    934934            else if ($attrib['task'] && in_array($attrib['task'], rcmail::$main_tasks)) { 
     
    954954            $attrib['onclick'] = sprintf( 
    955955                "return %s.command('%s','%s',this)", 
    956                 JS_OBJECT_NAME, 
     956                rcmail::JS_OBJECT_NAME, 
    957957                $command, 
    958958                $attrib['prop'] 
     
    13291329        } 
    13301330 
    1331         return rcube_idn_to_utf8($username); 
     1331        return rcube_utils::idn_to_utf8($username); 
    13321332    } 
    13331333 
     
    13481348 
    13491349        // save original url 
    1350         $url = rcube_ui::get_input_value('_url', rcube_ui::INPUT_POST); 
     1350        $url = rcube_utils::get_input_value('_url', rcube_utils::INPUT_POST); 
    13511351        if (empty($url) && !preg_match('/_(task|action)=logout/', $_SERVER['QUERY_STRING'])) 
    13521352            $url = $_SERVER['QUERY_STRING']; 
     
    13981398 
    13991399        $table->add('title', html::label('rcmloginuser', html::quote($this->app->gettext('username')))); 
    1400         $table->add('input', $input_user->show(rcube_ui::get_input_value('_user', rcube_ui::INPUT_GPC))); 
     1400        $table->add('input', $input_user->show(rcube_utils::get_input_value('_user', rcube_utils::INPUT_GPC))); 
    14011401 
    14021402        $table->add('title', html::label('rcmloginpwd', html::quote($this->app->gettext('password')))); 
     
    14061406        if (is_object($input_host) && !$hide_host) { 
    14071407            $table->add('title', html::label('rcmloginhost', html::quote($this->app->gettext('server')))); 
    1408             $table->add('input', $input_host->show(rcube_ui::get_input_value('_host', rcube_ui::INPUT_GPC))); 
     1408            $table->add('input', $input_host->show(rcube_utils::get_input_value('_host', rcube_utils::INPUT_GPC))); 
    14091409        } 
    14101410 
     
    14821482            $out = $this->form_tag(array( 
    14831483                'name' => "rcmqsearchform", 
    1484                 'onsubmit' => JS_OBJECT_NAME . ".command('search');return false;", 
     1484                'onsubmit' => rcmail::JS_OBJECT_NAME . ".command('search');return false;", 
    14851485                'style' => "display:inline"), 
    14861486                $out); 
Note: See TracChangeset for help on using the changeset viewer.