mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 19:43:16 +00:00
Remove debug, fix build
This commit is contained in:
@@ -1919,8 +1919,6 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
*/
|
||||
protected function list_databox_metadata_field_properties(databox_field $databox_field)
|
||||
{
|
||||
echo "listing properties for ".$databox_field->get_id()."\n";
|
||||
var_dump($databox_field->get_tag());
|
||||
$ret = array(
|
||||
'id' => $databox_field->get_id(),
|
||||
'namespace' => $databox_field->get_tag()->getGroupName(),
|
||||
|
@@ -565,15 +565,7 @@ class databox extends base
|
||||
$stmt->closeCursor();
|
||||
|
||||
foreach ($rs as $row) {
|
||||
|
||||
try {
|
||||
$meta = databox_field::get_instance($this, $row['id']);
|
||||
} catch (Exception $e) {
|
||||
$meta = databox_fieldUnknown::get_instance($this, $row['id']);
|
||||
$meta->set_name($row['name']);
|
||||
unset($e);
|
||||
}
|
||||
$meta_struct->add_element($meta);
|
||||
$meta_struct->add_element(databox_field::get_instance($this, $row['id']));
|
||||
}
|
||||
$this->meta_struct = $meta_struct;
|
||||
$this->set_data_to_cache($this->meta_struct, self::CACHE_META_STRUCT);
|
||||
|
@@ -123,6 +123,7 @@ class databox_field implements cache_cacheableInterface
|
||||
protected $dces_element;
|
||||
protected $Vocabulary;
|
||||
protected $VocabularyRestriction = false;
|
||||
protected $on_error = false;
|
||||
|
||||
const TYPE_TEXT = "text";
|
||||
const TYPE_DATE = "date";
|
||||
@@ -174,9 +175,11 @@ class databox_field implements cache_cacheableInterface
|
||||
|
||||
$this->id = (int) $id;
|
||||
|
||||
echo "create tag from " . $row['src'] . " for id $id - name is " . $row['name'] . "\n";
|
||||
$this->tag = self::loadClassFromTagName($row['src']);
|
||||
var_dump($this->tag);
|
||||
|
||||
if ($row['src'] != $this->tag->getTagname()) {
|
||||
$this->on_error = true;
|
||||
}
|
||||
|
||||
$this->name = $row['name'];
|
||||
$this->indexable = ! ! $row['indexable'];
|
||||
@@ -242,7 +245,6 @@ class databox_field implements cache_cacheableInterface
|
||||
*/
|
||||
public static function get_instance(databox &$databox, $id)
|
||||
{
|
||||
echo "getting instance of databox_field $id for databox " . $databox->get_sbas_id() . "\n";
|
||||
$cache_key = 'field_' . $id;
|
||||
$instance_id = $databox->get_sbas_id() . '_' . $id;
|
||||
if ( ! isset(self::$_instance[$instance_id]) || (self::$_instance[$instance_id] instanceof self) === false) {
|
||||
@@ -799,7 +801,7 @@ class databox_field implements cache_cacheableInterface
|
||||
*/
|
||||
public function is_on_error()
|
||||
{
|
||||
return false;
|
||||
return $this->on_error;
|
||||
}
|
||||
|
||||
public static function create(databox $databox, $name)
|
||||
|
@@ -57,7 +57,7 @@ class task_period_upgradetov32 extends task_abstract
|
||||
printf("taskid %s starting." . PHP_EOL, $this->getID());
|
||||
|
||||
$registry = registry::get_instance();
|
||||
// $registry->set('GV_cache_server_type', 'nocache', \registry::TYPE_STRING);
|
||||
|
||||
$registry->set('GV_sphinx', false, \registry::TYPE_BOOLEAN);
|
||||
|
||||
if ( ! $this->sbas_id) {
|
||||
@@ -76,17 +76,14 @@ class task_period_upgradetov32 extends task_abstract
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
foreach ($databox->get_meta_structure()->get_elements() as $struct_el) {
|
||||
if ($struct_el instanceof databox_fieldUnknown) {
|
||||
throw new Exception('Bad field');
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
printf("Please verify all your databox meta fields before migrating, It seems somes are wrong\n");
|
||||
$this->return_value = self::RETURNSTATUS_STOPPED;
|
||||
if ($struct_el->is_on_error()) {
|
||||
|
||||
return 'stopped';
|
||||
printf("Please verify all your databox meta fields before migrating, It seems somes are wrong\n");
|
||||
$this->return_value = self::STATE_STOPPED;
|
||||
|
||||
return self::STATE_STOPPED;
|
||||
}
|
||||
}
|
||||
|
||||
$this->running = true;
|
||||
|
Reference in New Issue
Block a user