Skip to content

Commit

Permalink
Merged from master
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Xi committed Feb 23, 2014
2 parents 1b97d3d + dfde048 commit baa9fe1
Show file tree
Hide file tree
Showing 4 changed files with 2,254 additions and 2,256 deletions.
13 changes: 4 additions & 9 deletions classes/lattice/controller/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ class Lattice_Controller_Export extends Controller {

public $output_dir;

public function __construct()
{
if ( ! is_writable('application/views/xmldumps/'))
{
// die('application/views/xmldumps/ must be writable');
}
}
// all this logic should be moved to the export MODEL
private function get_object_fields($object)
{
Expand Down Expand Up @@ -39,7 +32,8 @@ private function get_object_fields($object)
if ($value->filename)
{
$target_path = $this->output_dir . $value->filename;
if (file_exists($target_path))
$current_path = 'application/media/' . $value->filename;
if (file_exists($current_path))
{
$node->appendChild($this->doc->createTextNode($target_path));
}
Expand Down Expand Up @@ -104,7 +98,8 @@ private function get_object_fields_lattice_format($object)
if ($value->filename)
{
$target_path = $this->output_dir . $value->filename;
if (file_exists($target_path))
$current_path = 'application/media/' . $value->filename;
if (file_exists($current_path))
{
$node->appendChild($this->doc->createTextNode($target_path));
}
Expand Down
1 change: 0 additions & 1 deletion classes/lattice/controller/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ private function read_field_content($xml_file, $content, $item, &$data, &$clust
$data[$field] = $content->nodeValue;
break;
}

// $data array as modified by reference
}

Expand Down
1 change: 1 addition & 0 deletions classes/lattice/model/lattice/object.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ public function set_content_column($object, $column, $value)
}
if ($mapped_column AND ! strstr($mapped_column, 'object'))
{

$this->contenttable->$mapped_column = $value;
$this->contenttable->save();
return;
Expand Down
Loading

0 comments on commit baa9fe1

Please sign in to comment.