Changeset 15380

Show
Ignore:
Timestamp:
03/04/08 17:57:48 (7 months ago)
Author:
flack
Message:

small spelling fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.datamanager/static/datamanager.css

    r13590 r15380  
    99/************************ External References ****************************** 
    1010 * These must go first, so that CSS is happy. 
    11  * Dont use any media Tags, IE will ignore it. 
     11 * Don't use any media Tags, IE will ignore it. 
    1212 */ 
    1313 
  • trunk/midcom/midcom.helper.datamanager2/type/parameters.php

    r14806 r15380  
    99 
    1010/** 
    11  * Datamanager 2 parameters type. This allows the editing of all parameters of  
     11 * Datamanager 2 parameters type. This allows the editing of all parameters of 
    1212 * the storage object. 
    13  *  
     13 * 
    1414 * <b>Configuration options:</b> 
    1515 * <i>headers</i> 
    1616 * Array with headernames in the same order as the row columns. 
    17  *   
     17 * 
    1818 * 
    1919 * @package midcom.helper.datamanager2 
     
    3232     */ 
    3333    var $headers = array('domain', 'name', 'value', 'delete'); 
    34      
     34 
    3535       /** 
    3636     * Set this to true if you want the keys to be exported to the csv dump instead of the 
     
    6868        // reset the rows. 
    6969        $this->rows = array(); 
    70         foreach ($this->storage->object->list_parameters() as $domain => $name)  
    71         { 
    72             $this->rows[] = array (0 => $domain,  
    73                                    1 => key($name),  
     70        foreach ($this->storage->object->list_parameters() as $domain => $name) 
     71        { 
     72            $this->rows[] = array (0 => $domain, 
     73                                   1 => key($name), 
    7474                                   2 => $name[key($name)], 
    7575                                   3 => 0); 
     
    9494         * 2 = value 
    9595         */ 
    96          
     96 
    9797        $rows = $this->rows; 
    9898        $this->rows = array(); 
    99         foreach ($rows as $key => $row )  
    100         { 
    101             if (array_key_exists(3 , $row ) && $row[3] == 1)  
     99        foreach ($rows as $key => $row ) 
     100        { 
     101            if (array_key_exists(3 , $row ) && $row[3] == 1) 
    102102            { 
    103103                $this->storage->object->delete_parameter( $row[0],$row[1]); 
    104                 unset ($this->rows[$key]);     
    105             } // only update parameters that do not have empty names or domains.  
    106             else if (trim($row[0]) != '' && trim($row[1]) != '')  
    107             { 
    108                  
     104                unset ($this->rows[$key]); 
     105            } // only update parameters that do not have empty names or domains. 
     106            else if (trim($row[0]) != '' && trim($row[1]) != '') 
     107            { 
     108 
    109109                if (! $this->storage->object->set_parameter( 
    110110                    $row[0], 
    111111                    $row[1], 
    112112                    $row[2] 
    113                 ))  
     113                )) 
    114114                { 
    115115                    echo "Could not update parameter {$row[0]} {$row[1]}!"; 
    116116                } 
    117                  
    118             }  
    119         } 
    120          
     117 
     118            } 
     119        } 
     120 
    121121        $this->convert_from_storage(true); 
    122122        return; 
    123          
     123 
    124124    } 
    125125 
     
    172172 
    173173    /** 
    174      * The validation callback ensures that we dont't have an array or an object 
     174     * The validation callback ensures that we don't have an array or an object 
    175175     * as a value, which would be wrong. 
    176176     * 
     
    185185    { 
    186186        $table = "<table border='0' cellspacing='0' ><tr>"; 
    187         foreach ($this->headers as $header )  
     187        foreach ($this->headers as $header ) 
    188188        { 
    189189            $table .= "<td>{$header}</td>\n"; 
    190190        } 
    191191        $table .= "</tr>\n"; 
    192         foreach ($this->rows as $key => $row)  
     192        foreach ($this->rows as $key => $row) 
    193193        { 
    194194            $table .= "<tr>\n"; 
    195             foreach ($row as $row_key => $value )  
     195            foreach ($row as $row_key => $value ) 
    196196            { 
    197197                $table .= "<td>{$value}</td>\n"; 
    198198            } 
    199199        } 
    200         $table .= "</tr>\n";     
    201          
     200        $table .= "</tr>\n"; 
     201 
    202202        return $table; 
    203203    } 
  • trunk/midcom/midcom.helper.datamanager2/type/php.php

    r14974 r15380  
    2323     */ 
    2424    var $value = ''; 
    25      
     25 
    2626    var $code_valid = true; 
    2727    var $code_valid_errors = array(); 
     
    3131        $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL . '/midcom.helper.datamanager2/codepress/codepress.js'); 
    3232        $_MIDCOM->add_jsonload("if(typeof {$this->name} != 'undefined'){{$this->name}.toggleReadOnly()}"); 
    33          
     33 
    3434        return true; 
    3535    } 
     
    4444        // Normalize line breaks to the UNIX format 
    4545        $this->value = preg_replace("/\n\r|\r\n|\r/", "\n", $this->value); 
    46          
     46 
    4747        return $this->value; 
    4848    } 
     
    5959 
    6060    /** 
    61      * The validation callback ensures that we dont't have an array or an object 
     61     * The validation callback ensures that we don't have an array or an object 
    6262     * as a value, which would be wrong. 
    6363     * 
     
    7474            return false; 
    7575        } 
    76          
     76 
    7777        /* bergie says this segfaults 
    7878        if (function_exists('parsekit_compile_string')) 
     
    8181            $errors = array(); 
    8282            parsekit_compile_string("?>{$this->value}", $errors, PARSEKIT_QUIET); 
    83              
     83 
    8484            if (!empty($errors)) 
    8585            { 
     
    9292                    } 
    9393                } 
    94      
     94 
    9595                if (count($parse_errors) > 0) 
    9696                { 
     
    105105                } 
    106106            } 
    107              
     107 
    108108            debug_pop(); 
    109109            return true; 
  • trunk/midcom/midcom.helper.datamanager2/type/select.php

    r15104 r15380  
    196196     */ 
    197197    var $multiple_storagemode = 'serialized'; 
    198      
     198 
    199199    /** 
    200200     * Glue that will be used for separating the keys 
    201      *  
     201     * 
    202202     * @var string 
    203203     * @access public 
     
    647647 
    648648    /** 
    649      * The validation callback ensures that we dont't have an array or an object 
     649     * The validation callback ensures that we don't have an array or an object 
    650650     * as a value, which would be wrong. 
    651651     * 
     
    667667            return false; 
    668668        } 
    669          
     669 
    670670        /*if (   ! $this->required 
    671671            && count($this->selection) == 1) 
  • trunk/midcom/midcom.helper.datamanager2/type/table.php

    r14329 r15380  
    161161 
    162162    /** 
    163      * The validation callback ensures that we dont't have an array or an object 
     163     * The validation callback ensures that we don't have an array or an object 
    164164     * as a value, which would be wrong. 
    165165     * 
  • trunk/midcom/midcom.helper.datamanager2/type/tagselect.php

    r14806 r15380  
    6464     */ 
    6565    var $force_rendering_from_tag_library = false; 
    66      
     66 
    6767    /** 
    6868     * This flag controls whether we require tags found with net_nehmer_tag 
     
    7373     */ 
    7474    var $must_exist_also_in_callback = false; 
    75      
     75 
    7676    /** 
    7777     * The arguments to pass to the option callback constructor. 
     
    119119        { 
    120120            $classname = $this->option_callback; 
    121              
     121 
    122122            if (! class_exists($classname)) 
    123123            { 
     
    141141                return false; 
    142142            } 
    143              
     143 
    144144            $this->_callback = new $classname($this->option_callback_args); 
    145145            $this->_callback->set_type($this); 
    146              
     146 
    147147            debug_add("classname: {$classname}"); 
    148              
     148 
    149149            $this->use_tag_library = false; 
    150150        } 
     
    152152        { 
    153153            $this->use_tag_library = true; 
    154              
     154 
    155155            $this->_data_template = array( 
    156156                'id' => '', 
     
    158158                'color' => '8596b6' 
    159159            ); 
    160              
     160 
    161161            $_MIDCOM->load_library('net.nemein.tag'); 
    162162        } 
    163          
     163 
    164164        $this->allow_multiple = true; 
    165165        $this->multiple_storagemode = 'array'; 
    166          
     166 
    167167        if (!is_array($this->option_callback_args)) 
    168168        { 
    169169            $this->option_callback_args = array(); 
    170170        } 
    171          
     171 
    172172        // debug_add("this->allow_multiple: {$this->allow_multiple}"); 
    173173        // debug_add("this->multiple_storagemode: {$this->multiple_storagemode}"); 
     
    175175        // debug_add("this->use_tag_library: {$this->use_tag_library}"); 
    176176        // debug_add("this->force_saving_to_tag_library: {$this->force_saving_to_tag_library}"); 
    177                                          
     177 
    178178        debug_pop(); 
    179179        return true; 
     
    190190        debug_push_class(__CLASS__, __FUNCTION__); 
    191191        $key = (string) $key; 
    192          
     192 
    193193        debug_add("key: {$key}"); 
    194          
     194 
    195195        if (! $this->key_exists($key)) 
    196196        { 
     
    201201            } 
    202202        } 
    203          
     203 
    204204        if (   $this->use_tag_library 
    205205            || $this->force_rendering_from_tag_library) 
     
    208208            return $key; 
    209209        } 
    210          
     210 
    211211        if ($this->option_callback === null) 
    212212        { 
     
    216216        } 
    217217        else 
    218         {             
     218        { 
    219219            debug_add("get from callback"); 
    220220            debug_pop(); 
     
    222222        } 
    223223    } 
    224      
     224 
    225225    /** 
    226226     * Returns the data for a given key. 
     
    233233        debug_push_class(__CLASS__, __FUNCTION__); 
    234234        $key = (string) $key; 
    235          
     235 
    236236        debug_add("key: {$key}"); 
    237          
     237 
    238238        if (! $this->key_exists($key)) 
    239239        { 
     
    241241            { 
    242242                debug_add("Key not found and corr.opt enabled"); 
    243                  
     243 
    244244                debug_pop(); 
    245245                return null; 
    246246            } 
    247247        } 
    248          
     248 
    249249        if (   $this->use_tag_library 
    250250            || $this->force_rendering_from_tag_library) 
     
    254254            $data['id'] = $key; 
    255255            $data['name'] = $key; 
    256              
     256 
    257257            debug_print_r("tag_lib data:", $data); 
    258              
    259             debug_pop();         
    260             return $data;  
    261         } 
    262          
     258 
     259            debug_pop(); 
     260            return $data; 
     261        } 
     262 
    263263        if ($this->option_callback === null) 
    264264        { 
     
    277277            return $data; 
    278278        } 
    279     }     
    280      
     279    } 
     280 
    281281    /** 
    282282     * Checks, whether the given key is known. 
     
    289289        debug_push_class(__CLASS__, __FUNCTION__); 
    290290        $key = (string) $key; 
    291          
     291 
    292292        debug_add("key: {$key}"); 
    293          
     293 
    294294        if (   $this->use_tag_library 
    295295            || $this->force_saving_to_tag_library) 
    296296        { 
    297297            debug_add("use tag lib"); 
    298              
     298 
    299299            if (! $this->storage->object) 
    300300            { 
     
    324324            return $this->_callback->key_exists($key); 
    325325        } 
    326     }     
     326    } 
    327327 
    328328    /** 
     
    334334    { 
    335335        debug_push_class(__CLASS__, __FUNCTION__); 
    336          
     336 
    337337        if (   $this->use_tag_library 
    338338            || $this->force_saving_to_tag_library) 
    339339        { 
    340340            debug_add("use tag lib"); 
    341              
     341 
    342342            $all_tags = array(); 
    343              
     343 
    344344            if (! $this->storage->object) 
    345345            { 
     
    347347                return $all_tags; 
    348348            } 
    349              
     349 
    350350            $tags = net_nemein_tag_handler::get_object_tags($this->storage->object); 
    351351            foreach ($tags as $name => $url) 
     
    353353                $all_tags[$name] = $name; 
    354354            } 
    355              
     355 
    356356            debug_print_r('all_tags',$all_tags); 
    357              
     357 
    358358            debug_pop(); 
    359359            return $all_tags; 
    360360        } 
    361          
     361 
    362362        if ($this->option_callback === null) 
    363363        { 
     
    381381    { 
    382382        debug_push_class(__CLASS__, __FUNCTION__); 
    383          
     383 
    384384        debug_print_r("source",$source); 
    385          
     385 
    386386        $this->selection = Array(); 
    387          
     387 
    388388        if ($this->option_callback !== null) 
    389389        { 
     
    401401            { 
    402402                $tags = net_nemein_tag_handler::get_object_tags($this->storage->object); 
    403                 $source = net_nemein_tag_handler::tag_array2string($tags);                 
    404             } 
    405             debug_add("tag lib single source: {$source}");             
    406         } 
    407          
     403                $source = net_nemein_tag_handler::tag_array2string($tags); 
     404            } 
     405            debug_add("tag lib single source: {$source}"); 
     406        } 
     407 
    408408        if (   $source === false 
    409409            || $source === null) 
     
    422422            if (! is_array($source)) 
    423423            { 
    424                 $source = array($source);                 
    425             } 
    426         } 
    427          
     424                $source = array($source); 
     425            } 
     426        } 
     427 
    428428        debug_add("final source: {$source}"); 
    429          
     429 
    430430        foreach ($source as $key) 
    431431        { 
     
    471471        } 
    472472    } 
    473      
     473 
    474474    function convert_to_raw() 
    475475    { 
     
    486486    { 
    487487        debug_push_class(__CLASS__, __FUNCTION__); 
    488          
     488 
    489489        if ($this->allow_multiple) 
    490490        { 
     
    527527                    debug_pop(); 
    528528                } 
    529                  
     529 
    530530                $tmp_tags = net_nemein_tag_handler::get_object_tags($this->storage->object); 
    531531                $tags = array(); 
     
    534534                    $tags[$name] = $name; 
    535535                } 
    536                  
     536 
    537537                debug_add("new tags: {$tags}"); 
    538538 
     
    561561                    } 
    562562                } 
    563                                  
     563 
    564564                debug_print_r('new tags to be saved to callback',$tags); 
    565                  
     565 
    566566                $this->_callback->save_values($tags); 
    567567                debug_pop(); 
    568568                return null; 
    569569            } 
    570                          
     570 
    571571            if (   $this->allow_other 
    572572                && !empty($this->others)) 
     
    589589            } 
    590590        } 
    591     }     
    592      
     591    } 
     592 
    593593    /** 
    594594     * Converts the selected options according to the multiple_storagemode setting. 
     
    600600    { 
    601601        debug_push_class(__CLASS__, __FUNCTION__); 
    602          
     602 
    603603        $glue = '|'; 
    604604 
     
    607607        { 
    608608            debug_add("use tag lib"); 
    609              
     609 
    610610            $tags = net_nemein_tag_handler::string2tag_array($source); 
    611611            $source = array(); 
     
    624624                } 
    625625            } 
    626              
     626 
    627627            debug_print_r('source',$source); 
    628              
     628 
    629629            debug_pop(); 
    630630            return $source; 
     
    658658        } 
    659659    } 
    660      
     660 
    661661    /** 
    662662     * Converts the selected options according to the multiple_storagemode setting. 
     
    667667    { 
    668668        debug_push_class(__CLASS__, __FUNCTION__); 
    669          
     669 
    670670        if (   $this->option_callback !== null 
    671671            && $this->enable_saving_to_callback) 
     
    688688                } 
    689689            } 
    690                              
     690 
    691691            debug_print_r('new tags to be saved to callback',$tags); 
    692              
     692 
    693693            $this->_callback->save_values($tags); 
    694694            debug_pop(); 
     
    700700        { 
    701701            debug_add("use tag lib"); 
    702              
     702 
    703703            if (   $this->allow_other 
    704704                && !empty($this->others)) 
     
    725725                } 
    726726            } 
    727              
     727 
    728728            debug_print_r('new tags to be saved to n.n.tag',$tags); 
    729              
     729 
    730730            $status = net_nemein_tag_handler::tag_object($this->storage->object, $tags); 
    731731            if (!$status) 
     
    736736                debug_pop(); 
    737737            } 
    738              
     738 
    739739            $tmp_tags = net_nemein_tag_handler::get_object_tags($this->storage->object); 
    740740            $tags = array(); 
     
    743743                $tags[$name] = $name; 
    744744            } 
    745              
     745 
    746746            debug_print_r("new tags:",$tags); 
    747              
     747 
    748748            debug_pop(); 
    749749            return null; 
    750750        } 
    751          
     751 
    752752        switch ($this->multiple_storagemode) 
    753753        { 
    754             case 'array':                 
     754            case 'array': 
    755755            case 'serialized': 
    756756                if ($this->others) 
     
    782782        } 
    783783    } 
    784      
    785     /** 
    786      * The validation callback ensures that we dont't have an array or an object 
     784 
     785    /** 
     786     * The validation callback ensures that we don't have an array or an object 
    787787     * as a value, which would be wrong. 
    788788     * 
     
    792792    { 
    793793        debug_push_class(__CLASS__, __FUNCTION__); 
    794          
     794 
    795795        if (   ! $this->allow_other 
    796796            && $this->others) 
     
    808808            return false; 
    809809        } 
    810          
     810 
    811811        debug_pop(); 
    812812        return true; 
  • trunk/midcom/midcom.helper.datamanager2/type/text.php

    r14329 r15380  
    5757     */ 
    5858    var $output_mode = 'specialchars'; 
    59      
     59 
    6060    /** 
    6161     * Runs HTML contents through the HTML Purifier library to ensure safe XHTML compatibility. 
     
    6464     */ 
    6565    var $purify = false; 
    66      
     66 
    6767    /** 
    6868     * Configuration values for HTML Purifier 
     
    8686            debug_pop(); 
    8787        } 
    88          
     88 
    8989        $this->purify = $this->_config->get('html_purify'); 
    9090        $this->purify_config = $this->_config->get('html_purify_config'); 
     
    9999    function purify_content() 
    100100    { 
    101         if (isset($this->purify_config['Cache']['SerializerPath'])  
     101        if (isset($this->purify_config['Cache']['SerializerPath']) 
    102102            && !file_exists($this->purify_config['Cache']['SerializerPath'])) 
    103103        { 
    104104            mkdir($this->purify_config['Cache']['SerializerPath']); 
    105105        } 
    106      
     106 
    107107        require_once('HTMLPurifier.php'); 
    108108        // For some reason we lose this along the way! 
     
    110110 
    111111        $purifier = new HTMLPurifier($this->purify_config); 
    112          
     112 
    113113        // Set local IDPrefix to field name... 
    114114        $purifier->config->set('Attr', 'IDPrefixLocal', "{$this->name}_"); 
     
    168168        // Normalize line breaks to the UNIX format 
    169169        $this->value = preg_replace("/\n\r|\r\n|\r/", "\n", $this->value); 
    170                  
     170 
    171171        if ($this->purify) 
    172172        { 
     
    179179            } 
    180180        } 
    181          
     181 
    182182        return $this->value; 
    183183    } 
     
    194194 
    195195    /** 
    196      * The validation callback ensures that we dont't have an array or an object 
     196     * The validation callback ensures that we don't have an array or an object 
    197197     * as a value, which would be wrong. 
    198198     * 
  • trunk/midcom/net.nemein.flashplayer/source/com/macromedia/javascript/JavaScriptSerializer.as

    r11750 r15380  
    135135                { 
    136136 
    137                         //dont include functions 
     137                        //don't include functions 
    138138                        if(typeof(x[o]) == "function") 
    139139                        {