Changeset 129
- Timestamp:
- 07/20/10 03:25:54 (7 weeks ago)
- Location:
- mediamosa_snapshot_2-x/sites/all/modules
- Files:
-
- 9 modified
-
mediamosa/CHANGELOG.txt (modified) (1 diff)
-
mediamosa/core/user/mediamosa_user.inc (modified) (1 diff)
-
mediamosa/maintenance/browse/mediamosa_maintenance_browse_restcalls.inc (modified) (2 diffs)
-
mediamosa/mediamosa.inc (modified) (1 diff)
-
mediamosa/mediamosa.info (modified) (1 diff)
-
mediamosa/mediamosa.version.inc (modified) (1 diff)
-
mediamosa/modules/collection/mediamosa_collection.rest.inc (modified) (1 diff)
-
mediamosa/modules/user/mediamosa_user.module (modified) (1 diff)
-
mediamosa_connector/mediamosa_connector.class.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mediamosa_snapshot_2-x/sites/all/modules/mediamosa/CHANGELOG.txt
r128 r129 39 39 user. 40 40 - Added extra tests for search on metadata dates. 41 - /user/user_id will now return quota even if user_id has no quota information. 42 Old behavour would return invalid user Id error when no quota was available. 43 But then you can never get quota information when you haven't uploaded 44 anything yet. 45 - Fixed maxlength on title for collection creation, was unlimited. 46 - Max length is now shown correctly in REST calls browser. 41 47 - Fixed bug in mediamosa.profile where output of error messages was not 42 48 complete. -
mediamosa_snapshot_2-x/sites/all/modules/mediamosa/core/user/mediamosa_user.inc
r94 r129 300 300 )->fetchField(); 301 301 302 if (!$total) { 303 throw new mediamosa_exception_error_userman_invalid_user(array('@user_id' => $user_id)); 304 } 302 // Removed: new users that havent created anything will not be able to see 303 // its quota. 304 //if (!$total) { 305 // throw new mediamosa_exception_error_userman_invalid_user(array('@user_id' => $user_id)); 306 //} 305 307 306 308 // Get the user. -
mediamosa_snapshot_2-x/sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_restcalls.inc
r94 r129 271 271 t('Required'), 272 272 isset($item[mediamosa_rest_call::VAR_DEFAULT_VALUE]) ? $item[mediamosa_rest_call::VAR_DEFAULT_VALUE] : '', 273 '-',273 isset($item[mediamosa_rest_call::VAR_RANGE_END]) ? $item[mediamosa_rest_call::VAR_RANGE_END] : '-', 274 274 ); 275 275 } … … 290 290 t('Optional'), 291 291 isset($item[mediamosa_rest_call::VAR_DEFAULT_VALUE]) ? $item[mediamosa_rest_call::VAR_DEFAULT_VALUE] : '', 292 '-',292 isset($item[mediamosa_rest_call::VAR_RANGE_END]) ? $item[mediamosa_rest_call::VAR_RANGE_END] : '-', 293 293 ); 294 294 } -
mediamosa_snapshot_2-x/sites/all/modules/mediamosa/mediamosa.inc
r125 r129 85 85 86 86 // ------------------------------------------------------------------ Static Functions. 87 /**87 /** 88 88 * Retrieve the main response object. 89 89 * Must overridden in any child class. -
mediamosa_snapshot_2-x/sites/all/modules/mediamosa/mediamosa.info
r128 r129 3 3 description = "Open source media management and distribution platform." 4 4 package = "MediaMosa - Core" 5 version = "2.2.0. 699:75eaea4a823a"5 version = "2.2.0.702:643ad72d7874" 6 6 core = 7.x 7 7 -
mediamosa_snapshot_2-x/sites/all/modules/mediamosa/mediamosa.version.inc
r128 r129 48 48 const MEDIAMOSA_VERSION_2_2_0 = '2.2.0'; 49 49 50 const MEDIAMOSA_VERSION = '2.2.0. 699:75eaea4a823a';50 const MEDIAMOSA_VERSION = '2.2.0.702:643ad72d7874'; 51 51 52 52 // Used for APPs. -
mediamosa_snapshot_2-x/sites/all/modules/mediamosa/modules/collection/mediamosa_collection.rest.inc
r111 r129 480 480 self::VAR_TYPE => mediamosa_type::TYPE_STRING, 481 481 self::VAR_DESCRIPTION => 'The title of the new collection.', 482 self::VAR_RANGE_END => mediamosa_collection_db::TITLE_LENGTH, 482 483 ), 483 484 self::DESCRIPTION => array( -
mediamosa_snapshot_2-x/sites/all/modules/mediamosa/modules/user/mediamosa_user.module
r98 r129 36 36 mediamosa_rest_call::TITLE => 'Get a list of users.', 37 37 mediamosa_rest_call::EXAMPLE_REQUEST => '/user?limit=10&offset=0 [GET] ', 38 mediamosa_rest_call::DESCRIPTION => 'With this call you get a list of all known users. User integrity is not forced in Mediamosa, but rather left to the application builder. There is however some basic knowledge of users. The /user... restcalls can be used to store basic user data. So if you create an asset w hita user, this will succeed regardless the user exists in the userlist. The main purpose for the user lists in MediaMosa is the storage of the quotum per user/group.38 mediamosa_rest_call::DESCRIPTION => 'With this call you get a list of all known users. User integrity is not forced in Mediamosa, but rather left to the application builder. There is however some basic knowledge of users. The /user... restcalls can be used to store basic user data. So if you create an asset with a user, this will succeed regardless the user exists in the userlist. The main purpose for the user lists in MediaMosa is the storage of the quotum per user/group. 39 39 40 40 This call returns all users which are created with /user/create and searches for all users who created objects (assets, mediafiles, collections). If the user has some quota information, this is added to the output.', -
mediamosa_snapshot_2-x/sites/all/modules/mediamosa_connector/mediamosa_connector.class.inc
r122 r129 354 354 355 355 public function check_result($response, $ok = NULL, $error = NULL) { 356 $result_id = (int)$response->xml->header->request_result_id;356 $result_id = $response ? (int)$response->xml->header->request_result_id : 0; 357 357 358 358 if ($result_id != self::ERRORCODE_OKAY && $result_id != self::ERRORCODE_EMPTY_RESULT) { … … 371 371 return TRUE; 372 372 } 373 374 /** 375 * Simple function to correctly convert simplexml to array. 376 * 377 * @param object $xml 378 */ 379 private static function _simplexml2array($xml) { 380 $xml_copy = $xml; 381 if (get_class($xml) == 'SimpleXMLElement') { 382 foreach($xml->attributes() as $key => $value) { 383 if ($value) { 384 $attributes[$key] = (string)$value; 385 } 386 } 387 388 $xml = get_object_vars($xml); 389 } 390 391 if (is_array($xml)) { 392 if (empty($xml)) { 393 return (string)$xml_copy; 394 } 395 396 $result = array(); 397 foreach($xml as $key => $value) { 398 $result[$key] = self::_simplexml2array($value); 399 } 400 401 return $result; 402 } 403 404 return (string)$xml; 405 } 406 407 /** 408 * Basicly the same as simplexml2array, with the exception that it will fix 409 * the problem with single and multi items where a single item will end up 410 * in a non-indexed array and multi items will. 411 * 412 * @param object $xml 413 */ 414 public static function responsexml2array($xml) { 415 416 // Convert to nice array. 417 $a_xml = self::_simplexml2array($xml); 418 419 if (!isset($a_xml['items']['item'])) { 420 return $a_xml; 421 } 422 423 // Fix the problem with 1 or 2+ items in array. 424 $a_tmp = isset($a_xml['items']['item'][0]) ? $a_xml['items']['item'] : array(0 => $a_xml['items']['item']); 425 unset($a_xml['items']); 426 $a_xml['items']['item'] = $a_tmp; 427 428 return $a_xml; 429 } 430 431 /** 432 * Correctly convert to array and return the items object from the mediamosa 433 * response as array. 434 * 435 * @param object $response 436 */ 437 public static function response2array($response) { 438 return self::responsexml2array($response->xml); 439 } 373 440 }
