public function onCCK_Storage_LocationPrepareForm(&$field, &$storage, $pk = 0, &$config = array()) { if (self::$type != $field->storage_location) { return; } // Init $table = $field->storage_table; // Set if ($table == self::$table) { $storage = self::_getTable($pk); $config['asset'] = 'com_categories'; $config['asset_id'] = (int) $storage->asset_id; $config['author'] = $storage->{self::$author}; $config['custom'] = !$config['custom'] ? self::$custom : $config['custom']; } else { $storage = parent::g_onCCK_Storage_LocationPrepareForm($table, $pk); } }
public function onCCK_Storage_LocationPrepareForm(&$field, &$storage, $pk = 0, &$config = array()) { if (self::$type != $field->storage_location) { return; } // Init $table = $field->storage_table; if (!isset($config['primary'])) { $config['primary'] = self::$type; $config['pkb'] = JCckDatabase::loadResult('SELECT pkb FROM #__cck_core WHERE storage_location="' . self::$type . '" AND pk=' . (int) $config['pk']); // todo: move+improve } // Set if ($table == self::$table) { $storage = self::_getTable($pk); $config['asset'] = ''; $config['asset_id'] = 0; $config['author'] = parent::g_getBridgeAuthor('joomla_article', $pk, self::$type); } else { $storage = parent::g_onCCK_Storage_LocationPrepareForm($table, $pk); } }
public function onCCK_Storage_LocationPrepareForm(&$field, &$storage, $pk = 0, &$config = array()) { if (self::$type != $field->storage_location) { return; } // Init $table = $field->storage_table; // Set if ($table == self::$table) { $storage = self::_getTable($pk); $config['asset'] = 'com_categories'; if ($config['translate_id']) { $empty = array(self::$key, 'alias', 'created_time', 'created_user_id', 'hits', 'modified_time', 'modified_user_id', 'version'); $config['language'] = JFactory::getApplication()->input->get('translate'); $config['translate'] = $storage->language; $config['translated_id'] = $config['translate_id'] . ':' . $storage->alias; foreach ($empty as $k) { $storage->{$k} = ''; } } else { $config['asset_id'] = (int) $storage->asset_id; $config['author'] = $storage->{self::$author}; $config['custom'] = !$config['custom'] ? self::$custom : $config['custom']; $config['language'] = $storage->language; } } else { $storage = parent::g_onCCK_Storage_LocationPrepareForm($table, $pk); } }