Changeset 14806

Show
Ignore:
Timestamp:
02/08/08 13:20:00 (10 months ago)
Author:
rambo
Message:

forward port r14805

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.datamanager2/datamanager.php

    r14773 r14806  
    400400                continue; 
    401401            } 
    402             $result[$name] = $this->types[$name]->convert_to_storage(); 
     402            $result[$name] = $this->types[$name]->convert_to_raw(); 
    403403        } 
    404404        return $result; 
  • trunk/midcom/midcom.helper.datamanager2/type.php

    r14329 r14806  
    214214 
    215215    /** 
     216     * Transforms the current objects' state into 'raw' representation. Usually  
     217     * the convert_to_storage -method returns suitable value, but in some datatypes 
     218     * (like privilege, blobs-based ones and tags), convert_to_storage does database 
     219     * IO directly and returns less usefull data. 
     220     * 
     221     * @see convert_to_storage 
     222     * @return mixed The rendered content. 
     223     */ 
     224    function convert_to_raw() 
     225    { 
     226        return $this->convert_to_storage(); 
     227    } 
     228 
     229    /** 
    216230     * Main validation interface, currently only calls the main type callback, but this 
    217231     * can be extended later by a configurable callback into the component. 
  • trunk/midcom/midcom.helper.datamanager2/type/blobs.php

    r14390 r14806  
    300300    } 
    301301 
     302    function convert_to_raw() 
     303    { 
     304        return ''; 
     305    } 
     306 
    302307    function convert_to_storage() 
    303308    { 
  • trunk/midcom/midcom.helper.datamanager2/type/mnrelation.php

    r14329 r14806  
    372372    } 
    373373 
     374    function convert_to_raw() 
     375    { 
     376        return null; 
     377    } 
    374378} 
    375379 
  • trunk/midcom/midcom.helper.datamanager2/type/parameters.php

    r14329 r14806  
    7777    } 
    7878 
     79    function convert_to_raw() 
     80    { 
     81        return $this->convert_to_csv(); 
     82    } 
     83 
    7984    /** 
    8085     * 
  • trunk/midcom/midcom.helper.datamanager2/type/position.php

    r14084 r14806  
    5050            $this->location = new org_routamc_positioning_location_dba(); 
    5151        } 
     52    } 
     53 
     54    function convert_to_raw() 
     55    { 
     56        return $this->convert_to_csv(); 
    5257    } 
    5358 
  • trunk/midcom/midcom.helper.datamanager2/type/privilege.php

    r14327 r14806  
    173173    } 
    174174 
     175    function convert_to_raw() 
     176    { 
     177        return $this->get_value(); 
     178    } 
     179 
    175180    function convert_to_html() 
    176181    { 
  • trunk/midcom/midcom.helper.datamanager2/type/privilegeset.php

    r14179 r14806  
    100100    } 
    101101 
     102    function convert_to_raw() 
     103    { 
     104        return ''; 
     105    } 
     106 
    102107    /** 
    103108     * Stores the privileges to the database. This call retrieves a temporary object if necessary. 
  • trunk/midcom/midcom.helper.datamanager2/type/tags.php

    r14329 r14806  
    5858        return null; 
    5959    } 
     60 
     61    function convert_to_raw() 
     62    { 
     63        return net_nemein_tag_handler::string2tag_array($this->value); 
     64    } 
    6065} 
    6166 
  • trunk/midcom/midcom.helper.datamanager2/type/tagselect.php

    r14329 r14806  
    472472    } 
    473473     
     474    function convert_to_raw() 
     475    { 
     476        return $this->selection; 
     477    } 
     478 
    474479    /** 
    475480     * Merges selection and others arrays, the validation cycle ensures that they are