Changeset 26339


Ignore:
Timestamp:
06/12/10 20:54:03 (7 years ago)
Author:
rambo
Message:

use correct dm2 methods when creating the initial object, set node on creation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ragnaroek/midcom/net.hurttakallio.library/handler/item.php

    r26336 r26339  
    3737    {
    3838        $data['mode'] =& $this->_mode;
     39        // TODO: Insert the info scraper modules to do their magick here and populate datatype/default values accordingly
    3940        return true;
    4041    }
    4142
     43    public function _load_defaults()
     44    {
     45        if (   isset($_POST['defaults'])
     46            && is_array($_POST['defaults'])
     47            && !empty($_POST['defaults']))
     48        {
     49            $this->_controller->defaults = $_POST['defaults'];
     50        }
     51    }
    4252
    4353    public function _get_url_prefix()
     
    8595    {
    8696        $this->_object = new net_hurttakallio_library_item_dba();
     97        $this->_object->node = $this->_content_topic;
    8798        $this->_object->dm2schemaname = $controller->schemaname;
    8899        $dm =& $controller->datamanager;
    89         $this->_object->barcode = $dm->types['barcode']->convert_to_raw();
    90         $this->_object->title = $dm->types['title']->convert_to_raw();
     100        $this->_object->barcode = $dm->types['barcode']->convert_to_storage();
     101        $this->_object->title = $dm->types['title']->convert_to_storage();
    91102        if (!$this->_object->create())
    92103        {
Note: See TracChangeset for help on using the changeset viewer.