@@ 7933-7957 (lines=25) @@ | ||
7930 | $ratings = array_values(array_unique($ratings)); |
|
7931 | } |
|
7932 | } |
|
7933 | elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) |
|
7934 | { |
|
7935 | foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) |
|
7936 | { |
|
7937 | $rating_scheme = null; |
|
7938 | $rating_value = null; |
|
7939 | if (isset($rating['attribs']['']['scheme'])) |
|
7940 | { |
|
7941 | $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
7942 | } |
|
7943 | else |
|
7944 | { |
|
7945 | $rating_scheme = 'urn:simple'; |
|
7946 | } |
|
7947 | if (isset($rating['data'])) |
|
7948 | { |
|
7949 | $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
7950 | } |
|
7951 | $ratings[] = $this->registry->create('Rating', array($rating_scheme, $rating_value)); |
|
7952 | } |
|
7953 | if (is_array($ratings)) |
|
7954 | { |
|
7955 | $ratings = array_values(array_unique($ratings)); |
|
7956 | } |
|
7957 | } |
|
7958 | else |
|
7959 | { |
|
7960 | $ratings = $ratings_parent; |
|
@@ 8365-8393 (lines=29) @@ | ||
8362 | $player = $player_parent; |
|
8363 | } |
|
8364 | // RATINGS |
|
8365 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) |
|
8366 | { |
|
8367 | foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) |
|
8368 | { |
|
8369 | $rating_scheme = null; |
|
8370 | $rating_value = null; |
|
8371 | if (isset($rating['attribs']['']['scheme'])) |
|
8372 | { |
|
8373 | $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
8374 | } |
|
8375 | else |
|
8376 | { |
|
8377 | $rating_scheme = 'urn:simple'; |
|
8378 | } |
|
8379 | if (isset($rating['data'])) |
|
8380 | { |
|
8381 | $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
8382 | } |
|
8383 | $ratings[] = $this->registry->create('Rating', array($rating_scheme, $rating_value)); |
|
8384 | } |
|
8385 | if (is_array($ratings)) |
|
8386 | { |
|
8387 | $ratings = array_values(array_unique($ratings)); |
|
8388 | } |
|
8389 | } |
|
8390 | else |
|
8391 | { |
|
8392 | $ratings = $ratings_parent; |
|
8393 | } |
|
8394 | // RESTRICTIONS |
|
8395 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) |
|
8396 | { |