diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-05-13 01:49:54 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-05-13 01:49:54 +0000 |
commit | a0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (patch) | |
tree | a101f7a71a33f75c21d4ac828f442d902f5d8af9 /modules/g2_import/helpers | |
parent | 104430e9e1e8dacd5e4320e29e59fc59aa5c6ee9 (diff) | |
parent | 9affa8ebbd539396d71f19003b91af577a8a183e (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/g2_import/helpers')
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 9c20ec4d..575d02bb 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -265,7 +265,7 @@ class g2_import_Core { $e); } } - + break; case GROUP_ALL_USERS: @@ -587,6 +587,7 @@ class g2_import_Core { if (in_array($g2_item->getMimeType(), array("video/mp4", "video/x-flv"))) { try { $item = ORM::factory("item"); + $item->type = "movie"; $item->parent_id = $parent->id; $item->set_data_file($g2_path); $item->name = $g2_item->getPathComponent(); @@ -1202,23 +1203,3 @@ function g2() { return $args; } } - -/** - * A wrapper for exceptions to report more details in case - * it's a ORM validation exception. - */ -class G2_Import_Exception extends Exception { - public function __construct($message, Exception $previous=null, $additional_messages=null) { - if ($additional_messages) { - $message .= "\n" . implode("\n", $additional_messages); - } - if ($previous && $previous instanceof ORM_Validation_Exception) { - $message .= "\nORM validation errors: " . print_r($previous->validation->errors(), true); - } - if ($previous) { - $message .= "\n" . (string) $previous; - } - // The $previous parameter is supported in PHP 5.3.0+. - parent::__construct($message); - } -}
\ No newline at end of file |