@@ -244,8 +244,7 @@ discard block |
||
244 | 244 | { |
245 | 245 | $this->multifeed_url[] = $this->registry->call('Misc', 'fix_protocol', array($value, 1)); |
246 | 246 | } |
247 | - } |
|
248 | - else |
|
247 | + } else |
|
249 | 248 | { |
250 | 249 | $this->feed_url = $this->registry->call('Misc', 'fix_protocol', array($url, 1)); |
251 | 250 | } |
@@ -307,8 +306,7 @@ discard block |
||
307 | 306 | if ($encoding) |
308 | 307 | { |
309 | 308 | $this->input_encoding = (string) $encoding; |
310 | - } |
|
311 | - else |
|
309 | + } else |
|
312 | 310 | { |
313 | 311 | $this->input_encoding = false; |
314 | 312 | } |
@@ -484,8 +482,7 @@ discard block |
||
484 | 482 | if ($page !== false) |
485 | 483 | { |
486 | 484 | $this->sanitize->set_image_handler($page . '?' . $qs . '='); |
487 | - } |
|
488 | - else |
|
485 | + } else |
|
489 | 486 | { |
490 | 487 | $this->image_handler = ''; |
491 | 488 | } |
@@ -546,8 +543,7 @@ discard block |
||
546 | 543 | $i++; |
547 | 544 | } |
548 | 545 | return (bool) $success; |
549 | - } |
|
550 | - elseif ($this->feed_url === null && $this->raw_data === null) |
|
546 | + } elseif ($this->feed_url === null && $this->raw_data === null) |
|
551 | 547 | { |
552 | 548 | return false; |
553 | 549 | } |
@@ -567,8 +563,7 @@ discard block |
||
567 | 563 | if (($fetched = $this->fetch_data($cache)) === true) |
568 | 564 | { |
569 | 565 | return true; |
570 | - } |
|
571 | - elseif ($fetched === false) { |
|
566 | + } elseif ($fetched === false) { |
|
572 | 567 | return false; |
573 | 568 | } |
574 | 569 | list($headers, $sniffed) = $fetched; |
@@ -593,8 +588,7 @@ discard block |
||
593 | 588 | } |
594 | 589 | $encodings = array_merge($encodings, $this->registry->call('Misc', 'xml_encoding', array($this->raw_data, &$this->registry))); |
595 | 590 | $encodings[] = 'UTF-8'; |
596 | - } |
|
597 | - elseif (in_array($sniffed, $text_types) || substr($sniffed, 0, 5) === 'text/' && substr($sniffed, -4) === '+xml') |
|
591 | + } elseif (in_array($sniffed, $text_types) || substr($sniffed, 0, 5) === 'text/' && substr($sniffed, -4) === '+xml') |
|
598 | 592 | { |
599 | 593 | if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) |
600 | 594 | { |
@@ -650,8 +644,7 @@ discard block |
||
650 | 644 | { |
651 | 645 | // We have an error, just set SimplePie_Misc::error to it and quit |
652 | 646 | $this->error = sprintf('This XML document is invalid, likely due to invalid characters. XML error: %s at line %d, column %d', $parser->get_error_string(), $parser->get_current_line(), $parser->get_current_column()); |
653 | - } |
|
654 | - else |
|
647 | + } else |
|
655 | 648 | { |
656 | 649 | $this->error = 'The data could not be converted to UTF-8. You MUST have either the iconv or mbstring extension installed. Upgrading to PHP 5.x (which includes iconv) is highly recommended.'; |
657 | 650 | } |
@@ -721,8 +714,7 @@ discard block |
||
721 | 714 | $cache->touch(); |
722 | 715 | return true; |
723 | 716 | } |
724 | - } |
|
725 | - else |
|
717 | + } else |
|
726 | 718 | { |
727 | 719 | unset($file); |
728 | 720 | } |
@@ -748,8 +740,7 @@ discard block |
||
748 | 740 | if ($this->file instanceof SimplePie_File && $this->file->url === $this->feed_url) |
749 | 741 | { |
750 | 742 | $file =& $this->file; |
751 | - } |
|
752 | - else |
|
743 | + } else |
|
753 | 744 | { |
754 | 745 | $headers = array( |
755 | 746 | 'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1', |
@@ -779,8 +770,7 @@ discard block |
||
779 | 770 | $this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, __FILE__, __LINE__)); |
780 | 771 | return false; |
781 | 772 | } |
782 | - } |
|
783 | - catch (SimplePie_Exception $e) |
|
773 | + } catch (SimplePie_Exception $e) |
|
784 | 774 | { |
785 | 775 | // This is usually because DOMDocument doesn't exist |
786 | 776 | $this->error = $e->getMessage(); |
@@ -830,8 +820,7 @@ discard block |
||
830 | 820 | if ($this->get_encoding()) |
831 | 821 | { |
832 | 822 | $header .= ' charset=' . $this->get_encoding(); |
833 | - } |
|
834 | - else |
|
823 | + } else |
|
835 | 824 | { |
836 | 825 | $header .= ' charset=UTF-8'; |
837 | 826 | } |
@@ -847,12 +836,10 @@ discard block |
||
847 | 836 | if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'])) |
848 | 837 | { |
849 | 838 | $this->data['type'] &= SIMPLEPIE_TYPE_ATOM_10; |
850 | - } |
|
851 | - elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'])) |
|
839 | + } elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'])) |
|
852 | 840 | { |
853 | 841 | $this->data['type'] &= SIMPLEPIE_TYPE_ATOM_03; |
854 | - } |
|
855 | - elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'])) |
|
842 | + } elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'])) |
|
856 | 843 | { |
857 | 844 | if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['channel']) |
858 | 845 | || isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['image']) |
@@ -868,8 +855,7 @@ discard block |
||
868 | 855 | { |
869 | 856 | $this->data['type'] &= SIMPLEPIE_TYPE_RSS_090; |
870 | 857 | } |
871 | - } |
|
872 | - elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'])) |
|
858 | + } elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'])) |
|
873 | 859 | { |
874 | 860 | $this->data['type'] &= SIMPLEPIE_TYPE_RSS_ALL; |
875 | 861 | if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['attribs']['']['version'])) |
@@ -905,8 +891,7 @@ discard block |
||
905 | 891 | break; |
906 | 892 | } |
907 | 893 | } |
908 | - } |
|
909 | - else |
|
894 | + } else |
|
910 | 895 | { |
911 | 896 | $this->data['type'] = SIMPLEPIE_TYPE_NONE; |
912 | 897 | } |
@@ -919,8 +904,7 @@ discard block |
||
919 | 904 | if ($this->feed_url !== null) |
920 | 905 | { |
921 | 906 | return $this->sanitize($this->feed_url, SIMPLEPIE_CONSTRUCT_IRI); |
922 | - } |
|
923 | - else |
|
907 | + } else |
|
924 | 908 | { |
925 | 909 | return null; |
926 | 910 | } |
@@ -1044,12 +1028,10 @@ discard block |
||
1044 | 1028 | if (!($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION) && !empty($element['xml_base_explicit']) && isset($element['xml_base'])) |
1045 | 1029 | { |
1046 | 1030 | return $element['xml_base']; |
1047 | - } |
|
1048 | - elseif ($this->get_link() !== null) |
|
1031 | + } elseif ($this->get_link() !== null) |
|
1049 | 1032 | { |
1050 | 1033 | return $this->get_link(); |
1051 | - } |
|
1052 | - else |
|
1034 | + } else |
|
1053 | 1035 | { |
1054 | 1036 | return $this->subscribe_url(); |
1055 | 1037 | } |
@@ -1065,32 +1047,25 @@ discard block |
||
1065 | 1047 | if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) |
1066 | 1048 | { |
1067 | 1049 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
1068 | - } |
|
1069 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) |
|
1050 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) |
|
1070 | 1051 | { |
1071 | 1052 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
1072 | - } |
|
1073 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
|
1053 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
|
1074 | 1054 | { |
1075 | 1055 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
1076 | - } |
|
1077 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
1056 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
1078 | 1057 | { |
1079 | 1058 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
1080 | - } |
|
1081 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
1059 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
1082 | 1060 | { |
1083 | 1061 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
1084 | - } |
|
1085 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
1062 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
1086 | 1063 | { |
1087 | 1064 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1088 | - } |
|
1089 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
1065 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
1090 | 1066 | { |
1091 | 1067 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1092 | - } |
|
1093 | - else |
|
1068 | + } else |
|
1094 | 1069 | { |
1095 | 1070 | return null; |
1096 | 1071 | } |
@@ -1102,8 +1077,7 @@ discard block |
||
1102 | 1077 | if (isset($categories[$key])) |
1103 | 1078 | { |
1104 | 1079 | return $categories[$key]; |
1105 | - } |
|
1106 | - else |
|
1080 | + } else |
|
1107 | 1081 | { |
1108 | 1082 | return null; |
1109 | 1083 | } |
@@ -1139,8 +1113,7 @@ discard block |
||
1139 | 1113 | if (isset($category['attribs']['']['domain'])) |
1140 | 1114 | { |
1141 | 1115 | $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); |
1142 | - } |
|
1143 | - else |
|
1116 | + } else |
|
1144 | 1117 | { |
1145 | 1118 | $scheme = null; |
1146 | 1119 | } |
@@ -1157,8 +1130,7 @@ discard block |
||
1157 | 1130 | if (!empty($categories)) |
1158 | 1131 | { |
1159 | 1132 | return array_unique($categories); |
1160 | - } |
|
1161 | - else |
|
1133 | + } else |
|
1162 | 1134 | { |
1163 | 1135 | return null; |
1164 | 1136 | } |
@@ -1170,8 +1142,7 @@ discard block |
||
1170 | 1142 | if (isset($authors[$key])) |
1171 | 1143 | { |
1172 | 1144 | return $authors[$key]; |
1173 | - } |
|
1174 | - else |
|
1145 | + } else |
|
1175 | 1146 | { |
1176 | 1147 | return null; |
1177 | 1148 | } |
@@ -1239,8 +1210,7 @@ discard block |
||
1239 | 1210 | if (!empty($authors)) |
1240 | 1211 | { |
1241 | 1212 | return array_unique($authors); |
1242 | - } |
|
1243 | - else |
|
1213 | + } else |
|
1244 | 1214 | { |
1245 | 1215 | return null; |
1246 | 1216 | } |
@@ -1252,8 +1222,7 @@ discard block |
||
1252 | 1222 | if (isset($contributors[$key])) |
1253 | 1223 | { |
1254 | 1224 | return $contributors[$key]; |
1255 | - } |
|
1256 | - else |
|
1225 | + } else |
|
1257 | 1226 | { |
1258 | 1227 | return null; |
1259 | 1228 | } |
@@ -1309,8 +1278,7 @@ discard block |
||
1309 | 1278 | if (!empty($contributors)) |
1310 | 1279 | { |
1311 | 1280 | return array_unique($contributors); |
1312 | - } |
|
1313 | - else |
|
1281 | + } else |
|
1314 | 1282 | { |
1315 | 1283 | return null; |
1316 | 1284 | } |
@@ -1322,8 +1290,7 @@ discard block |
||
1322 | 1290 | if (isset($links[$key])) |
1323 | 1291 | { |
1324 | 1292 | return $links[$key]; |
1325 | - } |
|
1326 | - else |
|
1293 | + } else |
|
1327 | 1294 | { |
1328 | 1295 | return null; |
1329 | 1296 | } |
@@ -1382,13 +1349,11 @@ discard block |
||
1382 | 1349 | { |
1383 | 1350 | $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]); |
1384 | 1351 | $this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]; |
1385 | - } |
|
1386 | - else |
|
1352 | + } else |
|
1387 | 1353 | { |
1388 | 1354 | $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; |
1389 | 1355 | } |
1390 | - } |
|
1391 | - elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) |
|
1356 | + } elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) |
|
1392 | 1357 | { |
1393 | 1358 | $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; |
1394 | 1359 | } |
@@ -1398,8 +1363,7 @@ discard block |
||
1398 | 1363 | if (isset($this->data['links'][$rel])) |
1399 | 1364 | { |
1400 | 1365 | return $this->data['links'][$rel]; |
1401 | - } |
|
1402 | - else |
|
1366 | + } else |
|
1403 | 1367 | { |
1404 | 1368 | return null; |
1405 | 1369 | } |
@@ -1414,40 +1378,31 @@ discard block |
||
1414 | 1378 | if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle')) |
1415 | 1379 | { |
1416 | 1380 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
1417 | - } |
|
1418 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline')) |
|
1381 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline')) |
|
1419 | 1382 | { |
1420 | 1383 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
1421 | - } |
|
1422 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) |
|
1384 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) |
|
1423 | 1385 | { |
1424 | 1386 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
1425 | - } |
|
1426 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) |
|
1387 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) |
|
1427 | 1388 | { |
1428 | 1389 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
1429 | - } |
|
1430 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) |
|
1390 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) |
|
1431 | 1391 | { |
1432 | 1392 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); |
1433 | - } |
|
1434 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) |
|
1393 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) |
|
1435 | 1394 | { |
1436 | 1395 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1437 | - } |
|
1438 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) |
|
1396 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) |
|
1439 | 1397 | { |
1440 | 1398 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1441 | - } |
|
1442 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) |
|
1399 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) |
|
1443 | 1400 | { |
1444 | 1401 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); |
1445 | - } |
|
1446 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) |
|
1402 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) |
|
1447 | 1403 | { |
1448 | 1404 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); |
1449 | - } |
|
1450 | - else |
|
1405 | + } else |
|
1451 | 1406 | { |
1452 | 1407 | return null; |
1453 | 1408 | } |
@@ -1458,24 +1413,19 @@ discard block |
||
1458 | 1413 | if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights')) |
1459 | 1414 | { |
1460 | 1415 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
1461 | - } |
|
1462 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright')) |
|
1416 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright')) |
|
1463 | 1417 | { |
1464 | 1418 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
1465 | - } |
|
1466 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright')) |
|
1419 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright')) |
|
1467 | 1420 | { |
1468 | 1421 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1469 | - } |
|
1470 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) |
|
1422 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) |
|
1471 | 1423 | { |
1472 | 1424 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1473 | - } |
|
1474 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) |
|
1425 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) |
|
1475 | 1426 | { |
1476 | 1427 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1477 | - } |
|
1478 | - else |
|
1428 | + } else |
|
1479 | 1429 | { |
1480 | 1430 | return null; |
1481 | 1431 | } |
@@ -1486,32 +1436,25 @@ discard block |
||
1486 | 1436 | if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language')) |
1487 | 1437 | { |
1488 | 1438 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1489 | - } |
|
1490 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language')) |
|
1439 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language')) |
|
1491 | 1440 | { |
1492 | 1441 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1493 | - } |
|
1494 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language')) |
|
1442 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language')) |
|
1495 | 1443 | { |
1496 | 1444 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1497 | - } |
|
1498 | - elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang'])) |
|
1445 | + } elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang'])) |
|
1499 | 1446 | { |
1500 | 1447 | return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
1501 | - } |
|
1502 | - elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang'])) |
|
1448 | + } elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang'])) |
|
1503 | 1449 | { |
1504 | 1450 | return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
1505 | - } |
|
1506 | - elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang'])) |
|
1451 | + } elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang'])) |
|
1507 | 1452 | { |
1508 | 1453 | return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
1509 | - } |
|
1510 | - elseif (isset($this->data['headers']['content-language'])) |
|
1454 | + } elseif (isset($this->data['headers']['content-language'])) |
|
1511 | 1455 | { |
1512 | 1456 | return $this->sanitize($this->data['headers']['content-language'], SIMPLEPIE_CONSTRUCT_TEXT); |
1513 | - } |
|
1514 | - else |
|
1457 | + } else |
|
1515 | 1458 | { |
1516 | 1459 | return null; |
1517 | 1460 | } |
@@ -1522,12 +1465,10 @@ discard block |
||
1522 | 1465 | if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat')) |
1523 | 1466 | { |
1524 | 1467 | return (float) $return[0]['data']; |
1525 | - } |
|
1526 | - elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
1468 | + } elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
1527 | 1469 | { |
1528 | 1470 | return (float) $match[1]; |
1529 | - } |
|
1530 | - else |
|
1471 | + } else |
|
1531 | 1472 | { |
1532 | 1473 | return null; |
1533 | 1474 | } |
@@ -1538,16 +1479,13 @@ discard block |
||
1538 | 1479 | if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long')) |
1539 | 1480 | { |
1540 | 1481 | return (float) $return[0]['data']; |
1541 | - } |
|
1542 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) |
|
1482 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) |
|
1543 | 1483 | { |
1544 | 1484 | return (float) $return[0]['data']; |
1545 | - } |
|
1546 | - elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
1485 | + } elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
1547 | 1486 | { |
1548 | 1487 | return (float) $match[2]; |
1549 | - } |
|
1550 | - else |
|
1488 | + } else |
|
1551 | 1489 | { |
1552 | 1490 | return null; |
1553 | 1491 | } |
@@ -1558,24 +1496,19 @@ discard block |
||
1558 | 1496 | if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
1559 | 1497 | { |
1560 | 1498 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1561 | - } |
|
1562 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
1499 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
1563 | 1500 | { |
1564 | 1501 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1565 | - } |
|
1566 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
1502 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
1567 | 1503 | { |
1568 | 1504 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1569 | - } |
|
1570 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
1505 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
1571 | 1506 | { |
1572 | 1507 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1573 | - } |
|
1574 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
1508 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
1575 | 1509 | { |
1576 | 1510 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
1577 | - } |
|
1578 | - else |
|
1511 | + } else |
|
1579 | 1512 | { |
1580 | 1513 | return null; |
1581 | 1514 | } |
@@ -1586,28 +1519,22 @@ discard block |
||
1586 | 1519 | if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image')) |
1587 | 1520 | { |
1588 | 1521 | return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI); |
1589 | - } |
|
1590 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo')) |
|
1522 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo')) |
|
1591 | 1523 | { |
1592 | 1524 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
1593 | - } |
|
1594 | - elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon')) |
|
1525 | + } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon')) |
|
1595 | 1526 | { |
1596 | 1527 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
1597 | - } |
|
1598 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'url')) |
|
1528 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'url')) |
|
1599 | 1529 | { |
1600 | 1530 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
1601 | - } |
|
1602 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'url')) |
|
1531 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'url')) |
|
1603 | 1532 | { |
1604 | 1533 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
1605 | - } |
|
1606 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) |
|
1534 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) |
|
1607 | 1535 | { |
1608 | 1536 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
1609 | - } |
|
1610 | - else |
|
1537 | + } else |
|
1611 | 1538 | { |
1612 | 1539 | return null; |
1613 | 1540 | } |
@@ -1618,16 +1545,13 @@ discard block |
||
1618 | 1545 | if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link')) |
1619 | 1546 | { |
1620 | 1547 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
1621 | - } |
|
1622 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link')) |
|
1548 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link')) |
|
1623 | 1549 | { |
1624 | 1550 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
1625 | - } |
|
1626 | - elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) |
|
1551 | + } elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) |
|
1627 | 1552 | { |
1628 | 1553 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
1629 | - } |
|
1630 | - else |
|
1554 | + } else |
|
1631 | 1555 | { |
1632 | 1556 | return null; |
1633 | 1557 | } |
@@ -1638,12 +1562,10 @@ discard block |
||
1638 | 1562 | if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'width')) |
1639 | 1563 | { |
1640 | 1564 | return round($return[0]['data']); |
1641 | - } |
|
1642 | - elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) |
|
1565 | + } elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) |
|
1643 | 1566 | { |
1644 | 1567 | return 88.0; |
1645 | - } |
|
1646 | - else |
|
1568 | + } else |
|
1647 | 1569 | { |
1648 | 1570 | return null; |
1649 | 1571 | } |
@@ -1654,12 +1576,10 @@ discard block |
||
1654 | 1576 | if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'height')) |
1655 | 1577 | { |
1656 | 1578 | return round($return[0]['data']); |
1657 | - } |
|
1658 | - elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) |
|
1579 | + } elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) |
|
1659 | 1580 | { |
1660 | 1581 | return 31.0; |
1661 | - } |
|
1662 | - else |
|
1582 | + } else |
|
1663 | 1583 | { |
1664 | 1584 | return null; |
1665 | 1585 | } |
@@ -1672,8 +1592,7 @@ discard block |
||
1672 | 1592 | if ($max === 0) |
1673 | 1593 | { |
1674 | 1594 | return $qty; |
1675 | - } |
|
1676 | - else |
|
1595 | + } else |
|
1677 | 1596 | { |
1678 | 1597 | return ($qty > $max) ? $max : $qty; |
1679 | 1598 | } |
@@ -1685,8 +1604,7 @@ discard block |
||
1685 | 1604 | if (isset($items[$key])) |
1686 | 1605 | { |
1687 | 1606 | return $items[$key]; |
1688 | - } |
|
1689 | - else |
|
1607 | + } else |
|
1690 | 1608 | { |
1691 | 1609 | return null; |
1692 | 1610 | } |
@@ -1699,8 +1617,7 @@ discard block |
||
1699 | 1617 | if (!empty($this->multifeed_objects)) |
1700 | 1618 | { |
1701 | 1619 | $this->data['items'] = SimplePie::merge_items($this->multifeed_objects, $start, $end, $this->item_limit); |
1702 | - } |
|
1703 | - else |
|
1620 | + } else |
|
1704 | 1621 | { |
1705 | 1622 | $this->data['items'] = array(); |
1706 | 1623 | if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'entry')) |
@@ -1769,8 +1686,7 @@ discard block |
||
1769 | 1686 | } |
1770 | 1687 | } |
1771 | 1688 | $items = $this->data['ordered_items']; |
1772 | - } |
|
1773 | - else |
|
1689 | + } else |
|
1774 | 1690 | { |
1775 | 1691 | $items = $this->data['items']; |
1776 | 1692 | } |
@@ -1778,13 +1694,11 @@ discard block |
||
1778 | 1694 | if ($end === 0) |
1779 | 1695 | { |
1780 | 1696 | return array_slice($items, $start); |
1781 | - } |
|
1782 | - else |
|
1697 | + } else |
|
1783 | 1698 | { |
1784 | 1699 | return array_slice($items, $start, $end); |
1785 | 1700 | } |
1786 | - } |
|
1787 | - else |
|
1701 | + } else |
|
1788 | 1702 | { |
1789 | 1703 | return array(); |
1790 | 1704 | } |
@@ -1844,8 +1758,7 @@ discard block |
||
1844 | 1758 | if ($arg instanceof SimplePie) |
1845 | 1759 | { |
1846 | 1760 | $items = array_merge($items, $arg->get_items(0, $limit)); |
1847 | - } |
|
1848 | - else |
|
1761 | + } else |
|
1849 | 1762 | { |
1850 | 1763 | trigger_error('Arguments must be SimplePie objects', E_USER_WARNING); |
1851 | 1764 | } |
@@ -1867,13 +1780,11 @@ discard block |
||
1867 | 1780 | if ($end === 0) |
1868 | 1781 | { |
1869 | 1782 | return array_slice($items, $start); |
1870 | - } |
|
1871 | - else |
|
1783 | + } else |
|
1872 | 1784 | { |
1873 | 1785 | return array_slice($items, $start, $end); |
1874 | 1786 | } |
1875 | - } |
|
1876 | - else |
|
1787 | + } else |
|
1877 | 1788 | { |
1878 | 1789 | trigger_error('Cannot merge zero SimplePie objects', E_USER_WARNING); |
1879 | 1790 | return array(); |
@@ -1907,8 +1818,7 @@ discard block |
||
1907 | 1818 | if ($this->name !== null) |
1908 | 1819 | { |
1909 | 1820 | return $this->name; |
1910 | - } |
|
1911 | - else |
|
1821 | + } else |
|
1912 | 1822 | { |
1913 | 1823 | return null; |
1914 | 1824 | } |
@@ -1919,8 +1829,7 @@ discard block |
||
1919 | 1829 | if ($this->link !== null) |
1920 | 1830 | { |
1921 | 1831 | return $this->link; |
1922 | - } |
|
1923 | - else |
|
1832 | + } else |
|
1924 | 1833 | { |
1925 | 1834 | return null; |
1926 | 1835 | } |
@@ -1931,8 +1840,7 @@ discard block |
||
1931 | 1840 | if ($this->email !== null) |
1932 | 1841 | { |
1933 | 1842 | return $this->email; |
1934 | - } |
|
1935 | - else |
|
1843 | + } else |
|
1936 | 1844 | { |
1937 | 1845 | return null; |
1938 | 1846 | } |
@@ -1982,20 +1890,16 @@ discard block |
||
1982 | 1890 | if (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0])) |
1983 | 1891 | { |
1984 | 1892 | $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]; |
1985 | - } |
|
1986 | - elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0])) |
|
1893 | + } elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0])) |
|
1987 | 1894 | { |
1988 | 1895 | $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]; |
1989 | - } |
|
1990 | - elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0])) |
|
1896 | + } elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0])) |
|
1991 | 1897 | { |
1992 | 1898 | $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]; |
1993 | - } |
|
1994 | - elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0])) |
|
1899 | + } elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0])) |
|
1995 | 1900 | { |
1996 | 1901 | $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0]; |
1997 | - } |
|
1998 | - else |
|
1902 | + } else |
|
1999 | 1903 | { |
2000 | 1904 | $channel = null; |
2001 | 1905 | } |
@@ -2203,8 +2107,7 @@ discard block |
||
2203 | 2107 | try |
2204 | 2108 | { |
2205 | 2109 | $this->mysql = new PDO("mysql:dbname={$this->options['dbname']};host={$this->options['host']};port={$this->options['port']}", $this->options['user'], $this->options['pass'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); |
2206 | - } |
|
2207 | - catch (PDOException $e) |
|
2110 | + } catch (PDOException $e) |
|
2208 | 2111 | { |
2209 | 2112 | $this->mysql = null; |
2210 | 2113 | return; |
@@ -2260,8 +2163,7 @@ discard block |
||
2260 | 2163 | $sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = :items, `data` = :data, `mtime` = :time WHERE `id` = :feed'; |
2261 | 2164 | $query = $this->mysql->prepare($sql); |
2262 | 2165 | $query->bindValue(':items', $items); |
2263 | - } |
|
2264 | - else |
|
2166 | + } else |
|
2265 | 2167 | { |
2266 | 2168 | $sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `data` = :data, `mtime` = :time WHERE `id` = :feed'; |
2267 | 2169 | $query = $this->mysql->prepare($sql); |
@@ -2273,8 +2175,7 @@ discard block |
||
2273 | 2175 | { |
2274 | 2176 | return false; |
2275 | 2177 | } |
2276 | - } |
|
2277 | - else |
|
2178 | + } else |
|
2278 | 2179 | { |
2279 | 2180 | $query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:feed, :count, :data, :time)'); |
2280 | 2181 | $query->bindValue(':feed', $this->id); |
@@ -2321,14 +2222,12 @@ discard block |
||
2321 | 2222 | } |
2322 | 2223 | return true; |
2323 | 2224 | } |
2324 | - } |
|
2325 | - else |
|
2225 | + } else |
|
2326 | 2226 | { |
2327 | 2227 | return true; |
2328 | 2228 | } |
2329 | 2229 | } |
2330 | - } |
|
2331 | - else |
|
2230 | + } else |
|
2332 | 2231 | { |
2333 | 2232 | $query = $this->mysql->prepare('SELECT `id` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed'); |
2334 | 2233 | $query->bindValue(':feed', $this->id); |
@@ -2344,8 +2243,7 @@ discard block |
||
2344 | 2243 | { |
2345 | 2244 | return true; |
2346 | 2245 | } |
2347 | - } |
|
2348 | - else |
|
2246 | + } else |
|
2349 | 2247 | { |
2350 | 2248 | $query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:id, 0, :data, :time)'); |
2351 | 2249 | $query->bindValue(':id', $this->id); |
@@ -2375,8 +2273,7 @@ discard block |
||
2375 | 2273 | if (isset($this->options['items'][0])) |
2376 | 2274 | { |
2377 | 2275 | $items = (int) $this->options['items'][0]; |
2378 | - } |
|
2379 | - else |
|
2276 | + } else |
|
2380 | 2277 | { |
2381 | 2278 | $items = (int) $row[0]; |
2382 | 2279 | } |
@@ -2385,20 +2282,16 @@ discard block |
||
2385 | 2282 | if (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0])) |
2386 | 2283 | { |
2387 | 2284 | $feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]; |
2388 | - } |
|
2389 | - elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0])) |
|
2285 | + } elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0])) |
|
2390 | 2286 | { |
2391 | 2287 | $feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]; |
2392 | - } |
|
2393 | - elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0])) |
|
2288 | + } elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0])) |
|
2394 | 2289 | { |
2395 | 2290 | $feed =& $data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]; |
2396 | - } |
|
2397 | - elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0])) |
|
2291 | + } elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0])) |
|
2398 | 2292 | { |
2399 | 2293 | $feed =& $data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]; |
2400 | - } |
|
2401 | - else |
|
2294 | + } else |
|
2402 | 2295 | { |
2403 | 2296 | $feed = null; |
2404 | 2297 | } |
@@ -2417,8 +2310,7 @@ discard block |
||
2417 | 2310 | { |
2418 | 2311 | $feed['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'][] = unserialize($row); |
2419 | 2312 | } |
2420 | - } |
|
2421 | - else |
|
2313 | + } else |
|
2422 | 2314 | { |
2423 | 2315 | return false; |
2424 | 2316 | } |
@@ -2440,8 +2332,7 @@ discard block |
||
2440 | 2332 | if ($query->execute() && ($time = $query->fetchColumn())) |
2441 | 2333 | { |
2442 | 2334 | return $time; |
2443 | - } |
|
2444 | - else |
|
2335 | + } else |
|
2445 | 2336 | { |
2446 | 2337 | return false; |
2447 | 2338 | } |
@@ -2459,8 +2350,7 @@ discard block |
||
2459 | 2350 | if ($query->execute() && $query->rowCount() > 0) |
2460 | 2351 | { |
2461 | 2352 | return true; |
2462 | - } |
|
2463 | - else |
|
2353 | + } else |
|
2464 | 2354 | { |
2465 | 2355 | return false; |
2466 | 2356 | } |
@@ -2479,8 +2369,7 @@ discard block |
||
2479 | 2369 | if ($query->execute() && $query2->execute()) |
2480 | 2370 | { |
2481 | 2371 | return true; |
2482 | - } |
|
2483 | - else |
|
2372 | + } else |
|
2484 | 2373 | { |
2485 | 2374 | return false; |
2486 | 2375 | } |
@@ -2563,8 +2452,7 @@ discard block |
||
2563 | 2452 | if ($this->endTime !== null) |
2564 | 2453 | { |
2565 | 2454 | return $this->endTime; |
2566 | - } |
|
2567 | - else |
|
2455 | + } else |
|
2568 | 2456 | { |
2569 | 2457 | return null; |
2570 | 2458 | } |
@@ -2575,8 +2463,7 @@ discard block |
||
2575 | 2463 | if ($this->lang !== null) |
2576 | 2464 | { |
2577 | 2465 | return $this->lang; |
2578 | - } |
|
2579 | - else |
|
2466 | + } else |
|
2580 | 2467 | { |
2581 | 2468 | return null; |
2582 | 2469 | } |
@@ -2587,8 +2474,7 @@ discard block |
||
2587 | 2474 | if ($this->startTime !== null) |
2588 | 2475 | { |
2589 | 2476 | return $this->startTime; |
2590 | - } |
|
2591 | - else |
|
2477 | + } else |
|
2592 | 2478 | { |
2593 | 2479 | return null; |
2594 | 2480 | } |
@@ -2599,8 +2485,7 @@ discard block |
||
2599 | 2485 | if ($this->text !== null) |
2600 | 2486 | { |
2601 | 2487 | return $this->text; |
2602 | - } |
|
2603 | - else |
|
2488 | + } else |
|
2604 | 2489 | { |
2605 | 2490 | return null; |
2606 | 2491 | } |
@@ -2611,8 +2496,7 @@ discard block |
||
2611 | 2496 | if ($this->type !== null) |
2612 | 2497 | { |
2613 | 2498 | return $this->type; |
2614 | - } |
|
2615 | - else |
|
2499 | + } else |
|
2616 | 2500 | { |
2617 | 2501 | return null; |
2618 | 2502 | } |
@@ -2645,8 +2529,7 @@ discard block |
||
2645 | 2529 | if ($this->term !== null) |
2646 | 2530 | { |
2647 | 2531 | return $this->term; |
2648 | - } |
|
2649 | - else |
|
2532 | + } else |
|
2650 | 2533 | { |
2651 | 2534 | return null; |
2652 | 2535 | } |
@@ -2657,8 +2540,7 @@ discard block |
||
2657 | 2540 | if ($this->scheme !== null) |
2658 | 2541 | { |
2659 | 2542 | return $this->scheme; |
2660 | - } |
|
2661 | - else |
|
2543 | + } else |
|
2662 | 2544 | { |
2663 | 2545 | return null; |
2664 | 2546 | } |
@@ -2669,8 +2551,7 @@ discard block |
||
2669 | 2551 | if ($this->label !== null) |
2670 | 2552 | { |
2671 | 2553 | return $this->label; |
2672 | - } |
|
2673 | - else |
|
2554 | + } else |
|
2674 | 2555 | { |
2675 | 2556 | return $this->get_term(); |
2676 | 2557 | } |
@@ -2701,8 +2582,7 @@ discard block |
||
2701 | 2582 | if (($pos = strpos($this->file->headers['content-type'], ';')) !== false) |
2702 | 2583 | { |
2703 | 2584 | $official = substr($this->file->headers['content-type'], 0, $pos); |
2704 | - } |
|
2705 | - else |
|
2585 | + } else |
|
2706 | 2586 | { |
2707 | 2587 | $official = $this->file->headers['content-type']; |
2708 | 2588 | } |
@@ -2711,34 +2591,28 @@ discard block |
||
2711 | 2591 | || $official === 'application/unknown') |
2712 | 2592 | { |
2713 | 2593 | return $this->unknown(); |
2714 | - } |
|
2715 | - elseif (substr($official, -4) === '+xml' |
|
2594 | + } elseif (substr($official, -4) === '+xml' |
|
2716 | 2595 | || $official === 'text/xml' |
2717 | 2596 | || $official === 'application/xml') |
2718 | 2597 | { |
2719 | 2598 | return $official; |
2720 | - } |
|
2721 | - elseif (substr($official, 0, 6) === 'image/') |
|
2599 | + } elseif (substr($official, 0, 6) === 'image/') |
|
2722 | 2600 | { |
2723 | 2601 | if ($return = $this->image()) |
2724 | 2602 | { |
2725 | 2603 | return $return; |
2726 | - } |
|
2727 | - else |
|
2604 | + } else |
|
2728 | 2605 | { |
2729 | 2606 | return $official; |
2730 | 2607 | } |
2731 | - } |
|
2732 | - elseif ($official === 'text/html') |
|
2608 | + } elseif ($official === 'text/html') |
|
2733 | 2609 | { |
2734 | 2610 | return $this->feed_or_html(); |
2735 | - } |
|
2736 | - else |
|
2611 | + } else |
|
2737 | 2612 | { |
2738 | 2613 | return $official; |
2739 | 2614 | } |
2740 | - } |
|
2741 | - else |
|
2615 | + } else |
|
2742 | 2616 | { |
2743 | 2617 | return $this->unknown(); |
2744 | 2618 | } |
@@ -2752,12 +2626,10 @@ discard block |
||
2752 | 2626 | || substr($this->file->body, 0, 3) === "\xEF\xBB\xBF") |
2753 | 2627 | { |
2754 | 2628 | return 'text/plain'; |
2755 | - } |
|
2756 | - elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body)) |
|
2629 | + } elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body)) |
|
2757 | 2630 | { |
2758 | 2631 | return 'application/octect-stream'; |
2759 | - } |
|
2760 | - else |
|
2632 | + } else |
|
2761 | 2633 | { |
2762 | 2634 | return 'text/plain'; |
2763 | 2635 | } |
@@ -2771,37 +2643,29 @@ discard block |
||
2771 | 2643 | || strtolower(substr($this->file->body, $ws, 7)) === '<script') |
2772 | 2644 | { |
2773 | 2645 | return 'text/html'; |
2774 | - } |
|
2775 | - elseif (substr($this->file->body, 0, 5) === '%PDF-') |
|
2646 | + } elseif (substr($this->file->body, 0, 5) === '%PDF-') |
|
2776 | 2647 | { |
2777 | 2648 | return 'application/pdf'; |
2778 | - } |
|
2779 | - elseif (substr($this->file->body, 0, 11) === '%!PS-Adobe-') |
|
2649 | + } elseif (substr($this->file->body, 0, 11) === '%!PS-Adobe-') |
|
2780 | 2650 | { |
2781 | 2651 | return 'application/postscript'; |
2782 | - } |
|
2783 | - elseif (substr($this->file->body, 0, 6) === 'GIF87a' |
|
2652 | + } elseif (substr($this->file->body, 0, 6) === 'GIF87a' |
|
2784 | 2653 | || substr($this->file->body, 0, 6) === 'GIF89a') |
2785 | 2654 | { |
2786 | 2655 | return 'image/gif'; |
2787 | - } |
|
2788 | - elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A") |
|
2656 | + } elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A") |
|
2789 | 2657 | { |
2790 | 2658 | return 'image/png'; |
2791 | - } |
|
2792 | - elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF") |
|
2659 | + } elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF") |
|
2793 | 2660 | { |
2794 | 2661 | return 'image/jpeg'; |
2795 | - } |
|
2796 | - elseif (substr($this->file->body, 0, 2) === "\x42\x4D") |
|
2662 | + } elseif (substr($this->file->body, 0, 2) === "\x42\x4D") |
|
2797 | 2663 | { |
2798 | 2664 | return 'image/bmp'; |
2799 | - } |
|
2800 | - elseif (substr($this->file->body, 0, 4) === "\x00\x00\x01\x00") |
|
2665 | + } elseif (substr($this->file->body, 0, 4) === "\x00\x00\x01\x00") |
|
2801 | 2666 | { |
2802 | 2667 | return 'image/vnd.microsoft.icon'; |
2803 | - } |
|
2804 | - else |
|
2668 | + } else |
|
2805 | 2669 | { |
2806 | 2670 | return $this->text_or_binary(); |
2807 | 2671 | } |
@@ -2813,24 +2677,19 @@ discard block |
||
2813 | 2677 | || substr($this->file->body, 0, 6) === 'GIF89a') |
2814 | 2678 | { |
2815 | 2679 | return 'image/gif'; |
2816 | - } |
|
2817 | - elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A") |
|
2680 | + } elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A") |
|
2818 | 2681 | { |
2819 | 2682 | return 'image/png'; |
2820 | - } |
|
2821 | - elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF") |
|
2683 | + } elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF") |
|
2822 | 2684 | { |
2823 | 2685 | return 'image/jpeg'; |
2824 | - } |
|
2825 | - elseif (substr($this->file->body, 0, 2) === "\x42\x4D") |
|
2686 | + } elseif (substr($this->file->body, 0, 2) === "\x42\x4D") |
|
2826 | 2687 | { |
2827 | 2688 | return 'image/bmp'; |
2828 | - } |
|
2829 | - elseif (substr($this->file->body, 0, 4) === "\x00\x00\x01\x00") |
|
2689 | + } elseif (substr($this->file->body, 0, 4) === "\x00\x00\x01\x00") |
|
2830 | 2690 | { |
2831 | 2691 | return 'image/vnd.microsoft.icon'; |
2832 | - } |
|
2833 | - else |
|
2692 | + } else |
|
2834 | 2693 | { |
2835 | 2694 | return false; |
2836 | 2695 | } |
@@ -2862,44 +2721,36 @@ discard block |
||
2862 | 2721 | if ($pos < $len && ($pos = strpos($this->file->body, '-->', $pos)) !== false) |
2863 | 2722 | { |
2864 | 2723 | $pos += 3; |
2865 | - } |
|
2866 | - else |
|
2724 | + } else |
|
2867 | 2725 | { |
2868 | 2726 | return 'text/html'; |
2869 | 2727 | } |
2870 | - } |
|
2871 | - elseif (substr($this->file->body, $pos, 1) === '!') |
|
2728 | + } elseif (substr($this->file->body, $pos, 1) === '!') |
|
2872 | 2729 | { |
2873 | 2730 | if ($pos < $len && ($pos = strpos($this->file->body, '>', $pos)) !== false) |
2874 | 2731 | { |
2875 | 2732 | $pos++; |
2876 | - } |
|
2877 | - else |
|
2733 | + } else |
|
2878 | 2734 | { |
2879 | 2735 | return 'text/html'; |
2880 | 2736 | } |
2881 | - } |
|
2882 | - elseif (substr($this->file->body, $pos, 1) === '?') |
|
2737 | + } elseif (substr($this->file->body, $pos, 1) === '?') |
|
2883 | 2738 | { |
2884 | 2739 | if ($pos < $len && ($pos = strpos($this->file->body, '?>', $pos)) !== false) |
2885 | 2740 | { |
2886 | 2741 | $pos += 2; |
2887 | - } |
|
2888 | - else |
|
2742 | + } else |
|
2889 | 2743 | { |
2890 | 2744 | return 'text/html'; |
2891 | 2745 | } |
2892 | - } |
|
2893 | - elseif (substr($this->file->body, $pos, 3) === 'rss' |
|
2746 | + } elseif (substr($this->file->body, $pos, 3) === 'rss' |
|
2894 | 2747 | || substr($this->file->body, $pos, 7) === 'rdf:RDF') |
2895 | 2748 | { |
2896 | 2749 | return 'application/rss+xml'; |
2897 | - } |
|
2898 | - elseif (substr($this->file->body, $pos, 4) === 'feed') |
|
2750 | + } elseif (substr($this->file->body, $pos, 4) === 'feed') |
|
2899 | 2751 | { |
2900 | 2752 | return 'application/atom+xml'; |
2901 | - } |
|
2902 | - else |
|
2753 | + } else |
|
2903 | 2754 | { |
2904 | 2755 | return 'text/html'; |
2905 | 2756 | } |
@@ -2931,8 +2782,7 @@ discard block |
||
2931 | 2782 | if ($this->url !== null) |
2932 | 2783 | { |
2933 | 2784 | return $this->url; |
2934 | - } |
|
2935 | - else |
|
2785 | + } else |
|
2936 | 2786 | { |
2937 | 2787 | return null; |
2938 | 2788 | } |
@@ -2943,8 +2793,7 @@ discard block |
||
2943 | 2793 | if ($this->label !== null) |
2944 | 2794 | { |
2945 | 2795 | return $this->label; |
2946 | - } |
|
2947 | - else |
|
2796 | + } else |
|
2948 | 2797 | { |
2949 | 2798 | return null; |
2950 | 2799 | } |
@@ -2980,8 +2829,7 @@ discard block |
||
2980 | 2829 | if ($this->role !== null) |
2981 | 2830 | { |
2982 | 2831 | return $this->role; |
2983 | - } |
|
2984 | - else |
|
2832 | + } else |
|
2985 | 2833 | { |
2986 | 2834 | return null; |
2987 | 2835 | } |
@@ -2992,8 +2840,7 @@ discard block |
||
2992 | 2840 | if ($this->scheme !== null) |
2993 | 2841 | { |
2994 | 2842 | return $this->scheme; |
2995 | - } |
|
2996 | - else |
|
2843 | + } else |
|
2997 | 2844 | { |
2998 | 2845 | return null; |
2999 | 2846 | } |
@@ -3004,8 +2851,7 @@ discard block |
||
3004 | 2851 | if ($this->name !== null) |
3005 | 2852 | { |
3006 | 2853 | return $this->name; |
3007 | - } |
|
3008 | - else |
|
2854 | + } else |
|
3009 | 2855 | { |
3010 | 2856 | return null; |
3011 | 2857 | } |
@@ -3042,8 +2888,7 @@ discard block |
||
3042 | 2888 | { |
3043 | 2889 | $this->consumed .= $this->data[$this->position]; |
3044 | 2890 | return $this->data[$this->position++]; |
3045 | - } |
|
3046 | - else |
|
2891 | + } else |
|
3047 | 2892 | { |
3048 | 2893 | return false; |
3049 | 2894 | } |
@@ -3057,8 +2902,7 @@ discard block |
||
3057 | 2902 | $this->consumed .= $data; |
3058 | 2903 | $this->position += $len; |
3059 | 2904 | return $data; |
3060 | - } |
|
3061 | - else |
|
2905 | + } else |
|
3062 | 2906 | { |
3063 | 2907 | return false; |
3064 | 2908 | } |
@@ -3104,16 +2948,14 @@ discard block |
||
3104 | 2948 | if ($hex) |
3105 | 2949 | { |
3106 | 2950 | $codepoint = hexdec($codepoint); |
3107 | - } |
|
3108 | - else |
|
2951 | + } else |
|
3109 | 2952 | { |
3110 | 2953 | $codepoint = intval($codepoint); |
3111 | 2954 | } |
3112 | 2955 | if (isset($windows_1252_specials[$codepoint])) |
3113 | 2956 | { |
3114 | 2957 | $replacement = $windows_1252_specials[$codepoint]; |
3115 | - } |
|
3116 | - else |
|
2958 | + } else |
|
3117 | 2959 | { |
3118 | 2960 | $replacement = SimplePie_Misc::codepoint_to_utf8($codepoint); |
3119 | 2961 | } |
@@ -3616,8 +3458,7 @@ discard block |
||
3616 | 3458 | if ($this->bitrate !== null) |
3617 | 3459 | { |
3618 | 3460 | return $this->bitrate; |
3619 | - } |
|
3620 | - else |
|
3461 | + } else |
|
3621 | 3462 | { |
3622 | 3463 | return null; |
3623 | 3464 | } |
@@ -3629,8 +3470,7 @@ discard block |
||
3629 | 3470 | if (isset($captions[$key])) |
3630 | 3471 | { |
3631 | 3472 | return $captions[$key]; |
3632 | - } |
|
3633 | - else |
|
3473 | + } else |
|
3634 | 3474 | { |
3635 | 3475 | return null; |
3636 | 3476 | } |
@@ -3641,8 +3481,7 @@ discard block |
||
3641 | 3481 | if ($this->captions !== null) |
3642 | 3482 | { |
3643 | 3483 | return $this->captions; |
3644 | - } |
|
3645 | - else |
|
3484 | + } else |
|
3646 | 3485 | { |
3647 | 3486 | return null; |
3648 | 3487 | } |
@@ -3654,8 +3493,7 @@ discard block |
||
3654 | 3493 | if (isset($categories[$key])) |
3655 | 3494 | { |
3656 | 3495 | return $categories[$key]; |
3657 | - } |
|
3658 | - else |
|
3496 | + } else |
|
3659 | 3497 | { |
3660 | 3498 | return null; |
3661 | 3499 | } |
@@ -3666,8 +3504,7 @@ discard block |
||
3666 | 3504 | if ($this->categories !== null) |
3667 | 3505 | { |
3668 | 3506 | return $this->categories; |
3669 | - } |
|
3670 | - else |
|
3507 | + } else |
|
3671 | 3508 | { |
3672 | 3509 | return null; |
3673 | 3510 | } |
@@ -3678,8 +3515,7 @@ discard block |
||
3678 | 3515 | if ($this->channels !== null) |
3679 | 3516 | { |
3680 | 3517 | return $this->channels; |
3681 | - } |
|
3682 | - else |
|
3518 | + } else |
|
3683 | 3519 | { |
3684 | 3520 | return null; |
3685 | 3521 | } |
@@ -3690,8 +3526,7 @@ discard block |
||
3690 | 3526 | if ($this->copyright !== null) |
3691 | 3527 | { |
3692 | 3528 | return $this->copyright; |
3693 | - } |
|
3694 | - else |
|
3529 | + } else |
|
3695 | 3530 | { |
3696 | 3531 | return null; |
3697 | 3532 | } |
@@ -3703,8 +3538,7 @@ discard block |
||
3703 | 3538 | if (isset($credits[$key])) |
3704 | 3539 | { |
3705 | 3540 | return $credits[$key]; |
3706 | - } |
|
3707 | - else |
|
3541 | + } else |
|
3708 | 3542 | { |
3709 | 3543 | return null; |
3710 | 3544 | } |
@@ -3715,8 +3549,7 @@ discard block |
||
3715 | 3549 | if ($this->credits !== null) |
3716 | 3550 | { |
3717 | 3551 | return $this->credits; |
3718 | - } |
|
3719 | - else |
|
3552 | + } else |
|
3720 | 3553 | { |
3721 | 3554 | return null; |
3722 | 3555 | } |
@@ -3727,8 +3560,7 @@ discard block |
||
3727 | 3560 | if ($this->description !== null) |
3728 | 3561 | { |
3729 | 3562 | return $this->description; |
3730 | - } |
|
3731 | - else |
|
3563 | + } else |
|
3732 | 3564 | { |
3733 | 3565 | return null; |
3734 | 3566 | } |
@@ -3742,13 +3574,11 @@ discard block |
||
3742 | 3574 | { |
3743 | 3575 | $time = SimplePie_Misc::time_hms($this->duration); |
3744 | 3576 | return $time; |
3745 | - } |
|
3746 | - else |
|
3577 | + } else |
|
3747 | 3578 | { |
3748 | 3579 | return $this->duration; |
3749 | 3580 | } |
3750 | - } |
|
3751 | - else |
|
3581 | + } else |
|
3752 | 3582 | { |
3753 | 3583 | return null; |
3754 | 3584 | } |
@@ -3759,8 +3589,7 @@ discard block |
||
3759 | 3589 | if ($this->expression !== null) |
3760 | 3590 | { |
3761 | 3591 | return $this->expression; |
3762 | - } |
|
3763 | - else |
|
3592 | + } else |
|
3764 | 3593 | { |
3765 | 3594 | return 'full'; |
3766 | 3595 | } |
@@ -3784,8 +3613,7 @@ discard block |
||
3784 | 3613 | if ($this->framerate !== null) |
3785 | 3614 | { |
3786 | 3615 | return $this->framerate; |
3787 | - } |
|
3788 | - else |
|
3616 | + } else |
|
3789 | 3617 | { |
3790 | 3618 | return null; |
3791 | 3619 | } |
@@ -3802,8 +3630,7 @@ discard block |
||
3802 | 3630 | if (isset($hashes[$key])) |
3803 | 3631 | { |
3804 | 3632 | return $hashes[$key]; |
3805 | - } |
|
3806 | - else |
|
3633 | + } else |
|
3807 | 3634 | { |
3808 | 3635 | return null; |
3809 | 3636 | } |
@@ -3814,8 +3641,7 @@ discard block |
||
3814 | 3641 | if ($this->hashes !== null) |
3815 | 3642 | { |
3816 | 3643 | return $this->hashes; |
3817 | - } |
|
3818 | - else |
|
3644 | + } else |
|
3819 | 3645 | { |
3820 | 3646 | return null; |
3821 | 3647 | } |
@@ -3826,8 +3652,7 @@ discard block |
||
3826 | 3652 | if ($this->height !== null) |
3827 | 3653 | { |
3828 | 3654 | return $this->height; |
3829 | - } |
|
3830 | - else |
|
3655 | + } else |
|
3831 | 3656 | { |
3832 | 3657 | return null; |
3833 | 3658 | } |
@@ -3838,8 +3663,7 @@ discard block |
||
3838 | 3663 | if ($this->lang !== null) |
3839 | 3664 | { |
3840 | 3665 | return $this->lang; |
3841 | - } |
|
3842 | - else |
|
3666 | + } else |
|
3843 | 3667 | { |
3844 | 3668 | return null; |
3845 | 3669 | } |
@@ -3851,8 +3675,7 @@ discard block |
||
3851 | 3675 | if (isset($keywords[$key])) |
3852 | 3676 | { |
3853 | 3677 | return $keywords[$key]; |
3854 | - } |
|
3855 | - else |
|
3678 | + } else |
|
3856 | 3679 | { |
3857 | 3680 | return null; |
3858 | 3681 | } |
@@ -3863,8 +3686,7 @@ discard block |
||
3863 | 3686 | if ($this->keywords !== null) |
3864 | 3687 | { |
3865 | 3688 | return $this->keywords; |
3866 | - } |
|
3867 | - else |
|
3689 | + } else |
|
3868 | 3690 | { |
3869 | 3691 | return null; |
3870 | 3692 | } |
@@ -3875,8 +3697,7 @@ discard block |
||
3875 | 3697 | if ($this->length !== null) |
3876 | 3698 | { |
3877 | 3699 | return $this->length; |
3878 | - } |
|
3879 | - else |
|
3700 | + } else |
|
3880 | 3701 | { |
3881 | 3702 | return null; |
3882 | 3703 | } |
@@ -3887,8 +3708,7 @@ discard block |
||
3887 | 3708 | if ($this->link !== null) |
3888 | 3709 | { |
3889 | 3710 | return urldecode($this->link); |
3890 | - } |
|
3891 | - else |
|
3711 | + } else |
|
3892 | 3712 | { |
3893 | 3713 | return null; |
3894 | 3714 | } |
@@ -3899,8 +3719,7 @@ discard block |
||
3899 | 3719 | if ($this->medium !== null) |
3900 | 3720 | { |
3901 | 3721 | return $this->medium; |
3902 | - } |
|
3903 | - else |
|
3722 | + } else |
|
3904 | 3723 | { |
3905 | 3724 | return null; |
3906 | 3725 | } |
@@ -3911,8 +3730,7 @@ discard block |
||
3911 | 3730 | if ($this->player !== null) |
3912 | 3731 | { |
3913 | 3732 | return $this->player; |
3914 | - } |
|
3915 | - else |
|
3733 | + } else |
|
3916 | 3734 | { |
3917 | 3735 | return null; |
3918 | 3736 | } |
@@ -3924,8 +3742,7 @@ discard block |
||
3924 | 3742 | if (isset($ratings[$key])) |
3925 | 3743 | { |
3926 | 3744 | return $ratings[$key]; |
3927 | - } |
|
3928 | - else |
|
3745 | + } else |
|
3929 | 3746 | { |
3930 | 3747 | return null; |
3931 | 3748 | } |
@@ -3936,8 +3753,7 @@ discard block |
||
3936 | 3753 | if ($this->ratings !== null) |
3937 | 3754 | { |
3938 | 3755 | return $this->ratings; |
3939 | - } |
|
3940 | - else |
|
3756 | + } else |
|
3941 | 3757 | { |
3942 | 3758 | return null; |
3943 | 3759 | } |
@@ -3949,8 +3765,7 @@ discard block |
||
3949 | 3765 | if (isset($restrictions[$key])) |
3950 | 3766 | { |
3951 | 3767 | return $restrictions[$key]; |
3952 | - } |
|
3953 | - else |
|
3768 | + } else |
|
3954 | 3769 | { |
3955 | 3770 | return null; |
3956 | 3771 | } |
@@ -3961,8 +3776,7 @@ discard block |
||
3961 | 3776 | if ($this->restrictions !== null) |
3962 | 3777 | { |
3963 | 3778 | return $this->restrictions; |
3964 | - } |
|
3965 | - else |
|
3779 | + } else |
|
3966 | 3780 | { |
3967 | 3781 | return null; |
3968 | 3782 | } |
@@ -3973,8 +3787,7 @@ discard block |
||
3973 | 3787 | if ($this->samplingrate !== null) |
3974 | 3788 | { |
3975 | 3789 | return $this->samplingrate; |
3976 | - } |
|
3977 | - else |
|
3790 | + } else |
|
3978 | 3791 | { |
3979 | 3792 | return null; |
3980 | 3793 | } |
@@ -3986,8 +3799,7 @@ discard block |
||
3986 | 3799 | if ($length !== null) |
3987 | 3800 | { |
3988 | 3801 | return round($length/1048576, 2); |
3989 | - } |
|
3990 | - else |
|
3802 | + } else |
|
3991 | 3803 | { |
3992 | 3804 | return null; |
3993 | 3805 | } |
@@ -3999,8 +3811,7 @@ discard block |
||
3999 | 3811 | if (isset($thumbnails[$key])) |
4000 | 3812 | { |
4001 | 3813 | return $thumbnails[$key]; |
4002 | - } |
|
4003 | - else |
|
3814 | + } else |
|
4004 | 3815 | { |
4005 | 3816 | return null; |
4006 | 3817 | } |
@@ -4011,8 +3822,7 @@ discard block |
||
4011 | 3822 | if ($this->thumbnails !== null) |
4012 | 3823 | { |
4013 | 3824 | return $this->thumbnails; |
4014 | - } |
|
4015 | - else |
|
3825 | + } else |
|
4016 | 3826 | { |
4017 | 3827 | return null; |
4018 | 3828 | } |
@@ -4023,8 +3833,7 @@ discard block |
||
4023 | 3833 | if ($this->title !== null) |
4024 | 3834 | { |
4025 | 3835 | return $this->title; |
4026 | - } |
|
4027 | - else |
|
3836 | + } else |
|
4028 | 3837 | { |
4029 | 3838 | return null; |
4030 | 3839 | } |
@@ -4035,8 +3844,7 @@ discard block |
||
4035 | 3844 | if ($this->type !== null) |
4036 | 3845 | { |
4037 | 3846 | return $this->type; |
4038 | - } |
|
4039 | - else |
|
3847 | + } else |
|
4040 | 3848 | { |
4041 | 3849 | return null; |
4042 | 3850 | } |
@@ -4047,8 +3855,7 @@ discard block |
||
4047 | 3855 | if ($this->width !== null) |
4048 | 3856 | { |
4049 | 3857 | return $this->width; |
4050 | - } |
|
4051 | - else |
|
3858 | + } else |
|
4052 | 3859 | { |
4053 | 3860 | return null; |
4054 | 3861 | } |
@@ -4078,8 +3885,7 @@ discard block |
||
4078 | 3885 | if (is_array($options)) |
4079 | 3886 | { |
4080 | 3887 | extract($options); |
4081 | - } |
|
4082 | - else |
|
3888 | + } else |
|
4083 | 3889 | { |
4084 | 3890 | $options = explode(',', $options); |
4085 | 3891 | foreach($options as $option) |
@@ -4135,17 +3941,14 @@ discard block |
||
4135 | 3941 | if ($height === 'auto') |
4136 | 3942 | { |
4137 | 3943 | $width = 480; |
4138 | - } |
|
4139 | - elseif ($widescreen) |
|
3944 | + } elseif ($widescreen) |
|
4140 | 3945 | { |
4141 | 3946 | $width = round((intval($height)/9)*16); |
4142 | - } |
|
4143 | - else |
|
3947 | + } else |
|
4144 | 3948 | { |
4145 | 3949 | $width = round((intval($height)/3)*4); |
4146 | 3950 | } |
4147 | - } |
|
4148 | - else |
|
3951 | + } else |
|
4149 | 3952 | { |
4150 | 3953 | $width = '100%'; |
4151 | 3954 | } |
@@ -4155,35 +3958,29 @@ discard block |
||
4155 | 3958 | if ($mime === 'audio') |
4156 | 3959 | { |
4157 | 3960 | $height = 0; |
4158 | - } |
|
4159 | - elseif ($mime === 'video') |
|
3961 | + } elseif ($mime === 'video') |
|
4160 | 3962 | { |
4161 | 3963 | if ($width === 'auto') |
4162 | 3964 | { |
4163 | 3965 | if ($widescreen) |
4164 | 3966 | { |
4165 | 3967 | $height = 270; |
4166 | - } |
|
4167 | - else |
|
3968 | + } else |
|
4168 | 3969 | { |
4169 | 3970 | $height = 360; |
4170 | 3971 | } |
4171 | - } |
|
4172 | - elseif ($widescreen) |
|
3972 | + } elseif ($widescreen) |
|
4173 | 3973 | { |
4174 | 3974 | $height = round((intval($width)/16)*9); |
4175 | - } |
|
4176 | - else |
|
3975 | + } else |
|
4177 | 3976 | { |
4178 | 3977 | $height = round((intval($width)/4)*3); |
4179 | 3978 | } |
4180 | - } |
|
4181 | - else |
|
3979 | + } else |
|
4182 | 3980 | { |
4183 | 3981 | $height = 376; |
4184 | 3982 | } |
4185 | - } |
|
4186 | - elseif ($mime === 'audio') |
|
3983 | + } elseif ($mime === 'audio') |
|
4187 | 3984 | { |
4188 | 3985 | $height = 0; |
4189 | 3986 | } |
@@ -4191,8 +3988,7 @@ discard block |
||
4191 | 3988 | if ($mime === 'audio') |
4192 | 3989 | { |
4193 | 3990 | $placeholder = $audio; |
4194 | - } |
|
4195 | - elseif ($mime === 'video') |
|
3991 | + } elseif ($mime === 'video') |
|
4196 | 3992 | { |
4197 | 3993 | $placeholder = $video; |
4198 | 3994 | } |
@@ -4203,8 +3999,7 @@ discard block |
||
4203 | 3999 | if ($native) |
4204 | 4000 | { |
4205 | 4001 | $embed .= "<embed src=\"" . $this->get_link() . "\" pluginspage=\"http://adobe.com/go/getflashplayer\" type=\"$type\" quality=\"high\" width=\"$width\" height=\"$height\" bgcolor=\"$bgcolor\" loop=\"$loop\"></embed>"; |
4206 | - } |
|
4207 | - else |
|
4002 | + } else |
|
4208 | 4003 | { |
4209 | 4004 | $embed .= "<script type='text/javascript'>embed_flash('$bgcolor', '$width', '$height', '" . $this->get_link() . "', '$loop', '$type');</script>"; |
4210 | 4005 | } |
@@ -4217,8 +4012,7 @@ discard block |
||
4217 | 4012 | if ($native) |
4218 | 4013 | { |
4219 | 4014 | $embed .= "<embed src=\"$mediaplayer\" pluginspage=\"http://adobe.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" quality=\"high\" width=\"$width\" height=\"$height\" wmode=\"transparent\" flashvars=\"file=" . rawurlencode($this->get_link().'?file_extension=.'.$this->get_extension()) . "&autostart=false&repeat=$loop&showdigits=true&showfsbutton=false\"></embed>"; |
4220 | - } |
|
4221 | - else |
|
4015 | + } else |
|
4222 | 4016 | { |
4223 | 4017 | $embed .= "<script type='text/javascript'>embed_flv('$width', '$height', '" . rawurlencode($this->get_link().'?file_extension=.'.$this->get_extension()) . "', '$placeholder', '$loop', '$mediaplayer');</script>"; |
4224 | 4018 | } |
@@ -4233,13 +4027,11 @@ discard block |
||
4233 | 4027 | if ($placeholder !== '') |
4234 | 4028 | { |
4235 | 4029 | $embed .= "<embed type=\"$type\" style=\"cursor:hand; cursor:pointer;\" href=\"" . $this->get_link() . "\" src=\"$placeholder\" width=\"$width\" height=\"$height\" autoplay=\"false\" target=\"myself\" controller=\"false\" loop=\"$loop\" scale=\"aspect\" bgcolor=\"$bgcolor\" pluginspage=\"http://apple.com/quicktime/download/\"></embed>"; |
4236 | - } |
|
4237 | - else |
|
4030 | + } else |
|
4238 | 4031 | { |
4239 | 4032 | $embed .= "<embed type=\"$type\" style=\"cursor:hand; cursor:pointer;\" src=\"" . $this->get_link() . "\" width=\"$width\" height=\"$height\" autoplay=\"false\" target=\"myself\" controller=\"true\" loop=\"$loop\" scale=\"aspect\" bgcolor=\"$bgcolor\" pluginspage=\"http://apple.com/quicktime/download/\"></embed>"; |
4240 | 4033 | } |
4241 | - } |
|
4242 | - else |
|
4034 | + } else |
|
4243 | 4035 | { |
4244 | 4036 | $embed .= "<script type='text/javascript'>embed_quicktime('$type', '$bgcolor', '$width', '$height', '" . $this->get_link() . "', '$placeholder', '$loop');</script>"; |
4245 | 4037 | } |
@@ -4251,14 +4043,15 @@ discard block |
||
4251 | 4043 | if ($native) |
4252 | 4044 | { |
4253 | 4045 | $embed .= "<embed type=\"application/x-mplayer2\" src=\"" . $this->get_link() . "\" autosize=\"1\" width=\"$width\" height=\"$height\" showcontrols=\"1\" showstatusbar=\"0\" showdisplay=\"0\" autostart=\"0\"></embed>"; |
4254 | - } |
|
4255 | - else |
|
4046 | + } else |
|
4256 | 4047 | { |
4257 | 4048 | $embed .= "<script type='text/javascript'>embed_wmedia('$width', '$height', '" . $this->get_link() . "');</script>"; |
4258 | 4049 | } |
4259 | 4050 | } |
4260 | 4051 | // Everything else |
4261 | - else $embed .= '<a href="' . $this->get_link() . '" class="' . $altclass . '">' . $alt . '</a>'; |
|
4052 | + else { |
|
4053 | + $embed .= '<a href="' . $this->get_link() . '" class="' . $altclass . '">' . $alt . '</a>'; |
|
4054 | + } |
|
4262 | 4055 | return $embed; |
4263 | 4056 | } |
4264 | 4057 | |
@@ -4273,8 +4066,7 @@ discard block |
||
4273 | 4066 | if ($this->get_type() !== null) |
4274 | 4067 | { |
4275 | 4068 | $type = strtolower($this->type); |
4276 | - } |
|
4277 | - else |
|
4069 | + } else |
|
4278 | 4070 | { |
4279 | 4071 | $type = null; |
4280 | 4072 | } |
@@ -4384,29 +4176,23 @@ discard block |
||
4384 | 4176 | if (in_array($type, $types_flash)) |
4385 | 4177 | { |
4386 | 4178 | return 'flash'; |
4387 | - } |
|
4388 | - elseif (in_array($type, $types_fmedia)) |
|
4179 | + } elseif (in_array($type, $types_fmedia)) |
|
4389 | 4180 | { |
4390 | 4181 | return 'fmedia'; |
4391 | - } |
|
4392 | - elseif (in_array($type, $types_quicktime)) |
|
4182 | + } elseif (in_array($type, $types_quicktime)) |
|
4393 | 4183 | { |
4394 | 4184 | return 'quicktime'; |
4395 | - } |
|
4396 | - elseif (in_array($type, $types_wmedia)) |
|
4185 | + } elseif (in_array($type, $types_wmedia)) |
|
4397 | 4186 | { |
4398 | 4187 | return 'wmedia'; |
4399 | - } |
|
4400 | - elseif (in_array($type, $types_mp3)) |
|
4188 | + } elseif (in_array($type, $types_mp3)) |
|
4401 | 4189 | { |
4402 | 4190 | return 'mp3'; |
4403 | - } |
|
4404 | - else |
|
4191 | + } else |
|
4405 | 4192 | { |
4406 | 4193 | return null; |
4407 | 4194 | } |
4408 | - } |
|
4409 | - else |
|
4195 | + } else |
|
4410 | 4196 | { |
4411 | 4197 | return $type; |
4412 | 4198 | } |
@@ -4483,8 +4269,7 @@ discard block |
||
4483 | 4269 | { |
4484 | 4270 | $this->error = 'cURL error ' . curl_errno($fp) . ': ' . curl_error($fp); |
4485 | 4271 | $this->success = false; |
4486 | - } |
|
4487 | - else |
|
4272 | + } else |
|
4488 | 4273 | { |
4489 | 4274 | $info = curl_getinfo($fp); |
4490 | 4275 | curl_close($fp); |
@@ -4505,8 +4290,7 @@ discard block |
||
4505 | 4290 | } |
4506 | 4291 | } |
4507 | 4292 | } |
4508 | - } |
|
4509 | - else |
|
4293 | + } else |
|
4510 | 4294 | { |
4511 | 4295 | $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN; |
4512 | 4296 | $url_parts = parse_url($url); |
@@ -4525,8 +4309,7 @@ discard block |
||
4525 | 4309 | { |
4526 | 4310 | $this->error = 'fsockopen error: ' . $errstr; |
4527 | 4311 | $this->success = false; |
4528 | - } |
|
4529 | - else |
|
4312 | + } else |
|
4530 | 4313 | { |
4531 | 4314 | stream_set_timeout($fp, $timeout); |
4532 | 4315 | if (isset($url_parts['path'])) |
@@ -4534,13 +4317,11 @@ discard block |
||
4534 | 4317 | if (isset($url_parts['query'])) |
4535 | 4318 | { |
4536 | 4319 | $get = "$url_parts[path]?$url_parts[query]"; |
4537 | - } |
|
4538 | - else |
|
4320 | + } else |
|
4539 | 4321 | { |
4540 | 4322 | $get = $url_parts['path']; |
4541 | 4323 | } |
4542 | - } |
|
4543 | - else |
|
4324 | + } else |
|
4544 | 4325 | { |
4545 | 4326 | $get = '/'; |
4546 | 4327 | } |
@@ -4594,8 +4375,7 @@ discard block |
||
4594 | 4375 | { |
4595 | 4376 | $this->error = 'Unable to decode HTTP "gzip" stream'; |
4596 | 4377 | $this->success = false; |
4597 | - } |
|
4598 | - else |
|
4378 | + } else |
|
4599 | 4379 | { |
4600 | 4380 | $this->body = $decoder->data; |
4601 | 4381 | } |
@@ -4604,16 +4384,13 @@ discard block |
||
4604 | 4384 | if (($decompressed = gzinflate($this->body)) !== false) |
4605 | 4385 | { |
4606 | 4386 | $this->body = $decompressed; |
4607 | - } |
|
4608 | - else if (($decompressed = gzuncompress($this->body)) !== false) |
|
4387 | + } else if (($decompressed = gzuncompress($this->body)) !== false) |
|
4609 | 4388 | { |
4610 | 4389 | $this->body = $decompressed; |
4611 | - } |
|
4612 | - else if (function_exists('gzdecode') && ($decompressed = gzdecode($this->body)) !== false) |
|
4390 | + } else if (function_exists('gzdecode') && ($decompressed = gzdecode($this->body)) !== false) |
|
4613 | 4391 | { |
4614 | 4392 | $this->body = $decompressed; |
4615 | - } |
|
4616 | - else |
|
4393 | + } else |
|
4617 | 4394 | { |
4618 | 4395 | $this->error = 'Unable to decode HTTP "deflate" stream'; |
4619 | 4396 | $this->success = false; |
@@ -4625,8 +4402,7 @@ discard block |
||
4625 | 4402 | } |
4626 | 4403 | } |
4627 | 4404 | } |
4628 | - } |
|
4629 | - else |
|
4405 | + } else |
|
4630 | 4406 | { |
4631 | 4407 | $this->error = 'fsocket timed out'; |
4632 | 4408 | $this->success = false; |
@@ -4634,8 +4410,7 @@ discard block |
||
4634 | 4410 | fclose($fp); |
4635 | 4411 | } |
4636 | 4412 | } |
4637 | - } |
|
4638 | - else |
|
4413 | + } else |
|
4639 | 4414 | { |
4640 | 4415 | $this->method = SIMPLEPIE_FILE_SOURCE_LOCAL | SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS; |
4641 | 4416 | if (!$this->body = file_get_contents($url)) |
@@ -4740,8 +4515,7 @@ discard block |
||
4740 | 4515 | // Set the extra field to the given data |
4741 | 4516 | $this->extra_field = substr($this->compressed_data, $this->position, $len); |
4742 | 4517 | $this->position += $len; |
4743 | - } |
|
4744 | - else |
|
4518 | + } else |
|
4745 | 4519 | { |
4746 | 4520 | return false; |
4747 | 4521 | } |
@@ -4758,8 +4532,7 @@ discard block |
||
4758 | 4532 | // Set the original filename to the given string |
4759 | 4533 | $this->filename = substr($this->compressed_data, $this->position, $len); |
4760 | 4534 | $this->position += $len + 1; |
4761 | - } |
|
4762 | - else |
|
4535 | + } else |
|
4763 | 4536 | { |
4764 | 4537 | return false; |
4765 | 4538 | } |
@@ -4776,8 +4549,7 @@ discard block |
||
4776 | 4549 | // Set the original comment to the given string |
4777 | 4550 | $this->comment = substr($this->compressed_data, $this->position, $len); |
4778 | 4551 | $this->position += $len + 1; |
4779 | - } |
|
4780 | - else |
|
4552 | + } else |
|
4781 | 4553 | { |
4782 | 4554 | return false; |
4783 | 4555 | } |
@@ -4795,13 +4567,11 @@ discard block |
||
4795 | 4567 | if ((crc32(substr($this->compressed_data, 0, $this->position)) & 0xFFFF) === $crc) |
4796 | 4568 | { |
4797 | 4569 | $this->position += 2; |
4798 | - } |
|
4799 | - else |
|
4570 | + } else |
|
4800 | 4571 | { |
4801 | 4572 | return false; |
4802 | 4573 | } |
4803 | - } |
|
4804 | - else |
|
4574 | + } else |
|
4805 | 4575 | { |
4806 | 4576 | return false; |
4807 | 4577 | } |
@@ -4810,8 +4580,7 @@ discard block |
||
4810 | 4580 | if (($this->data = gzinflate(substr($this->compressed_data, $this->position, -8))) === false) |
4811 | 4581 | { |
4812 | 4582 | return false; |
4813 | - } |
|
4814 | - else |
|
4583 | + } else |
|
4815 | 4584 | { |
4816 | 4585 | $this->position = $this->compressed_size - 8; |
4817 | 4586 | } |
@@ -4831,8 +4600,7 @@ discard block |
||
4831 | 4600 | } |
4832 | 4601 | // Wow, against all odds, we've actually got a valid gzip string |
4833 | 4602 | return true; |
4834 | - } |
|
4835 | - else |
|
4603 | + } else |
|
4836 | 4604 | { |
4837 | 4605 | return false; |
4838 | 4606 | } |
@@ -4880,8 +4648,7 @@ discard block |
||
4880 | 4648 | if ($this->state === 'emit' || $this->state === 'body') |
4881 | 4649 | { |
4882 | 4650 | return true; |
4883 | - } |
|
4884 | - else |
|
4651 | + } else |
|
4885 | 4652 | { |
4886 | 4653 | $this->http_version = ''; |
4887 | 4654 | $this->status_code = ''; |
@@ -4918,13 +4685,11 @@ discard block |
||
4918 | 4685 | $this->http_version = (float) $this->http_version; |
4919 | 4686 | $this->position += strspn($this->data, "\x09\x20", $this->position); |
4920 | 4687 | $this->state = 'status'; |
4921 | - } |
|
4922 | - else |
|
4688 | + } else |
|
4923 | 4689 | { |
4924 | 4690 | $this->state = false; |
4925 | 4691 | } |
4926 | - } |
|
4927 | - else |
|
4692 | + } else |
|
4928 | 4693 | { |
4929 | 4694 | $this->state = false; |
4930 | 4695 | } |
@@ -4937,8 +4702,7 @@ discard block |
||
4937 | 4702 | $this->status_code = (int) substr($this->data, $this->position, $len); |
4938 | 4703 | $this->position += $len; |
4939 | 4704 | $this->state = 'reason'; |
4940 | - } |
|
4941 | - else |
|
4705 | + } else |
|
4942 | 4706 | { |
4943 | 4707 | $this->state = false; |
4944 | 4708 | } |
@@ -4962,8 +4726,7 @@ discard block |
||
4962 | 4726 | if (isset($this->headers[$this->name]) && $this->name !== 'content-type') |
4963 | 4727 | { |
4964 | 4728 | $this->headers[$this->name] .= ', ' . $this->value; |
4965 | - } |
|
4966 | - else |
|
4729 | + } else |
|
4967 | 4730 | { |
4968 | 4731 | $this->headers[$this->name] = $this->value; |
4969 | 4732 | } |
@@ -4974,13 +4737,11 @@ discard block |
||
4974 | 4737 | { |
4975 | 4738 | $this->position += 2; |
4976 | 4739 | $this->state = 'body'; |
4977 | - } |
|
4978 | - elseif ($this->data[$this->position] === "\x0A") |
|
4740 | + } elseif ($this->data[$this->position] === "\x0A") |
|
4979 | 4741 | { |
4980 | 4742 | $this->position++; |
4981 | 4743 | $this->state = 'body'; |
4982 | - } |
|
4983 | - else |
|
4744 | + } else |
|
4984 | 4745 | { |
4985 | 4746 | $this->state = 'name'; |
4986 | 4747 | } |
@@ -4995,15 +4756,13 @@ discard block |
||
4995 | 4756 | { |
4996 | 4757 | $this->position += $len; |
4997 | 4758 | $this->state = 'new_line'; |
4998 | - } |
|
4999 | - else |
|
4759 | + } else |
|
5000 | 4760 | { |
5001 | 4761 | $this->name = substr($this->data, $this->position, $len); |
5002 | 4762 | $this->position += $len + 1; |
5003 | 4763 | $this->state = 'value'; |
5004 | 4764 | } |
5005 | - } |
|
5006 | - else |
|
4765 | + } else |
|
5007 | 4766 | { |
5008 | 4767 | $this->state = false; |
5009 | 4768 | } |
@@ -5016,8 +4775,7 @@ discard block |
||
5016 | 4775 | if (substr($this->data, $this->position, 2) === "\x0D\x0A") |
5017 | 4776 | { |
5018 | 4777 | $this->position += 2; |
5019 | - } |
|
5020 | - elseif ($this->data[$this->position] === "\x0A") |
|
4778 | + } elseif ($this->data[$this->position] === "\x0A") |
|
5021 | 4779 | { |
5022 | 4780 | $this->position++; |
5023 | 4781 | } |
@@ -5031,8 +4789,7 @@ discard block |
||
5031 | 4789 | if ($this->is_linear_whitespace()) |
5032 | 4790 | { |
5033 | 4791 | $this->linear_whitespace(); |
5034 | - } |
|
5035 | - else |
|
4792 | + } else |
|
5036 | 4793 | { |
5037 | 4794 | switch ($this->data[$this->position]) |
5038 | 4795 | { |
@@ -5073,8 +4830,7 @@ discard block |
||
5073 | 4830 | if ($this->is_linear_whitespace()) |
5074 | 4831 | { |
5075 | 4832 | $this->linear_whitespace(); |
5076 | - } |
|
5077 | - else |
|
4833 | + } else |
|
5078 | 4834 | { |
5079 | 4835 | switch ($this->data[$this->position]) |
5080 | 4836 | { |
@@ -5119,8 +4875,7 @@ discard block |
||
5119 | 4875 | { |
5120 | 4876 | unset($this->headers['transfer-encoding']); |
5121 | 4877 | $this->state = 'chunked'; |
5122 | - } |
|
5123 | - else |
|
4878 | + } else |
|
5124 | 4879 | { |
5125 | 4880 | $this->state = 'emit'; |
5126 | 4881 | } |
@@ -5211,8 +4966,7 @@ discard block |
||
5211 | 4966 | if (method_exists($this, 'set_' . $name)) |
5212 | 4967 | { |
5213 | 4968 | call_user_func(array($this, 'set_' . $name), $value); |
5214 | - } |
|
5215 | - elseif ( |
|
4969 | + } elseif ( |
|
5216 | 4970 | $name === 'iauthority' |
5217 | 4971 | || $name === 'iuserinfo' |
5218 | 4972 | || $name === 'ihost' |
@@ -5238,8 +4992,7 @@ discard block |
||
5238 | 4992 | ) |
5239 | 4993 | { |
5240 | 4994 | $return = $this->{"get_$name"}(); |
5241 | - } |
|
5242 | - elseif (array_key_exists($name, $props)) |
|
4995 | + } elseif (array_key_exists($name, $props)) |
|
5243 | 4996 | { |
5244 | 4997 | $return = $this->$name; |
5245 | 4998 | } |
@@ -5254,8 +5007,7 @@ discard block |
||
5254 | 5007 | { |
5255 | 5008 | $name = $prop; |
5256 | 5009 | $return = $this->$prop; |
5257 | - } |
|
5258 | - else |
|
5010 | + } else |
|
5259 | 5011 | { |
5260 | 5012 | trigger_error('Undefined property: ' . get_class($this) . '::' . $name, E_USER_NOTICE); |
5261 | 5013 | $return = null; |
@@ -5263,8 +5015,7 @@ discard block |
||
5263 | 5015 | if ($return === null && isset($this->normalization[$this->scheme][$name])) |
5264 | 5016 | { |
5265 | 5017 | return $this->normalization[$this->scheme][$name]; |
5266 | - } |
|
5267 | - else |
|
5018 | + } else |
|
5268 | 5019 | { |
5269 | 5020 | return $return; |
5270 | 5021 | } |
@@ -5275,8 +5026,7 @@ discard block |
||
5275 | 5026 | if (method_exists($this, 'get_' . $name) || isset($this->$name)) |
5276 | 5027 | { |
5277 | 5028 | return true; |
5278 | - } |
|
5279 | - else |
|
5029 | + } else |
|
5280 | 5030 | { |
5281 | 5031 | return false; |
5282 | 5032 | } |
@@ -5304,12 +5054,10 @@ discard block |
||
5304 | 5054 | if (!$relative->is_valid()) |
5305 | 5055 | { |
5306 | 5056 | return false; |
5307 | - } |
|
5308 | - elseif ($relative->scheme !== null) |
|
5057 | + } elseif ($relative->scheme !== null) |
|
5309 | 5058 | { |
5310 | 5059 | return clone $relative; |
5311 | - } |
|
5312 | - else |
|
5060 | + } else |
|
5313 | 5061 | { |
5314 | 5062 | if (!($base instanceof SimplePie_IRI)) |
5315 | 5063 | { |
@@ -5323,8 +5071,7 @@ discard block |
||
5323 | 5071 | { |
5324 | 5072 | $target = clone $relative; |
5325 | 5073 | $target->scheme = $base->scheme; |
5326 | - } |
|
5327 | - else |
|
5074 | + } else |
|
5328 | 5075 | { |
5329 | 5076 | $target = new SimplePie_IRI; |
5330 | 5077 | $target->scheme = $base->scheme; |
@@ -5336,46 +5083,39 @@ discard block |
||
5336 | 5083 | if ($relative->ipath[0] === '/') |
5337 | 5084 | { |
5338 | 5085 | $target->ipath = $relative->ipath; |
5339 | - } |
|
5340 | - elseif (($base->iuserinfo !== null || $base->ihost !== null || $base->port !== null) && $base->ipath === '') |
|
5086 | + } elseif (($base->iuserinfo !== null || $base->ihost !== null || $base->port !== null) && $base->ipath === '') |
|
5341 | 5087 | { |
5342 | 5088 | $target->ipath = '/' . $relative->ipath; |
5343 | - } |
|
5344 | - elseif (($last_segment = strrpos($base->ipath, '/')) !== false) |
|
5089 | + } elseif (($last_segment = strrpos($base->ipath, '/')) !== false) |
|
5345 | 5090 | { |
5346 | 5091 | $target->ipath = substr($base->ipath, 0, $last_segment + 1) . $relative->ipath; |
5347 | - } |
|
5348 | - else |
|
5092 | + } else |
|
5349 | 5093 | { |
5350 | 5094 | $target->ipath = $relative->ipath; |
5351 | 5095 | } |
5352 | 5096 | $target->ipath = $target->remove_dot_segments($target->ipath); |
5353 | 5097 | $target->iquery = $relative->iquery; |
5354 | - } |
|
5355 | - else |
|
5098 | + } else |
|
5356 | 5099 | { |
5357 | 5100 | $target->ipath = $base->ipath; |
5358 | 5101 | if ($relative->iquery !== null) |
5359 | 5102 | { |
5360 | 5103 | $target->iquery = $relative->iquery; |
5361 | - } |
|
5362 | - elseif ($base->iquery !== null) |
|
5104 | + } elseif ($base->iquery !== null) |
|
5363 | 5105 | { |
5364 | 5106 | $target->iquery = $base->iquery; |
5365 | 5107 | } |
5366 | 5108 | } |
5367 | 5109 | $target->ifragment = $relative->ifragment; |
5368 | 5110 | } |
5369 | - } |
|
5370 | - else |
|
5111 | + } else |
|
5371 | 5112 | { |
5372 | 5113 | $target = clone $base; |
5373 | 5114 | $target->ifragment = null; |
5374 | 5115 | } |
5375 | 5116 | $target->scheme_normalization(); |
5376 | 5117 | return $target; |
5377 | - } |
|
5378 | - else |
|
5118 | + } else |
|
5379 | 5119 | { |
5380 | 5120 | return false; |
5381 | 5121 | } |
@@ -5408,8 +5148,7 @@ discard block |
||
5408 | 5148 | $match['fragment'] = null; |
5409 | 5149 | } |
5410 | 5150 | return $match; |
5411 | - } |
|
5412 | - else |
|
5151 | + } else |
|
5413 | 5152 | { |
5414 | 5153 | // This can occur when a paragraph is accidentally parsed as a URI |
5415 | 5154 | return false; |
@@ -5425,8 +5164,7 @@ discard block |
||
5425 | 5164 | if (strpos($input, '../') === 0) |
5426 | 5165 | { |
5427 | 5166 | $input = substr($input, 3); |
5428 | - } |
|
5429 | - elseif (strpos($input, './') === 0) |
|
5167 | + } elseif (strpos($input, './') === 0) |
|
5430 | 5168 | { |
5431 | 5169 | $input = substr($input, 2); |
5432 | 5170 | } |
@@ -5434,8 +5172,7 @@ discard block |
||
5434 | 5172 | elseif (strpos($input, '/./') === 0) |
5435 | 5173 | { |
5436 | 5174 | $input = substr($input, 2); |
5437 | - } |
|
5438 | - elseif ($input === '/.') |
|
5175 | + } elseif ($input === '/.') |
|
5439 | 5176 | { |
5440 | 5177 | $input = '/'; |
5441 | 5178 | } |
@@ -5444,8 +5181,7 @@ discard block |
||
5444 | 5181 | { |
5445 | 5182 | $input = substr($input, 3); |
5446 | 5183 | $output = substr_replace($output, '', strrpos($output, '/')); |
5447 | - } |
|
5448 | - elseif ($input === '/..') |
|
5184 | + } elseif ($input === '/..') |
|
5449 | 5185 | { |
5450 | 5186 | $input = '/'; |
5451 | 5187 | $output = substr_replace($output, '', strrpos($output, '/')); |
@@ -5460,8 +5196,7 @@ discard block |
||
5460 | 5196 | { |
5461 | 5197 | $output .= substr($input, 0, $pos); |
5462 | 5198 | $input = substr_replace($input, '', 0, $pos); |
5463 | - } |
|
5464 | - else |
|
5199 | + } else |
|
5465 | 5200 | { |
5466 | 5201 | $output .= $input; |
5467 | 5202 | $input = ''; |
@@ -5539,8 +5274,7 @@ discard block |
||
5539 | 5274 | break; |
5540 | 5275 | } |
5541 | 5276 | } |
5542 | - } |
|
5543 | - else |
|
5277 | + } else |
|
5544 | 5278 | { |
5545 | 5279 | $position = $strlen - 1; |
5546 | 5280 | $valid = false; |
@@ -5573,8 +5307,9 @@ discard block |
||
5573 | 5307 | ) |
5574 | 5308 | { |
5575 | 5309 | // If we were a character, pretend we weren't, but rather an error. |
5576 | - if ($valid) |
|
5577 | - $position--; |
|
5310 | + if ($valid) { |
|
5311 | + $position--; |
|
5312 | + } |
|
5578 | 5313 | for ($j = $start; $j <= $position; $j++) |
5579 | 5314 | { |
5580 | 5315 | $string = substr_replace($string, sprintf('%%%02X', ord($string[$j])), $j, 1); |
@@ -5689,8 +5424,7 @@ discard block |
||
5689 | 5424 | { |
5690 | 5425 | $string .= '%' . strtoupper($bytes[$j]); |
5691 | 5426 | } |
5692 | - } |
|
5693 | - else |
|
5427 | + } else |
|
5694 | 5428 | { |
5695 | 5429 | for ($j = $start; $j <= $i; $j++) |
5696 | 5430 | { |
@@ -5771,8 +5505,7 @@ discard block |
||
5771 | 5505 | if ($iri === null) |
5772 | 5506 | { |
5773 | 5507 | return true; |
5774 | - } |
|
5775 | - elseif (isset($cache[$iri])) |
|
5508 | + } elseif (isset($cache[$iri])) |
|
5776 | 5509 | { |
5777 | 5510 | list($this->scheme, |
5778 | 5511 | $this->iuserinfo, |
@@ -5783,8 +5516,7 @@ discard block |
||
5783 | 5516 | $this->ifragment, |
5784 | 5517 | $return) = $cache[$iri]; |
5785 | 5518 | return $return; |
5786 | - } |
|
5787 | - else |
|
5519 | + } else |
|
5788 | 5520 | { |
5789 | 5521 | $parsed = $this->parse_iri((string) $iri); |
5790 | 5522 | if (!$parsed) |
@@ -5813,13 +5545,11 @@ discard block |
||
5813 | 5545 | if ($scheme === null) |
5814 | 5546 | { |
5815 | 5547 | $this->scheme = null; |
5816 | - } |
|
5817 | - elseif (!preg_match('/^[A-Za-z][0-9A-Za-z+\-.]*$/', $scheme)) |
|
5548 | + } elseif (!preg_match('/^[A-Za-z][0-9A-Za-z+\-.]*$/', $scheme)) |
|
5818 | 5549 | { |
5819 | 5550 | $this->scheme = null; |
5820 | 5551 | return false; |
5821 | - } |
|
5822 | - else |
|
5552 | + } else |
|
5823 | 5553 | { |
5824 | 5554 | $this->scheme = strtolower($scheme); |
5825 | 5555 | } |
@@ -5829,32 +5559,30 @@ discard block |
||
5829 | 5559 | public function set_authority($authority) |
5830 | 5560 | { |
5831 | 5561 | static $cache; |
5832 | - if (!$cache) |
|
5833 | - $cache = array(); |
|
5562 | + if (!$cache) { |
|
5563 | + $cache = array(); |
|
5564 | + } |
|
5834 | 5565 | if ($authority === null) |
5835 | 5566 | { |
5836 | 5567 | $this->iuserinfo = null; |
5837 | 5568 | $this->ihost = null; |
5838 | 5569 | $this->port = null; |
5839 | 5570 | return true; |
5840 | - } |
|
5841 | - elseif (isset($cache[$authority])) |
|
5571 | + } elseif (isset($cache[$authority])) |
|
5842 | 5572 | { |
5843 | 5573 | list($this->iuserinfo, |
5844 | 5574 | $this->ihost, |
5845 | 5575 | $this->port, |
5846 | 5576 | $return) = $cache[$authority]; |
5847 | 5577 | return $return; |
5848 | - } |
|
5849 | - else |
|
5578 | + } else |
|
5850 | 5579 | { |
5851 | 5580 | $remaining = $authority; |
5852 | 5581 | if (($iuserinfo_end = strrpos($remaining, '@')) !== false) |
5853 | 5582 | { |
5854 | 5583 | $iuserinfo = substr($remaining, 0, $iuserinfo_end); |
5855 | 5584 | $remaining = substr($remaining, $iuserinfo_end + 1); |
5856 | - } |
|
5857 | - else |
|
5585 | + } else |
|
5858 | 5586 | { |
5859 | 5587 | $iuserinfo = null; |
5860 | 5588 | } |
@@ -5865,8 +5593,7 @@ discard block |
||
5865 | 5593 | $port = null; |
5866 | 5594 | } |
5867 | 5595 | $remaining = substr($remaining, 0, $port_start); |
5868 | - } |
|
5869 | - else |
|
5596 | + } else |
|
5870 | 5597 | { |
5871 | 5598 | $port = null; |
5872 | 5599 | } |
@@ -5886,8 +5613,7 @@ discard block |
||
5886 | 5613 | if ($iuserinfo === null) |
5887 | 5614 | { |
5888 | 5615 | $this->iuserinfo = null; |
5889 | - } |
|
5890 | - else |
|
5616 | + } else |
|
5891 | 5617 | { |
5892 | 5618 | $this->iuserinfo = $this->replace_invalid_with_pct_encoding($iuserinfo, '!$&\'()*+,;=:'); |
5893 | 5619 | $this->scheme_normalization(); |
@@ -5901,20 +5627,17 @@ discard block |
||
5901 | 5627 | { |
5902 | 5628 | $this->ihost = null; |
5903 | 5629 | return true; |
5904 | - } |
|
5905 | - elseif (substr($ihost, 0, 1) === '[' && substr($ihost, -1) === ']') |
|
5630 | + } elseif (substr($ihost, 0, 1) === '[' && substr($ihost, -1) === ']') |
|
5906 | 5631 | { |
5907 | 5632 | if (SimplePie_Net_IPv6::check_ipv6(substr($ihost, 1, -1))) |
5908 | 5633 | { |
5909 | 5634 | $this->ihost = '[' . SimplePie_Net_IPv6::compress(substr($ihost, 1, -1)) . ']'; |
5910 | - } |
|
5911 | - else |
|
5635 | + } else |
|
5912 | 5636 | { |
5913 | 5637 | $this->ihost = null; |
5914 | 5638 | return false; |
5915 | 5639 | } |
5916 | - } |
|
5917 | - else |
|
5640 | + } else |
|
5918 | 5641 | { |
5919 | 5642 | $ihost = $this->replace_invalid_with_pct_encoding($ihost, '!$&\'()*+,;='); |
5920 | 5643 | // Lowercase, but ignore pct-encoded sections (as they should |
@@ -5927,8 +5650,7 @@ discard block |
||
5927 | 5650 | if ($ihost[$position] === '%') |
5928 | 5651 | { |
5929 | 5652 | $position += 3; |
5930 | - } |
|
5931 | - else |
|
5653 | + } else |
|
5932 | 5654 | { |
5933 | 5655 | $ihost[$position] = strtolower($ihost[$position]); |
5934 | 5656 | $position++; |
@@ -5946,14 +5668,12 @@ discard block |
||
5946 | 5668 | { |
5947 | 5669 | $this->port = null; |
5948 | 5670 | return true; |
5949 | - } |
|
5950 | - elseif (strspn($port, '0123456789') === strlen($port)) |
|
5671 | + } elseif (strspn($port, '0123456789') === strlen($port)) |
|
5951 | 5672 | { |
5952 | 5673 | $this->port = (int) $port; |
5953 | 5674 | $this->scheme_normalization(); |
5954 | 5675 | return true; |
5955 | - } |
|
5956 | - else |
|
5676 | + } else |
|
5957 | 5677 | { |
5958 | 5678 | $this->port = null; |
5959 | 5679 | return false; |
@@ -5971,8 +5691,7 @@ discard block |
||
5971 | 5691 | if (isset($cache[$ipath])) |
5972 | 5692 | { |
5973 | 5693 | $this->ipath = $cache[$ipath][(int) ($this->scheme !== null)]; |
5974 | - } |
|
5975 | - else |
|
5694 | + } else |
|
5976 | 5695 | { |
5977 | 5696 | $valid = $this->replace_invalid_with_pct_encoding($ipath, '!$&\'()*+,;=@:/'); |
5978 | 5697 | $removed = $this->remove_dot_segments($valid); |
@@ -5988,8 +5707,7 @@ discard block |
||
5988 | 5707 | if ($iquery === null) |
5989 | 5708 | { |
5990 | 5709 | $this->iquery = null; |
5991 | - } |
|
5992 | - else |
|
5710 | + } else |
|
5993 | 5711 | { |
5994 | 5712 | $this->iquery = $this->replace_invalid_with_pct_encoding($iquery, '!$&\'()*+,;=:@/?', true); |
5995 | 5713 | $this->scheme_normalization(); |
@@ -6002,8 +5720,7 @@ discard block |
||
6002 | 5720 | if ($ifragment === null) |
6003 | 5721 | { |
6004 | 5722 | $this->ifragment = null; |
6005 | - } |
|
6006 | - else |
|
5723 | + } else |
|
6007 | 5724 | { |
6008 | 5725 | $this->ifragment = $this->replace_invalid_with_pct_encoding($ifragment, '!$&\'()*+,;=:@/?'); |
6009 | 5726 | $this->scheme_normalization(); |
@@ -6047,8 +5764,7 @@ discard block |
||
6047 | 5764 | if ($this->ipath !== '') |
6048 | 5765 | { |
6049 | 5766 | $iri .= $this->ipath; |
6050 | - } |
|
6051 | - elseif (!empty($this->normalization[$this->scheme]['ipath']) && $iauthority !== null && $iauthority !== '') |
|
5767 | + } elseif (!empty($this->normalization[$this->scheme]['ipath']) && $iauthority !== null && $iauthority !== '') |
|
6052 | 5768 | { |
6053 | 5769 | $iri .= $this->normalization[$this->scheme]['ipath']; |
6054 | 5770 | } |
@@ -6086,8 +5802,7 @@ discard block |
||
6086 | 5802 | $iauthority .= ':' . $this->port; |
6087 | 5803 | } |
6088 | 5804 | return $iauthority; |
6089 | - } |
|
6090 | - else |
|
5805 | + } else |
|
6091 | 5806 | { |
6092 | 5807 | return null; |
6093 | 5808 | } |
@@ -6096,10 +5811,11 @@ discard block |
||
6096 | 5811 | protected function get_authority() |
6097 | 5812 | { |
6098 | 5813 | $iauthority = $this->get_iauthority(); |
6099 | - if (is_string($iauthority)) |
|
6100 | - return $this->to_uri($iauthority); |
|
6101 | - else |
|
6102 | - return $iauthority; |
|
5814 | + if (is_string($iauthority)) { |
|
5815 | + return $this->to_uri($iauthority); |
|
5816 | + } else { |
|
5817 | + return $iauthority; |
|
5818 | + } |
|
6103 | 5819 | } |
6104 | 5820 | } |
6105 | 5821 | class SimplePie_Item |
@@ -6140,8 +5856,7 @@ discard block |
||
6140 | 5856 | if (isset($this->data['child'][$namespace][$tag])) |
6141 | 5857 | { |
6142 | 5858 | return $this->data['child'][$namespace][$tag]; |
6143 | - } |
|
6144 | - else |
|
5859 | + } else |
|
6145 | 5860 | { |
6146 | 5861 | return null; |
6147 | 5862 | } |
@@ -6169,32 +5884,25 @@ discard block |
||
6169 | 5884 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id')) |
6170 | 5885 | { |
6171 | 5886 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6172 | - } |
|
6173 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'id')) |
|
5887 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'id')) |
|
6174 | 5888 | { |
6175 | 5889 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6176 | - } |
|
6177 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid')) |
|
5890 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid')) |
|
6178 | 5891 | { |
6179 | 5892 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6180 | - } |
|
6181 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'identifier')) |
|
5893 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'identifier')) |
|
6182 | 5894 | { |
6183 | 5895 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6184 | - } |
|
6185 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'identifier')) |
|
5896 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'identifier')) |
|
6186 | 5897 | { |
6187 | 5898 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6188 | - } |
|
6189 | - elseif (isset($this->data['attribs'][SIMPLEPIE_NAMESPACE_RDF]['about'])) |
|
5899 | + } elseif (isset($this->data['attribs'][SIMPLEPIE_NAMESPACE_RDF]['about'])) |
|
6190 | 5900 | { |
6191 | 5901 | return $this->sanitize($this->data['attribs'][SIMPLEPIE_NAMESPACE_RDF]['about'], SIMPLEPIE_CONSTRUCT_TEXT); |
6192 | - } |
|
6193 | - elseif (($return = $this->get_permalink()) !== null) |
|
5902 | + } elseif (($return = $this->get_permalink()) !== null) |
|
6194 | 5903 | { |
6195 | 5904 | return $return; |
6196 | - } |
|
6197 | - elseif (($return = $this->get_title()) !== null) |
|
5905 | + } elseif (($return = $this->get_title()) !== null) |
|
6198 | 5906 | { |
6199 | 5907 | return $return; |
6200 | 5908 | } |
@@ -6202,8 +5910,7 @@ discard block |
||
6202 | 5910 | if ($this->get_permalink() !== null || $this->get_title() !== null) |
6203 | 5911 | { |
6204 | 5912 | return md5($this->get_permalink() . $this->get_title()); |
6205 | - } |
|
6206 | - else |
|
5913 | + } else |
|
6207 | 5914 | { |
6208 | 5915 | return md5(serialize($this->data)); |
6209 | 5916 | } |
@@ -6216,32 +5923,25 @@ discard block |
||
6216 | 5923 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) |
6217 | 5924 | { |
6218 | 5925 | $this->data['title'] = $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
6219 | - } |
|
6220 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) |
|
5926 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) |
|
6221 | 5927 | { |
6222 | 5928 | $this->data['title'] = $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
6223 | - } |
|
6224 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
|
5929 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
|
6225 | 5930 | { |
6226 | 5931 | $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
6227 | - } |
|
6228 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
5932 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
6229 | 5933 | { |
6230 | 5934 | $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
6231 | - } |
|
6232 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
5935 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
6233 | 5936 | { |
6234 | 5937 | $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
6235 | - } |
|
6236 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
5938 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
6237 | 5939 | { |
6238 | 5940 | $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6239 | - } |
|
6240 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
5941 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
6241 | 5942 | { |
6242 | 5943 | $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6243 | - } |
|
6244 | - else |
|
5944 | + } else |
|
6245 | 5945 | { |
6246 | 5946 | $this->data['title'] = null; |
6247 | 5947 | } |
@@ -6254,44 +5954,34 @@ discard block |
||
6254 | 5954 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'summary')) |
6255 | 5955 | { |
6256 | 5956 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
6257 | - } |
|
6258 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'summary')) |
|
5957 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'summary')) |
|
6259 | 5958 | { |
6260 | 5959 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
6261 | - } |
|
6262 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) |
|
5960 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) |
|
6263 | 5961 | { |
6264 | 5962 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
6265 | - } |
|
6266 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) |
|
5963 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) |
|
6267 | 5964 | { |
6268 | 5965 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); |
6269 | - } |
|
6270 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) |
|
5966 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) |
|
6271 | 5967 | { |
6272 | 5968 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6273 | - } |
|
6274 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) |
|
5969 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) |
|
6275 | 5970 | { |
6276 | 5971 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6277 | - } |
|
6278 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) |
|
5972 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) |
|
6279 | 5973 | { |
6280 | 5974 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); |
6281 | - } |
|
6282 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) |
|
5975 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) |
|
6283 | 5976 | { |
6284 | 5977 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6285 | - } |
|
6286 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) |
|
5978 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) |
|
6287 | 5979 | { |
6288 | 5980 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML); |
6289 | - } |
|
6290 | - elseif (!$description_only) |
|
5981 | + } elseif (!$description_only) |
|
6291 | 5982 | { |
6292 | 5983 | return $this->get_content(true); |
6293 | - } |
|
6294 | - else |
|
5984 | + } else |
|
6295 | 5985 | { |
6296 | 5986 | return null; |
6297 | 5987 | } |
@@ -6302,20 +5992,16 @@ discard block |
||
6302 | 5992 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'content')) |
6303 | 5993 | { |
6304 | 5994 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_content_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
6305 | - } |
|
6306 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'content')) |
|
5995 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'content')) |
|
6307 | 5996 | { |
6308 | 5997 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
6309 | - } |
|
6310 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT, 'encoded')) |
|
5998 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT, 'encoded')) |
|
6311 | 5999 | { |
6312 | 6000 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); |
6313 | - } |
|
6314 | - elseif (!$content_only) |
|
6001 | + } elseif (!$content_only) |
|
6315 | 6002 | { |
6316 | 6003 | return $this->get_description(true); |
6317 | - } |
|
6318 | - else |
|
6004 | + } else |
|
6319 | 6005 | { |
6320 | 6006 | return null; |
6321 | 6007 | } |
@@ -6327,8 +6013,7 @@ discard block |
||
6327 | 6013 | if (isset($categories[$key])) |
6328 | 6014 | { |
6329 | 6015 | return $categories[$key]; |
6330 | - } |
|
6331 | - else |
|
6016 | + } else |
|
6332 | 6017 | { |
6333 | 6018 | return null; |
6334 | 6019 | } |
@@ -6364,8 +6049,7 @@ discard block |
||
6364 | 6049 | if (isset($category['attribs']['']['domain'])) |
6365 | 6050 | { |
6366 | 6051 | $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); |
6367 | - } |
|
6368 | - else |
|
6052 | + } else |
|
6369 | 6053 | { |
6370 | 6054 | $scheme = null; |
6371 | 6055 | } |
@@ -6382,8 +6066,7 @@ discard block |
||
6382 | 6066 | if (!empty($categories)) |
6383 | 6067 | { |
6384 | 6068 | return array_unique($categories); |
6385 | - } |
|
6386 | - else |
|
6069 | + } else |
|
6387 | 6070 | { |
6388 | 6071 | return null; |
6389 | 6072 | } |
@@ -6395,8 +6078,7 @@ discard block |
||
6395 | 6078 | if (isset($authors[$key])) |
6396 | 6079 | { |
6397 | 6080 | return $authors[$key]; |
6398 | - } |
|
6399 | - else |
|
6081 | + } else |
|
6400 | 6082 | { |
6401 | 6083 | return null; |
6402 | 6084 | } |
@@ -6408,8 +6090,7 @@ discard block |
||
6408 | 6090 | if (isset($contributors[$key])) |
6409 | 6091 | { |
6410 | 6092 | return $contributors[$key]; |
6411 | - } |
|
6412 | - else |
|
6093 | + } else |
|
6413 | 6094 | { |
6414 | 6095 | return null; |
6415 | 6096 | } |
@@ -6465,8 +6146,7 @@ discard block |
||
6465 | 6146 | if (!empty($contributors)) |
6466 | 6147 | { |
6467 | 6148 | return array_unique($contributors); |
6468 | - } |
|
6469 | - else |
|
6149 | + } else |
|
6470 | 6150 | { |
6471 | 6151 | return null; |
6472 | 6152 | } |
@@ -6538,16 +6218,13 @@ discard block |
||
6538 | 6218 | if (!empty($authors)) |
6539 | 6219 | { |
6540 | 6220 | return array_unique($authors); |
6541 | - } |
|
6542 | - elseif (($source = $this->get_source()) && ($authors = $source->get_authors())) |
|
6221 | + } elseif (($source = $this->get_source()) && ($authors = $source->get_authors())) |
|
6543 | 6222 | { |
6544 | 6223 | return $authors; |
6545 | - } |
|
6546 | - elseif ($authors = $this->feed->get_authors()) |
|
6224 | + } elseif ($authors = $this->feed->get_authors()) |
|
6547 | 6225 | { |
6548 | 6226 | return $authors; |
6549 | - } |
|
6550 | - else |
|
6227 | + } else |
|
6551 | 6228 | { |
6552 | 6229 | return null; |
6553 | 6230 | } |
@@ -6558,16 +6235,13 @@ discard block |
||
6558 | 6235 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights')) |
6559 | 6236 | { |
6560 | 6237 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
6561 | - } |
|
6562 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) |
|
6238 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) |
|
6563 | 6239 | { |
6564 | 6240 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6565 | - } |
|
6566 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) |
|
6241 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) |
|
6567 | 6242 | { |
6568 | 6243 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
6569 | - } |
|
6570 | - else |
|
6244 | + } else |
|
6571 | 6245 | { |
6572 | 6246 | return null; |
6573 | 6247 | } |
@@ -6580,32 +6254,25 @@ discard block |
||
6580 | 6254 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'published')) |
6581 | 6255 | { |
6582 | 6256 | $this->data['date']['raw'] = $return[0]['data']; |
6583 | - } |
|
6584 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'updated')) |
|
6257 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'updated')) |
|
6585 | 6258 | { |
6586 | 6259 | $this->data['date']['raw'] = $return[0]['data']; |
6587 | - } |
|
6588 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'issued')) |
|
6260 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'issued')) |
|
6589 | 6261 | { |
6590 | 6262 | $this->data['date']['raw'] = $return[0]['data']; |
6591 | - } |
|
6592 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'created')) |
|
6263 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'created')) |
|
6593 | 6264 | { |
6594 | 6265 | $this->data['date']['raw'] = $return[0]['data']; |
6595 | - } |
|
6596 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'modified')) |
|
6266 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'modified')) |
|
6597 | 6267 | { |
6598 | 6268 | $this->data['date']['raw'] = $return[0]['data']; |
6599 | - } |
|
6600 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'pubDate')) |
|
6269 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'pubDate')) |
|
6601 | 6270 | { |
6602 | 6271 | $this->data['date']['raw'] = $return[0]['data']; |
6603 | - } |
|
6604 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'date')) |
|
6272 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'date')) |
|
6605 | 6273 | { |
6606 | 6274 | $this->data['date']['raw'] = $return[0]['data']; |
6607 | - } |
|
6608 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'date')) |
|
6275 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'date')) |
|
6609 | 6276 | { |
6610 | 6277 | $this->data['date']['raw'] = $return[0]['data']; |
6611 | 6278 | } |
@@ -6613,8 +6280,7 @@ discard block |
||
6613 | 6280 | { |
6614 | 6281 | $parser = $this->registry->call('Parse_Date', 'get'); |
6615 | 6282 | $this->data['date']['parsed'] = $parser->parse($this->data['date']['raw']); |
6616 | - } |
|
6617 | - else |
|
6283 | + } else |
|
6618 | 6284 | { |
6619 | 6285 | $this->data['date'] = null; |
6620 | 6286 | } |
@@ -6631,8 +6297,7 @@ discard block |
||
6631 | 6297 | default: |
6632 | 6298 | return date($date_format, $this->data['date']['parsed']); |
6633 | 6299 | } |
6634 | - } |
|
6635 | - else |
|
6300 | + } else |
|
6636 | 6301 | { |
6637 | 6302 | return null; |
6638 | 6303 | } |
@@ -6650,8 +6315,7 @@ discard block |
||
6650 | 6315 | { |
6651 | 6316 | $parser = $this->registry->call('Parse_Date', 'get'); |
6652 | 6317 | $this->data['updated']['parsed'] = $parser->parse($this->data['date']['raw']); |
6653 | - } |
|
6654 | - else |
|
6318 | + } else |
|
6655 | 6319 | { |
6656 | 6320 | $this->data['updated'] = null; |
6657 | 6321 | } |
@@ -6668,8 +6332,7 @@ discard block |
||
6668 | 6332 | default: |
6669 | 6333 | return date($date_format, $this->data['updated']['parsed']); |
6670 | 6334 | } |
6671 | - } |
|
6672 | - else |
|
6335 | + } else |
|
6673 | 6336 | { |
6674 | 6337 | return null; |
6675 | 6338 | } |
@@ -6680,12 +6343,10 @@ discard block |
||
6680 | 6343 | if (!$date_format) |
6681 | 6344 | { |
6682 | 6345 | return $this->sanitize($this->get_date(''), SIMPLEPIE_CONSTRUCT_TEXT); |
6683 | - } |
|
6684 | - elseif (($date = $this->get_date('U')) !== null && $date !== false) |
|
6346 | + } elseif (($date = $this->get_date('U')) !== null && $date !== false) |
|
6685 | 6347 | { |
6686 | 6348 | return strftime($date_format, $date); |
6687 | - } |
|
6688 | - else |
|
6349 | + } else |
|
6689 | 6350 | { |
6690 | 6351 | return null; |
6691 | 6352 | } |
@@ -6718,12 +6379,10 @@ discard block |
||
6718 | 6379 | if ($link !== null) |
6719 | 6380 | { |
6720 | 6381 | return $link; |
6721 | - } |
|
6722 | - elseif ($enclosure !== null) |
|
6382 | + } elseif ($enclosure !== null) |
|
6723 | 6383 | { |
6724 | 6384 | return $enclosure->get_link(); |
6725 | - } |
|
6726 | - else |
|
6385 | + } else |
|
6727 | 6386 | { |
6728 | 6387 | return null; |
6729 | 6388 | } |
@@ -6735,8 +6394,7 @@ discard block |
||
6735 | 6394 | if ($links[$key] !== null) |
6736 | 6395 | { |
6737 | 6396 | return $links[$key]; |
6738 | - } |
|
6739 | - else |
|
6397 | + } else |
|
6740 | 6398 | { |
6741 | 6399 | return null; |
6742 | 6400 | } |
@@ -6791,13 +6449,11 @@ discard block |
||
6791 | 6449 | { |
6792 | 6450 | $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]); |
6793 | 6451 | $this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]; |
6794 | - } |
|
6795 | - else |
|
6452 | + } else |
|
6796 | 6453 | { |
6797 | 6454 | $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; |
6798 | 6455 | } |
6799 | - } |
|
6800 | - elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) |
|
6456 | + } elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) |
|
6801 | 6457 | { |
6802 | 6458 | $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; |
6803 | 6459 | } |
@@ -6807,8 +6463,7 @@ discard block |
||
6807 | 6463 | if (isset($this->data['links'][$rel])) |
6808 | 6464 | { |
6809 | 6465 | return $this->data['links'][$rel]; |
6810 | - } |
|
6811 | - else |
|
6466 | + } else |
|
6812 | 6467 | { |
6813 | 6468 | return null; |
6814 | 6469 | } |
@@ -6820,8 +6475,7 @@ discard block |
||
6820 | 6475 | if (isset($enclosures[$key])) |
6821 | 6476 | { |
6822 | 6477 | return $enclosures[$key]; |
6823 | - } |
|
6824 | - else |
|
6478 | + } else |
|
6825 | 6479 | { |
6826 | 6480 | return null; |
6827 | 6481 | } |
@@ -6880,8 +6534,7 @@ discard block |
||
6880 | 6534 | } |
6881 | 6535 | $captions_parent[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text)); |
6882 | 6536 | } |
6883 | - } |
|
6884 | - elseif ($captions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text')) |
|
6537 | + } elseif ($captions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text')) |
|
6885 | 6538 | { |
6886 | 6539 | foreach ($captions as $caption) |
6887 | 6540 | { |
@@ -6930,8 +6583,7 @@ discard block |
||
6930 | 6583 | if (isset($category['attribs']['']['scheme'])) |
6931 | 6584 | { |
6932 | 6585 | $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
6933 | - } |
|
6934 | - else |
|
6586 | + } else |
|
6935 | 6587 | { |
6936 | 6588 | $scheme = 'http://search.yahoo.com/mrss/category_schema'; |
6937 | 6589 | } |
@@ -6953,8 +6605,7 @@ discard block |
||
6953 | 6605 | if (isset($category['attribs']['']['scheme'])) |
6954 | 6606 | { |
6955 | 6607 | $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
6956 | - } |
|
6957 | - else |
|
6608 | + } else |
|
6958 | 6609 | { |
6959 | 6610 | $scheme = 'http://search.yahoo.com/mrss/category_schema'; |
6960 | 6611 | } |
@@ -7004,8 +6655,7 @@ discard block |
||
7004 | 6655 | $copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
7005 | 6656 | } |
7006 | 6657 | $copyrights_parent = $this->registry->create('Copyright', array($copyright_url, $copyright_label)); |
7007 | - } |
|
7008 | - elseif ($copyright = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright')) |
|
6658 | + } elseif ($copyright = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright')) |
|
7009 | 6659 | { |
7010 | 6660 | $copyright_url = null; |
7011 | 6661 | $copyright_label = null; |
@@ -7034,8 +6684,7 @@ discard block |
||
7034 | 6684 | if (isset($credit['attribs']['']['scheme'])) |
7035 | 6685 | { |
7036 | 6686 | $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7037 | - } |
|
7038 | - else |
|
6687 | + } else |
|
7039 | 6688 | { |
7040 | 6689 | $credit_scheme = 'urn:ebu'; |
7041 | 6690 | } |
@@ -7045,8 +6694,7 @@ discard block |
||
7045 | 6694 | } |
7046 | 6695 | $credits_parent[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name)); |
7047 | 6696 | } |
7048 | - } |
|
7049 | - elseif ($credits = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit')) |
|
6697 | + } elseif ($credits = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit')) |
|
7050 | 6698 | { |
7051 | 6699 | foreach ($credits as $credit) |
7052 | 6700 | { |
@@ -7060,8 +6708,7 @@ discard block |
||
7060 | 6708 | if (isset($credit['attribs']['']['scheme'])) |
7061 | 6709 | { |
7062 | 6710 | $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7063 | - } |
|
7064 | - else |
|
6711 | + } else |
|
7065 | 6712 | { |
7066 | 6713 | $credit_scheme = 'urn:ebu'; |
7067 | 6714 | } |
@@ -7083,8 +6730,7 @@ discard block |
||
7083 | 6730 | { |
7084 | 6731 | $description_parent = $this->sanitize($description_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
7085 | 6732 | } |
7086 | - } |
|
7087 | - elseif ($description_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'description')) |
|
6733 | + } elseif ($description_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'description')) |
|
7088 | 6734 | { |
7089 | 6735 | if (isset($description_parent[0]['data'])) |
7090 | 6736 | { |
@@ -7132,15 +6778,13 @@ discard block |
||
7132 | 6778 | if (isset($hash['attribs']['']['algo'])) |
7133 | 6779 | { |
7134 | 6780 | $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); |
7135 | - } |
|
7136 | - else |
|
6781 | + } else |
|
7137 | 6782 | { |
7138 | 6783 | $algo = 'md5'; |
7139 | 6784 | } |
7140 | 6785 | $hashes_parent[] = $algo.':'.$value; |
7141 | 6786 | } |
7142 | - } |
|
7143 | - elseif ($hashes_iterator = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash')) |
|
6787 | + } elseif ($hashes_iterator = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash')) |
|
7144 | 6788 | { |
7145 | 6789 | foreach ($hashes_iterator as $hash) |
7146 | 6790 | { |
@@ -7153,8 +6797,7 @@ discard block |
||
7153 | 6797 | if (isset($hash['attribs']['']['algo'])) |
7154 | 6798 | { |
7155 | 6799 | $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); |
7156 | - } |
|
7157 | - else |
|
6800 | + } else |
|
7158 | 6801 | { |
7159 | 6802 | $algo = 'md5'; |
7160 | 6803 | } |
@@ -7177,8 +6820,7 @@ discard block |
||
7177 | 6820 | } |
7178 | 6821 | } |
7179 | 6822 | unset($temp); |
7180 | - } |
|
7181 | - elseif ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords')) |
|
6823 | + } elseif ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords')) |
|
7182 | 6824 | { |
7183 | 6825 | if (isset($keywords[0]['data'])) |
7184 | 6826 | { |
@@ -7189,8 +6831,7 @@ discard block |
||
7189 | 6831 | } |
7190 | 6832 | } |
7191 | 6833 | unset($temp); |
7192 | - } |
|
7193 | - elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords')) |
|
6834 | + } elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords')) |
|
7194 | 6835 | { |
7195 | 6836 | if (isset($keywords[0]['data'])) |
7196 | 6837 | { |
@@ -7201,8 +6842,7 @@ discard block |
||
7201 | 6842 | } |
7202 | 6843 | } |
7203 | 6844 | unset($temp); |
7204 | - } |
|
7205 | - elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords')) |
|
6845 | + } elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords')) |
|
7206 | 6846 | { |
7207 | 6847 | if (isset($keywords[0]['data'])) |
7208 | 6848 | { |
@@ -7225,8 +6865,7 @@ discard block |
||
7225 | 6865 | { |
7226 | 6866 | $player_parent = $this->sanitize($player_parent[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); |
7227 | 6867 | } |
7228 | - } |
|
7229 | - elseif ($player_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'player')) |
|
6868 | + } elseif ($player_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'player')) |
|
7230 | 6869 | { |
7231 | 6870 | if (isset($player_parent[0]['attribs']['']['url'])) |
7232 | 6871 | { |
@@ -7243,8 +6882,7 @@ discard block |
||
7243 | 6882 | if (isset($rating['attribs']['']['scheme'])) |
7244 | 6883 | { |
7245 | 6884 | $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7246 | - } |
|
7247 | - else |
|
6885 | + } else |
|
7248 | 6886 | { |
7249 | 6887 | $rating_scheme = 'urn:simple'; |
7250 | 6888 | } |
@@ -7254,8 +6892,7 @@ discard block |
||
7254 | 6892 | } |
7255 | 6893 | $ratings_parent[] = $this->registry->create('Rating', array($rating_scheme, $rating_value)); |
7256 | 6894 | } |
7257 | - } |
|
7258 | - elseif ($ratings = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit')) |
|
6895 | + } elseif ($ratings = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit')) |
|
7259 | 6896 | { |
7260 | 6897 | foreach ($ratings as $rating) |
7261 | 6898 | { |
@@ -7267,8 +6904,7 @@ discard block |
||
7267 | 6904 | } |
7268 | 6905 | $ratings_parent[] = $this->registry->create('Rating', array($rating_scheme, $rating_value)); |
7269 | 6906 | } |
7270 | - } |
|
7271 | - elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'rating')) |
|
6907 | + } elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'rating')) |
|
7272 | 6908 | { |
7273 | 6909 | foreach ($ratings as $rating) |
7274 | 6910 | { |
@@ -7277,8 +6913,7 @@ discard block |
||
7277 | 6913 | if (isset($rating['attribs']['']['scheme'])) |
7278 | 6914 | { |
7279 | 6915 | $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7280 | - } |
|
7281 | - else |
|
6916 | + } else |
|
7282 | 6917 | { |
7283 | 6918 | $rating_scheme = 'urn:simple'; |
7284 | 6919 | } |
@@ -7288,8 +6923,7 @@ discard block |
||
7288 | 6923 | } |
7289 | 6924 | $ratings_parent[] = $this->registry->create('Rating', array($rating_scheme, $rating_value)); |
7290 | 6925 | } |
7291 | - } |
|
7292 | - elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit')) |
|
6926 | + } elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit')) |
|
7293 | 6927 | { |
7294 | 6928 | foreach ($ratings as $rating) |
7295 | 6929 | { |
@@ -7328,8 +6962,7 @@ discard block |
||
7328 | 6962 | } |
7329 | 6963 | $restrictions_parent[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value)); |
7330 | 6964 | } |
7331 | - } |
|
7332 | - elseif ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block')) |
|
6965 | + } elseif ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block')) |
|
7333 | 6966 | { |
7334 | 6967 | foreach ($restrictions as $restriction) |
7335 | 6968 | { |
@@ -7342,8 +6975,7 @@ discard block |
||
7342 | 6975 | } |
7343 | 6976 | $restrictions_parent[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value)); |
7344 | 6977 | } |
7345 | - } |
|
7346 | - elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction')) |
|
6978 | + } elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction')) |
|
7347 | 6979 | { |
7348 | 6980 | foreach ($restrictions as $restriction) |
7349 | 6981 | { |
@@ -7364,8 +6996,7 @@ discard block |
||
7364 | 6996 | } |
7365 | 6997 | $restrictions_parent[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value)); |
7366 | 6998 | } |
7367 | - } |
|
7368 | - elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block')) |
|
6999 | + } elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block')) |
|
7369 | 7000 | { |
7370 | 7001 | foreach ($restrictions as $restriction) |
7371 | 7002 | { |
@@ -7382,8 +7013,7 @@ discard block |
||
7382 | 7013 | if (is_array($restrictions_parent)) |
7383 | 7014 | { |
7384 | 7015 | $restrictions_parent = array_values(array_unique($restrictions_parent)); |
7385 | - } |
|
7386 | - else |
|
7016 | + } else |
|
7387 | 7017 | { |
7388 | 7018 | $restrictions_parent = array(new SimplePie_Restriction('allow', null, 'default')); |
7389 | 7019 | } |
@@ -7397,8 +7027,7 @@ discard block |
||
7397 | 7027 | $thumbnails_parent[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); |
7398 | 7028 | } |
7399 | 7029 | } |
7400 | - } |
|
7401 | - elseif ($thumbnails = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail')) |
|
7030 | + } elseif ($thumbnails = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail')) |
|
7402 | 7031 | { |
7403 | 7032 | foreach ($thumbnails as $thumbnail) |
7404 | 7033 | { |
@@ -7415,8 +7044,7 @@ discard block |
||
7415 | 7044 | { |
7416 | 7045 | $title_parent = $this->sanitize($title_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
7417 | 7046 | } |
7418 | - } |
|
7419 | - elseif ($title_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'title')) |
|
7047 | + } elseif ($title_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'title')) |
|
7420 | 7048 | { |
7421 | 7049 | if (isset($title_parent[0]['data'])) |
7422 | 7050 | { |
@@ -7503,8 +7131,7 @@ discard block |
||
7503 | 7131 | if (isset($content['attribs']['']['duration'])) |
7504 | 7132 | { |
7505 | 7133 | $duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT); |
7506 | - } |
|
7507 | - else |
|
7134 | + } else |
|
7508 | 7135 | { |
7509 | 7136 | $duration = $duration_parent; |
7510 | 7137 | } |
@@ -7582,8 +7209,7 @@ discard block |
||
7582 | 7209 | { |
7583 | 7210 | $captions = array_values(array_unique($captions)); |
7584 | 7211 | } |
7585 | - } |
|
7586 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) |
|
7212 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) |
|
7587 | 7213 | { |
7588 | 7214 | foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) |
7589 | 7215 | { |
@@ -7618,8 +7244,7 @@ discard block |
||
7618 | 7244 | { |
7619 | 7245 | $captions = array_values(array_unique($captions)); |
7620 | 7246 | } |
7621 | - } |
|
7622 | - else |
|
7247 | + } else |
|
7623 | 7248 | { |
7624 | 7249 | $captions = $captions_parent; |
7625 | 7250 | } |
@@ -7638,8 +7263,7 @@ discard block |
||
7638 | 7263 | if (isset($category['attribs']['']['scheme'])) |
7639 | 7264 | { |
7640 | 7265 | $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7641 | - } |
|
7642 | - else |
|
7266 | + } else |
|
7643 | 7267 | { |
7644 | 7268 | $scheme = 'http://search.yahoo.com/mrss/category_schema'; |
7645 | 7269 | } |
@@ -7664,8 +7288,7 @@ discard block |
||
7664 | 7288 | if (isset($category['attribs']['']['scheme'])) |
7665 | 7289 | { |
7666 | 7290 | $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7667 | - } |
|
7668 | - else |
|
7291 | + } else |
|
7669 | 7292 | { |
7670 | 7293 | $scheme = 'http://search.yahoo.com/mrss/category_schema'; |
7671 | 7294 | } |
@@ -7679,12 +7302,10 @@ discard block |
||
7679 | 7302 | if (is_array($categories) && is_array($categories_parent)) |
7680 | 7303 | { |
7681 | 7304 | $categories = array_values(array_unique(array_merge($categories, $categories_parent))); |
7682 | - } |
|
7683 | - elseif (is_array($categories)) |
|
7305 | + } elseif (is_array($categories)) |
|
7684 | 7306 | { |
7685 | 7307 | $categories = array_values(array_unique($categories)); |
7686 | - } |
|
7687 | - elseif (is_array($categories_parent)) |
|
7308 | + } elseif (is_array($categories_parent)) |
|
7688 | 7309 | { |
7689 | 7310 | $categories = array_values(array_unique($categories_parent)); |
7690 | 7311 | } |
@@ -7702,8 +7323,7 @@ discard block |
||
7702 | 7323 | $copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
7703 | 7324 | } |
7704 | 7325 | $copyrights = $this->registry->create('Copyright', array($copyright_url, $copyright_label)); |
7705 | - } |
|
7706 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) |
|
7326 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) |
|
7707 | 7327 | { |
7708 | 7328 | $copyright_url = null; |
7709 | 7329 | $copyright_label = null; |
@@ -7716,8 +7336,7 @@ discard block |
||
7716 | 7336 | $copyright_label = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
7717 | 7337 | } |
7718 | 7338 | $copyrights = $this->registry->create('Copyright', array($copyright_url, $copyright_label)); |
7719 | - } |
|
7720 | - else |
|
7339 | + } else |
|
7721 | 7340 | { |
7722 | 7341 | $copyrights = $copyrights_parent; |
7723 | 7342 | } |
@@ -7736,8 +7355,7 @@ discard block |
||
7736 | 7355 | if (isset($credit['attribs']['']['scheme'])) |
7737 | 7356 | { |
7738 | 7357 | $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7739 | - } |
|
7740 | - else |
|
7358 | + } else |
|
7741 | 7359 | { |
7742 | 7360 | $credit_scheme = 'urn:ebu'; |
7743 | 7361 | } |
@@ -7751,8 +7369,7 @@ discard block |
||
7751 | 7369 | { |
7752 | 7370 | $credits = array_values(array_unique($credits)); |
7753 | 7371 | } |
7754 | - } |
|
7755 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) |
|
7372 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) |
|
7756 | 7373 | { |
7757 | 7374 | foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit) |
7758 | 7375 | { |
@@ -7766,8 +7383,7 @@ discard block |
||
7766 | 7383 | if (isset($credit['attribs']['']['scheme'])) |
7767 | 7384 | { |
7768 | 7385 | $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7769 | - } |
|
7770 | - else |
|
7386 | + } else |
|
7771 | 7387 | { |
7772 | 7388 | $credit_scheme = 'urn:ebu'; |
7773 | 7389 | } |
@@ -7781,8 +7397,7 @@ discard block |
||
7781 | 7397 | { |
7782 | 7398 | $credits = array_values(array_unique($credits)); |
7783 | 7399 | } |
7784 | - } |
|
7785 | - else |
|
7400 | + } else |
|
7786 | 7401 | { |
7787 | 7402 | $credits = $credits_parent; |
7788 | 7403 | } |
@@ -7790,12 +7405,10 @@ discard block |
||
7790 | 7405 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) |
7791 | 7406 | { |
7792 | 7407 | $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
7793 | - } |
|
7794 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) |
|
7408 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) |
|
7795 | 7409 | { |
7796 | 7410 | $description = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
7797 | - } |
|
7798 | - else |
|
7411 | + } else |
|
7799 | 7412 | { |
7800 | 7413 | $description = $description_parent; |
7801 | 7414 | } |
@@ -7813,8 +7426,7 @@ discard block |
||
7813 | 7426 | if (isset($hash['attribs']['']['algo'])) |
7814 | 7427 | { |
7815 | 7428 | $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); |
7816 | - } |
|
7817 | - else |
|
7429 | + } else |
|
7818 | 7430 | { |
7819 | 7431 | $algo = 'md5'; |
7820 | 7432 | } |
@@ -7824,8 +7436,7 @@ discard block |
||
7824 | 7436 | { |
7825 | 7437 | $hashes = array_values(array_unique($hashes)); |
7826 | 7438 | } |
7827 | - } |
|
7828 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) |
|
7439 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) |
|
7829 | 7440 | { |
7830 | 7441 | foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash) |
7831 | 7442 | { |
@@ -7838,8 +7449,7 @@ discard block |
||
7838 | 7449 | if (isset($hash['attribs']['']['algo'])) |
7839 | 7450 | { |
7840 | 7451 | $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); |
7841 | - } |
|
7842 | - else |
|
7452 | + } else |
|
7843 | 7453 | { |
7844 | 7454 | $algo = 'md5'; |
7845 | 7455 | } |
@@ -7849,8 +7459,7 @@ discard block |
||
7849 | 7459 | { |
7850 | 7460 | $hashes = array_values(array_unique($hashes)); |
7851 | 7461 | } |
7852 | - } |
|
7853 | - else |
|
7462 | + } else |
|
7854 | 7463 | { |
7855 | 7464 | $hashes = $hashes_parent; |
7856 | 7465 | } |
@@ -7870,8 +7479,7 @@ discard block |
||
7870 | 7479 | { |
7871 | 7480 | $keywords = array_values(array_unique($keywords)); |
7872 | 7481 | } |
7873 | - } |
|
7874 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) |
|
7482 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) |
|
7875 | 7483 | { |
7876 | 7484 | if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'])) |
7877 | 7485 | { |
@@ -7886,8 +7494,7 @@ discard block |
||
7886 | 7494 | { |
7887 | 7495 | $keywords = array_values(array_unique($keywords)); |
7888 | 7496 | } |
7889 | - } |
|
7890 | - else |
|
7497 | + } else |
|
7891 | 7498 | { |
7892 | 7499 | $keywords = $keywords_parent; |
7893 | 7500 | } |
@@ -7895,12 +7502,10 @@ discard block |
||
7895 | 7502 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) |
7896 | 7503 | { |
7897 | 7504 | $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); |
7898 | - } |
|
7899 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) |
|
7505 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) |
|
7900 | 7506 | { |
7901 | 7507 | $player = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); |
7902 | - } |
|
7903 | - else |
|
7508 | + } else |
|
7904 | 7509 | { |
7905 | 7510 | $player = $player_parent; |
7906 | 7511 | } |
@@ -7914,8 +7519,7 @@ discard block |
||
7914 | 7519 | if (isset($rating['attribs']['']['scheme'])) |
7915 | 7520 | { |
7916 | 7521 | $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7917 | - } |
|
7918 | - else |
|
7522 | + } else |
|
7919 | 7523 | { |
7920 | 7524 | $rating_scheme = 'urn:simple'; |
7921 | 7525 | } |
@@ -7929,8 +7533,7 @@ discard block |
||
7929 | 7533 | { |
7930 | 7534 | $ratings = array_values(array_unique($ratings)); |
7931 | 7535 | } |
7932 | - } |
|
7933 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) |
|
7536 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) |
|
7934 | 7537 | { |
7935 | 7538 | foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) |
7936 | 7539 | { |
@@ -7939,8 +7542,7 @@ discard block |
||
7939 | 7542 | if (isset($rating['attribs']['']['scheme'])) |
7940 | 7543 | { |
7941 | 7544 | $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
7942 | - } |
|
7943 | - else |
|
7545 | + } else |
|
7944 | 7546 | { |
7945 | 7547 | $rating_scheme = 'urn:simple'; |
7946 | 7548 | } |
@@ -7954,8 +7556,7 @@ discard block |
||
7954 | 7556 | { |
7955 | 7557 | $ratings = array_values(array_unique($ratings)); |
7956 | 7558 | } |
7957 | - } |
|
7958 | - else |
|
7559 | + } else |
|
7959 | 7560 | { |
7960 | 7561 | $ratings = $ratings_parent; |
7961 | 7562 | } |
@@ -7985,8 +7586,7 @@ discard block |
||
7985 | 7586 | { |
7986 | 7587 | $restrictions = array_values(array_unique($restrictions)); |
7987 | 7588 | } |
7988 | - } |
|
7989 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) |
|
7589 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) |
|
7990 | 7590 | { |
7991 | 7591 | foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction) |
7992 | 7592 | { |
@@ -8011,8 +7611,7 @@ discard block |
||
8011 | 7611 | { |
8012 | 7612 | $restrictions = array_values(array_unique($restrictions)); |
8013 | 7613 | } |
8014 | - } |
|
8015 | - else |
|
7614 | + } else |
|
8016 | 7615 | { |
8017 | 7616 | $restrictions = $restrictions_parent; |
8018 | 7617 | } |
@@ -8027,8 +7626,7 @@ discard block |
||
8027 | 7626 | { |
8028 | 7627 | $thumbnails = array_values(array_unique($thumbnails)); |
8029 | 7628 | } |
8030 | - } |
|
8031 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) |
|
7629 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) |
|
8032 | 7630 | { |
8033 | 7631 | foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) |
8034 | 7632 | { |
@@ -8038,8 +7636,7 @@ discard block |
||
8038 | 7636 | { |
8039 | 7637 | $thumbnails = array_values(array_unique($thumbnails)); |
8040 | 7638 | } |
8041 | - } |
|
8042 | - else |
|
7639 | + } else |
|
8043 | 7640 | { |
8044 | 7641 | $thumbnails = $thumbnails_parent; |
8045 | 7642 | } |
@@ -8047,12 +7644,10 @@ discard block |
||
8047 | 7644 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) |
8048 | 7645 | { |
8049 | 7646 | $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
8050 | - } |
|
8051 | - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) |
|
7647 | + } elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) |
|
8052 | 7648 | { |
8053 | 7649 | $title = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
8054 | - } |
|
8055 | - else |
|
7650 | + } else |
|
8056 | 7651 | { |
8057 | 7652 | $title = $title_parent; |
8058 | 7653 | } |
@@ -8108,8 +7703,7 @@ discard block |
||
8108 | 7703 | if (isset($content['attribs']['']['duration'])) |
8109 | 7704 | { |
8110 | 7705 | $duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT); |
8111 | - } |
|
8112 | - else |
|
7706 | + } else |
|
8113 | 7707 | { |
8114 | 7708 | $duration = $duration_parent; |
8115 | 7709 | } |
@@ -8190,8 +7784,7 @@ discard block |
||
8190 | 7784 | { |
8191 | 7785 | $captions = array_values(array_unique($captions)); |
8192 | 7786 | } |
8193 | - } |
|
8194 | - else |
|
7787 | + } else |
|
8195 | 7788 | { |
8196 | 7789 | $captions = $captions_parent; |
8197 | 7790 | } |
@@ -8210,8 +7803,7 @@ discard block |
||
8210 | 7803 | if (isset($category['attribs']['']['scheme'])) |
8211 | 7804 | { |
8212 | 7805 | $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
8213 | - } |
|
8214 | - else |
|
7806 | + } else |
|
8215 | 7807 | { |
8216 | 7808 | $scheme = 'http://search.yahoo.com/mrss/category_schema'; |
8217 | 7809 | } |
@@ -8225,16 +7817,13 @@ discard block |
||
8225 | 7817 | if (is_array($categories) && is_array($categories_parent)) |
8226 | 7818 | { |
8227 | 7819 | $categories = array_values(array_unique(array_merge($categories, $categories_parent))); |
8228 | - } |
|
8229 | - elseif (is_array($categories)) |
|
7820 | + } elseif (is_array($categories)) |
|
8230 | 7821 | { |
8231 | 7822 | $categories = array_values(array_unique($categories)); |
8232 | - } |
|
8233 | - elseif (is_array($categories_parent)) |
|
7823 | + } elseif (is_array($categories_parent)) |
|
8234 | 7824 | { |
8235 | 7825 | $categories = array_values(array_unique($categories_parent)); |
8236 | - } |
|
8237 | - else |
|
7826 | + } else |
|
8238 | 7827 | { |
8239 | 7828 | $categories = null; |
8240 | 7829 | } |
@@ -8252,8 +7841,7 @@ discard block |
||
8252 | 7841 | $copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
8253 | 7842 | } |
8254 | 7843 | $copyrights = $this->registry->create('Copyright', array($copyright_url, $copyright_label)); |
8255 | - } |
|
8256 | - else |
|
7844 | + } else |
|
8257 | 7845 | { |
8258 | 7846 | $copyrights = $copyrights_parent; |
8259 | 7847 | } |
@@ -8272,8 +7860,7 @@ discard block |
||
8272 | 7860 | if (isset($credit['attribs']['']['scheme'])) |
8273 | 7861 | { |
8274 | 7862 | $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
8275 | - } |
|
8276 | - else |
|
7863 | + } else |
|
8277 | 7864 | { |
8278 | 7865 | $credit_scheme = 'urn:ebu'; |
8279 | 7866 | } |
@@ -8287,8 +7874,7 @@ discard block |
||
8287 | 7874 | { |
8288 | 7875 | $credits = array_values(array_unique($credits)); |
8289 | 7876 | } |
8290 | - } |
|
8291 | - else |
|
7877 | + } else |
|
8292 | 7878 | { |
8293 | 7879 | $credits = $credits_parent; |
8294 | 7880 | } |
@@ -8296,8 +7882,7 @@ discard block |
||
8296 | 7882 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) |
8297 | 7883 | { |
8298 | 7884 | $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
8299 | - } |
|
8300 | - else |
|
7885 | + } else |
|
8301 | 7886 | { |
8302 | 7887 | $description = $description_parent; |
8303 | 7888 | } |
@@ -8315,8 +7900,7 @@ discard block |
||
8315 | 7900 | if (isset($hash['attribs']['']['algo'])) |
8316 | 7901 | { |
8317 | 7902 | $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); |
8318 | - } |
|
8319 | - else |
|
7903 | + } else |
|
8320 | 7904 | { |
8321 | 7905 | $algo = 'md5'; |
8322 | 7906 | } |
@@ -8326,8 +7910,7 @@ discard block |
||
8326 | 7910 | { |
8327 | 7911 | $hashes = array_values(array_unique($hashes)); |
8328 | 7912 | } |
8329 | - } |
|
8330 | - else |
|
7913 | + } else |
|
8331 | 7914 | { |
8332 | 7915 | $hashes = $hashes_parent; |
8333 | 7916 | } |
@@ -8347,8 +7930,7 @@ discard block |
||
8347 | 7930 | { |
8348 | 7931 | $keywords = array_values(array_unique($keywords)); |
8349 | 7932 | } |
8350 | - } |
|
8351 | - else |
|
7933 | + } else |
|
8352 | 7934 | { |
8353 | 7935 | $keywords = $keywords_parent; |
8354 | 7936 | } |
@@ -8356,8 +7938,7 @@ discard block |
||
8356 | 7938 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) |
8357 | 7939 | { |
8358 | 7940 | $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); |
8359 | - } |
|
8360 | - else |
|
7941 | + } else |
|
8361 | 7942 | { |
8362 | 7943 | $player = $player_parent; |
8363 | 7944 | } |
@@ -8371,8 +7952,7 @@ discard block |
||
8371 | 7952 | if (isset($rating['attribs']['']['scheme'])) |
8372 | 7953 | { |
8373 | 7954 | $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); |
8374 | - } |
|
8375 | - else |
|
7955 | + } else |
|
8376 | 7956 | { |
8377 | 7957 | $rating_scheme = 'urn:simple'; |
8378 | 7958 | } |
@@ -8386,8 +7966,7 @@ discard block |
||
8386 | 7966 | { |
8387 | 7967 | $ratings = array_values(array_unique($ratings)); |
8388 | 7968 | } |
8389 | - } |
|
8390 | - else |
|
7969 | + } else |
|
8391 | 7970 | { |
8392 | 7971 | $ratings = $ratings_parent; |
8393 | 7972 | } |
@@ -8417,8 +7996,7 @@ discard block |
||
8417 | 7996 | { |
8418 | 7997 | $restrictions = array_values(array_unique($restrictions)); |
8419 | 7998 | } |
8420 | - } |
|
8421 | - else |
|
7999 | + } else |
|
8422 | 8000 | { |
8423 | 8001 | $restrictions = $restrictions_parent; |
8424 | 8002 | } |
@@ -8433,8 +8011,7 @@ discard block |
||
8433 | 8011 | { |
8434 | 8012 | $thumbnails = array_values(array_unique($thumbnails)); |
8435 | 8013 | } |
8436 | - } |
|
8437 | - else |
|
8014 | + } else |
|
8438 | 8015 | { |
8439 | 8016 | $thumbnails = $thumbnails_parent; |
8440 | 8017 | } |
@@ -8442,8 +8019,7 @@ discard block |
||
8442 | 8019 | if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) |
8443 | 8020 | { |
8444 | 8021 | $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
8445 | - } |
|
8446 | - else |
|
8022 | + } else |
|
8447 | 8023 | { |
8448 | 8024 | $title = $title_parent; |
8449 | 8025 | } |
@@ -8557,8 +8133,7 @@ discard block |
||
8557 | 8133 | if (!empty($this->data['enclosures'])) |
8558 | 8134 | { |
8559 | 8135 | return $this->data['enclosures']; |
8560 | - } |
|
8561 | - else |
|
8136 | + } else |
|
8562 | 8137 | { |
8563 | 8138 | return null; |
8564 | 8139 | } |
@@ -8569,12 +8144,10 @@ discard block |
||
8569 | 8144 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat')) |
8570 | 8145 | { |
8571 | 8146 | return (float) $return[0]['data']; |
8572 | - } |
|
8573 | - elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
8147 | + } elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
8574 | 8148 | { |
8575 | 8149 | return (float) $match[1]; |
8576 | - } |
|
8577 | - else |
|
8150 | + } else |
|
8578 | 8151 | { |
8579 | 8152 | return null; |
8580 | 8153 | } |
@@ -8585,16 +8158,13 @@ discard block |
||
8585 | 8158 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long')) |
8586 | 8159 | { |
8587 | 8160 | return (float) $return[0]['data']; |
8588 | - } |
|
8589 | - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) |
|
8161 | + } elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) |
|
8590 | 8162 | { |
8591 | 8163 | return (float) $return[0]['data']; |
8592 | - } |
|
8593 | - elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
8164 | + } elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
8594 | 8165 | { |
8595 | 8166 | return (float) $match[2]; |
8596 | - } |
|
8597 | - else |
|
8167 | + } else |
|
8598 | 8168 | { |
8599 | 8169 | return null; |
8600 | 8170 | } |
@@ -8605,8 +8175,7 @@ discard block |
||
8605 | 8175 | if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'source')) |
8606 | 8176 | { |
8607 | 8177 | return $this->registry->create('Source', array($this, $return[0])); |
8608 | - } |
|
8609 | - else |
|
8178 | + } else |
|
8610 | 8179 | { |
8611 | 8180 | return null; |
8612 | 8181 | } |
@@ -8638,8 +8207,7 @@ discard block |
||
8638 | 8207 | set_error_handler(array('SimplePie_Misc', 'silence_errors')); |
8639 | 8208 | $this->dom->loadHTML($this->file->body); |
8640 | 8209 | restore_error_handler(); |
8641 | - } |
|
8642 | - else |
|
8210 | + } else |
|
8643 | 8211 | { |
8644 | 8212 | $this->dom = null; |
8645 | 8213 | } |
@@ -8700,17 +8268,14 @@ discard block |
||
8700 | 8268 | if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml'))) |
8701 | 8269 | { |
8702 | 8270 | return true; |
8703 | - } |
|
8704 | - else |
|
8271 | + } else |
|
8705 | 8272 | { |
8706 | 8273 | return false; |
8707 | 8274 | } |
8708 | - } |
|
8709 | - elseif ($file->method & SIMPLEPIE_FILE_SOURCE_LOCAL) |
|
8275 | + } elseif ($file->method & SIMPLEPIE_FILE_SOURCE_LOCAL) |
|
8710 | 8276 | { |
8711 | 8277 | return true; |
8712 | - } |
|
8713 | - else |
|
8278 | + } else |
|
8714 | 8279 | { |
8715 | 8280 | return false; |
8716 | 8281 | } |
@@ -8749,8 +8314,7 @@ discard block |
||
8749 | 8314 | if (!empty($feeds)) |
8750 | 8315 | { |
8751 | 8316 | return array_values($feeds); |
8752 | - } |
|
8753 | - else |
|
8317 | + } else |
|
8754 | 8318 | { |
8755 | 8319 | return null; |
8756 | 8320 | } |
@@ -8775,8 +8339,7 @@ discard block |
||
8775 | 8339 | if ($this->base_location < $line) |
8776 | 8340 | { |
8777 | 8341 | $href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->base)); |
8778 | - } |
|
8779 | - else |
|
8342 | + } else |
|
8780 | 8343 | { |
8781 | 8344 | $href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->http_base)); |
8782 | 8345 | } |
@@ -8819,8 +8382,7 @@ discard block |
||
8819 | 8382 | if ($this->base_location < $link->getLineNo()) |
8820 | 8383 | { |
8821 | 8384 | $href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->base)); |
8822 | - } |
|
8823 | - else |
|
8385 | + } else |
|
8824 | 8386 | { |
8825 | 8387 | $href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->http_base)); |
8826 | 8388 | } |
@@ -8832,8 +8394,7 @@ discard block |
||
8832 | 8394 | if ($parsed['authority'] === '' || $parsed['authority'] === $current['authority']) |
8833 | 8395 | { |
8834 | 8396 | $this->local[] = $href; |
8835 | - } |
|
8836 | - else |
|
8397 | + } else |
|
8837 | 8398 | { |
8838 | 8399 | $this->elsewhere[] = $href; |
8839 | 8400 | } |
@@ -8866,8 +8427,7 @@ discard block |
||
8866 | 8427 | if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) |
8867 | 8428 | { |
8868 | 8429 | return $feed; |
8869 | - } |
|
8870 | - else |
|
8430 | + } else |
|
8871 | 8431 | { |
8872 | 8432 | unset($array[$key]); |
8873 | 8433 | } |
@@ -8893,8 +8453,7 @@ discard block |
||
8893 | 8453 | if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) |
8894 | 8454 | { |
8895 | 8455 | return $feed; |
8896 | - } |
|
8897 | - else |
|
8456 | + } else |
|
8898 | 8457 | { |
8899 | 8458 | unset($array[$key]); |
8900 | 8459 | } |
@@ -8952,8 +8511,7 @@ discard block |
||
8952 | 8511 | if (strlen($matches[$i][3][0]) <= 2) |
8953 | 8512 | { |
8954 | 8513 | $return[$i]['self_closing'] = true; |
8955 | - } |
|
8956 | - else |
|
8514 | + } else |
|
8957 | 8515 | { |
8958 | 8516 | $return[$i]['self_closing'] = false; |
8959 | 8517 | $return[$i]['content'] = $matches[$i][4][0]; |
@@ -8985,8 +8543,7 @@ discard block |
||
8985 | 8543 | if ($element['self_closing']) |
8986 | 8544 | { |
8987 | 8545 | $full .= ' />'; |
8988 | - } |
|
8989 | - else |
|
8546 | + } else |
|
8990 | 8547 | { |
8991 | 8548 | $full .= ">$element[content]</$element[tag]>"; |
8992 | 8549 | } |
@@ -9043,16 +8600,13 @@ discard block |
||
9043 | 8600 | if ($http === 2 && $parsed['scheme'] !== '') |
9044 | 8601 | { |
9045 | 8602 | return "feed:$url"; |
9046 | - } |
|
9047 | - elseif ($http === 3 && strtolower($parsed['scheme']) === 'http') |
|
8603 | + } elseif ($http === 3 && strtolower($parsed['scheme']) === 'http') |
|
9048 | 8604 | { |
9049 | 8605 | return substr_replace($url, 'podcast', 0, 4); |
9050 | - } |
|
9051 | - elseif ($http === 4 && strtolower($parsed['scheme']) === 'http') |
|
8606 | + } elseif ($http === 4 && strtolower($parsed['scheme']) === 'http') |
|
9052 | 8607 | { |
9053 | 8608 | return substr_replace($url, 'itpc', 0, 4); |
9054 | - } |
|
9055 | - else |
|
8609 | + } else |
|
9056 | 8610 | { |
9057 | 8611 | return $url; |
9058 | 8612 | } |
@@ -9089,8 +8643,7 @@ discard block |
||
9089 | 8643 | if ($integer >= 0x41 && $integer <= 0x5A || $integer >= 0x61 && $integer <= 0x7A || $integer >= 0x30 && $integer <= 0x39 || $integer === 0x2D || $integer === 0x2E || $integer === 0x5F || $integer === 0x7E) |
9090 | 8644 | { |
9091 | 8645 | return chr($integer); |
9092 | - } |
|
9093 | - else |
|
8646 | + } else |
|
9094 | 8647 | { |
9095 | 8648 | return strtoupper($match[0]); |
9096 | 8649 | } |
@@ -10248,16 +9801,13 @@ discard block |
||
10248 | 9801 | if (is_array($curl = curl_version())) |
10249 | 9802 | { |
10250 | 9803 | $curl = $curl['version']; |
10251 | - } |
|
10252 | - elseif (substr($curl, 0, 5) === 'curl/') |
|
9804 | + } elseif (substr($curl, 0, 5) === 'curl/') |
|
10253 | 9805 | { |
10254 | 9806 | $curl = substr($curl, 5, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 5)); |
10255 | - } |
|
10256 | - elseif (substr($curl, 0, 8) === 'libcurl/') |
|
9807 | + } elseif (substr($curl, 0, 8) === 'libcurl/') |
|
10257 | 9808 | { |
10258 | 9809 | $curl = substr($curl, 8, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 8)); |
10259 | - } |
|
10260 | - else |
|
9810 | + } else |
|
10261 | 9811 | { |
10262 | 9812 | $curl = 0; |
10263 | 9813 | } |
@@ -10273,8 +9823,7 @@ discard block |
||
10273 | 9823 | if (($end = strpos($data, '-->', $start)) !== false) |
10274 | 9824 | { |
10275 | 9825 | $data = substr_replace($data, '', 0, $end + 3); |
10276 | - } |
|
10277 | - else |
|
9826 | + } else |
|
10278 | 9827 | { |
10279 | 9828 | $data = ''; |
10280 | 9829 | } |
@@ -10314,8 +9863,7 @@ discard block |
||
10314 | 9863 | { |
10315 | 9864 | $position++; |
10316 | 9865 | continue; |
10317 | - } |
|
10318 | - elseif (isset($string[$position])) |
|
9866 | + } elseif (isset($string[$position])) |
|
10319 | 9867 | { |
10320 | 9868 | switch ($string[$position]) |
10321 | 9869 | { |
@@ -10327,14 +9875,12 @@ discard block |
||
10327 | 9875 | break; |
10328 | 9876 | } |
10329 | 9877 | $position++; |
10330 | - } |
|
10331 | - else |
|
9878 | + } else |
|
10332 | 9879 | { |
10333 | 9880 | break; |
10334 | 9881 | } |
10335 | 9882 | } |
10336 | - } |
|
10337 | - else |
|
9883 | + } else |
|
10338 | 9884 | { |
10339 | 9885 | $output .= '('; |
10340 | 9886 | } |
@@ -10347,8 +9893,7 @@ discard block |
||
10347 | 9893 | if (($pos = strpos($mime, ';')) === false) |
10348 | 9894 | { |
10349 | 9895 | return trim($mime); |
10350 | - } |
|
10351 | - else |
|
9896 | + } else |
|
10352 | 9897 | { |
10353 | 9898 | return trim(substr($mime, 0, $pos)); |
10354 | 9899 | } |
@@ -10358,8 +9903,7 @@ discard block |
||
10358 | 9903 | if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64')) |
10359 | 9904 | { |
10360 | 9905 | $mode = SIMPLEPIE_CONSTRUCT_BASE64; |
10361 | - } |
|
10362 | - else |
|
9906 | + } else |
|
10363 | 9907 | { |
10364 | 9908 | $mode = SIMPLEPIE_CONSTRUCT_NONE; |
10365 | 9909 | } |
@@ -10379,8 +9923,7 @@ discard block |
||
10379 | 9923 | default: |
10380 | 9924 | return SIMPLEPIE_CONSTRUCT_NONE | $mode; |
10381 | 9925 | } |
10382 | - } |
|
10383 | - else |
|
9926 | + } else |
|
10384 | 9927 | { |
10385 | 9928 | return SIMPLEPIE_CONSTRUCT_TEXT | $mode; |
10386 | 9929 | } |
@@ -10420,13 +9963,11 @@ discard block |
||
10420 | 9963 | if (in_array(substr($type, -4), array('+xml', '/xml')) || substr($type, 0, 5) === 'text/') |
10421 | 9964 | { |
10422 | 9965 | return SIMPLEPIE_CONSTRUCT_NONE; |
10423 | - } |
|
10424 | - else |
|
9966 | + } else |
|
10425 | 9967 | { |
10426 | 9968 | return SIMPLEPIE_CONSTRUCT_BASE64; |
10427 | 9969 | } |
10428 | - } |
|
10429 | - else |
|
9970 | + } else |
|
10430 | 9971 | { |
10431 | 9972 | return SIMPLEPIE_CONSTRUCT_TEXT; |
10432 | 9973 | } |
@@ -10457,24 +9998,19 @@ discard block |
||
10457 | 9998 | if ($codepoint < 0) |
10458 | 9999 | { |
10459 | 10000 | return false; |
10460 | - } |
|
10461 | - else if ($codepoint <= 0x7f) |
|
10001 | + } else if ($codepoint <= 0x7f) |
|
10462 | 10002 | { |
10463 | 10003 | return chr($codepoint); |
10464 | - } |
|
10465 | - else if ($codepoint <= 0x7ff) |
|
10004 | + } else if ($codepoint <= 0x7ff) |
|
10466 | 10005 | { |
10467 | 10006 | return chr(0xc0 | ($codepoint >> 6)) . chr(0x80 | ($codepoint & 0x3f)); |
10468 | - } |
|
10469 | - else if ($codepoint <= 0xffff) |
|
10007 | + } else if ($codepoint <= 0xffff) |
|
10470 | 10008 | { |
10471 | 10009 | return chr(0xe0 | ($codepoint >> 12)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f)); |
10472 | - } |
|
10473 | - else if ($codepoint <= 0x10ffff) |
|
10010 | + } else if ($codepoint <= 0x10ffff) |
|
10474 | 10011 | { |
10475 | 10012 | return chr(0xf0 | ($codepoint >> 18)) . chr(0x80 | (($codepoint >> 12) & 0x3f)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f)); |
10476 | - } |
|
10477 | - else |
|
10013 | + } else |
|
10478 | 10014 | { |
10479 | 10015 | // U+FFFD REPLACEMENT CHARACTER |
10480 | 10016 | return "\xEF\xBF\xBD"; |
@@ -10491,8 +10027,7 @@ discard block |
||
10491 | 10027 | { |
10492 | 10028 | list($name, $value) = explode('=', $section, 2); |
10493 | 10029 | $return[urldecode($name)][] = urldecode($value); |
10494 | - } |
|
10495 | - else |
|
10030 | + } else |
|
10496 | 10031 | { |
10497 | 10032 | $return[urldecode($section)][] = null; |
10498 | 10033 | } |
@@ -10635,8 +10170,7 @@ discard block |
||
10635 | 10170 | if (file_exists($root . '/.git/index')) |
10636 | 10171 | { |
10637 | 10172 | return filemtime($root . '/.git/index'); |
10638 | - } |
|
10639 | - elseif (file_exists($root . '/SimplePie')) |
|
10173 | + } elseif (file_exists($root . '/SimplePie')) |
|
10640 | 10174 | { |
10641 | 10175 | $time = 0; |
10642 | 10176 | foreach (glob($root . '/SimplePie/*.php') as $file) |
@@ -10647,12 +10181,10 @@ discard block |
||
10647 | 10181 | } |
10648 | 10182 | } |
10649 | 10183 | return $time; |
10650 | - } |
|
10651 | - elseif (file_exists(dirname(__FILE__) . '/Core.php')) |
|
10184 | + } elseif (file_exists(dirname(__FILE__) . '/Core.php')) |
|
10652 | 10185 | { |
10653 | 10186 | return filemtime(dirname(__FILE__) . '/Core.php'); |
10654 | - } |
|
10655 | - else |
|
10187 | + } else |
|
10656 | 10188 | { |
10657 | 10189 | return filemtime(__FILE__); |
10658 | 10190 | } |
@@ -10665,8 +10197,7 @@ discard block |
||
10665 | 10197 | if ($sp->error() !== null) |
10666 | 10198 | { |
10667 | 10199 | $info .= 'Error occurred: ' . $sp->error() . "\n"; |
10668 | - } |
|
10669 | - else |
|
10200 | + } else |
|
10670 | 10201 | { |
10671 | 10202 | $info .= "No error found.\n"; |
10672 | 10203 | } |
@@ -10696,8 +10227,7 @@ discard block |
||
10696 | 10227 | $info .= ' Version ' . LIBXML_DOTTED_VERSION . "\n"; |
10697 | 10228 | break; |
10698 | 10229 | } |
10699 | - } |
|
10700 | - else |
|
10230 | + } else |
|
10701 | 10231 | { |
10702 | 10232 | $info .= " $ext not loaded\n"; |
10703 | 10233 | } |
@@ -10722,16 +10252,14 @@ discard block |
||
10722 | 10252 | if ($ip1 === '') |
10723 | 10253 | { |
10724 | 10254 | $c1 = -1; |
10725 | - } |
|
10726 | - else |
|
10255 | + } else |
|
10727 | 10256 | { |
10728 | 10257 | $c1 = substr_count($ip1, ':'); |
10729 | 10258 | } |
10730 | 10259 | if ($ip2 === '') |
10731 | 10260 | { |
10732 | 10261 | $c2 = -1; |
10733 | - } |
|
10734 | - else |
|
10262 | + } else |
|
10735 | 10263 | { |
10736 | 10264 | $c2 = substr_count($ip2, ':'); |
10737 | 10265 | } |
@@ -10791,8 +10319,7 @@ discard block |
||
10791 | 10319 | if ($ip_parts[1] !== '') |
10792 | 10320 | { |
10793 | 10321 | return implode(':', $ip_parts); |
10794 | - } |
|
10795 | - else |
|
10322 | + } else |
|
10796 | 10323 | { |
10797 | 10324 | return $ip_parts[0]; |
10798 | 10325 | } |
@@ -10806,8 +10333,7 @@ discard block |
||
10806 | 10333 | $ipv6_part = substr($ip, 0, $pos); |
10807 | 10334 | $ipv4_part = substr($ip, $pos + 1); |
10808 | 10335 | return array($ipv6_part, $ipv4_part); |
10809 | - } |
|
10810 | - else |
|
10336 | + } else |
|
10811 | 10337 | { |
10812 | 10338 | return array($ip, ''); |
10813 | 10339 | } |
@@ -10824,32 +10350,36 @@ discard block |
||
10824 | 10350 | foreach ($ipv6 as $ipv6_part) |
10825 | 10351 | { |
10826 | 10352 | // The section can't be empty |
10827 | - if ($ipv6_part === '') |
|
10828 | - return false; |
|
10353 | + if ($ipv6_part === '') { |
|
10354 | + return false; |
|
10355 | + } |
|
10829 | 10356 | // Nor can it be over four characters |
10830 | - if (strlen($ipv6_part) > 4) |
|
10831 | - return false; |
|
10357 | + if (strlen($ipv6_part) > 4) { |
|
10358 | + return false; |
|
10359 | + } |
|
10832 | 10360 | // Remove leading zeros (this is safe because of the above) |
10833 | 10361 | $ipv6_part = ltrim($ipv6_part, '0'); |
10834 | - if ($ipv6_part === '') |
|
10835 | - $ipv6_part = '0'; |
|
10362 | + if ($ipv6_part === '') { |
|
10363 | + $ipv6_part = '0'; |
|
10364 | + } |
|
10836 | 10365 | // Check the value is valid |
10837 | 10366 | $value = hexdec($ipv6_part); |
10838 | - if (dechex($value) !== strtolower($ipv6_part) || $value < 0 || $value > 0xFFFF) |
|
10839 | - return false; |
|
10367 | + if (dechex($value) !== strtolower($ipv6_part) || $value < 0 || $value > 0xFFFF) { |
|
10368 | + return false; |
|
10369 | + } |
|
10840 | 10370 | } |
10841 | 10371 | if (count($ipv4) === 4) |
10842 | 10372 | { |
10843 | 10373 | foreach ($ipv4 as $ipv4_part) |
10844 | 10374 | { |
10845 | 10375 | $value = (int) $ipv4_part; |
10846 | - if ((string) $value !== $ipv4_part || $value < 0 || $value > 0xFF) |
|
10847 | - return false; |
|
10376 | + if ((string) $value !== $ipv4_part || $value < 0 || $value > 0xFF) { |
|
10377 | + return false; |
|
10378 | + } |
|
10848 | 10379 | } |
10849 | 10380 | } |
10850 | 10381 | return true; |
10851 | - } |
|
10852 | - else |
|
10382 | + } else |
|
10853 | 10383 | { |
10854 | 10384 | return false; |
10855 | 10385 | } |
@@ -11353,8 +10883,7 @@ discard block |
||
11353 | 10883 | if (is_callable($callback)) |
11354 | 10884 | { |
11355 | 10885 | $this->user[] = $callback; |
11356 | - } |
|
11357 | - else |
|
10886 | + } else |
|
11358 | 10887 | { |
11359 | 10888 | trigger_error('User-supplied function must be a valid callback', E_USER_WARNING); |
11360 | 10889 | } |
@@ -11405,16 +10934,14 @@ discard block |
||
11405 | 10934 | { |
11406 | 10935 | $timezone = 0 - $timezone; |
11407 | 10936 | } |
11408 | - } |
|
11409 | - else |
|
10937 | + } else |
|
11410 | 10938 | { |
11411 | 10939 | $timezone = 0; |
11412 | 10940 | } |
11413 | 10941 | // Convert the number of seconds to an integer, taking decimals into account |
11414 | 10942 | $second = round($match[6] + $match[7] / pow(10, strlen($match[7]))); |
11415 | 10943 | return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone; |
11416 | - } |
|
11417 | - else |
|
10944 | + } else |
|
11418 | 10945 | { |
11419 | 10946 | return false; |
11420 | 10947 | } |
@@ -11441,8 +10968,7 @@ discard block |
||
11441 | 10968 | { |
11442 | 10969 | $position++; |
11443 | 10970 | continue; |
11444 | - } |
|
11445 | - elseif (isset($string[$position])) |
|
10971 | + } elseif (isset($string[$position])) |
|
11446 | 10972 | { |
11447 | 10973 | switch ($string[$position]) |
11448 | 10974 | { |
@@ -11454,14 +10980,12 @@ discard block |
||
11454 | 10980 | break; |
11455 | 10981 | } |
11456 | 10982 | $position++; |
11457 | - } |
|
11458 | - else |
|
10983 | + } else |
|
11459 | 10984 | { |
11460 | 10985 | break; |
11461 | 10986 | } |
11462 | 10987 | } |
11463 | - } |
|
11464 | - else |
|
10988 | + } else |
|
11465 | 10989 | { |
11466 | 10990 | $output .= '('; |
11467 | 10991 | } |
@@ -11530,8 +11054,7 @@ discard block |
||
11530 | 11054 | if ($match[4] < 50) |
11531 | 11055 | { |
11532 | 11056 | $match[4] += 2000; |
11533 | - } |
|
11534 | - elseif ($match[4] < 1000) |
|
11057 | + } elseif ($match[4] < 1000) |
|
11535 | 11058 | { |
11536 | 11059 | $match[4] += 1900; |
11537 | 11060 | } |
@@ -11539,14 +11062,12 @@ discard block |
||
11539 | 11062 | if ($match[7] !== '') |
11540 | 11063 | { |
11541 | 11064 | $second = $match[7]; |
11542 | - } |
|
11543 | - else |
|
11065 | + } else |
|
11544 | 11066 | { |
11545 | 11067 | $second = 0; |
11546 | 11068 | } |
11547 | 11069 | return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone; |
11548 | - } |
|
11549 | - else |
|
11070 | + } else |
|
11550 | 11071 | { |
11551 | 11072 | return false; |
11552 | 11073 | } |
@@ -11594,14 +11115,12 @@ discard block |
||
11594 | 11115 | if ($match[4] < 50) |
11595 | 11116 | { |
11596 | 11117 | $match[4] += 2000; |
11597 | - } |
|
11598 | - else |
|
11118 | + } else |
|
11599 | 11119 | { |
11600 | 11120 | $match[4] += 1900; |
11601 | 11121 | } |
11602 | 11122 | return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone; |
11603 | - } |
|
11604 | - else |
|
11123 | + } else |
|
11605 | 11124 | { |
11606 | 11125 | return false; |
11607 | 11126 | } |
@@ -11635,8 +11154,7 @@ discard block |
||
11635 | 11154 | */ |
11636 | 11155 | $month = $this->month[strtolower($match[2])]; |
11637 | 11156 | return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]); |
11638 | - } |
|
11639 | - else |
|
11157 | + } else |
|
11640 | 11158 | { |
11641 | 11159 | return false; |
11642 | 11160 | } |
@@ -11648,8 +11166,7 @@ discard block |
||
11648 | 11166 | if ($strtotime === -1 || $strtotime === false) |
11649 | 11167 | { |
11650 | 11168 | return false; |
11651 | - } |
|
11652 | - else |
|
11169 | + } else |
|
11653 | 11170 | { |
11654 | 11171 | return $strtotime; |
11655 | 11172 | } |
@@ -11683,8 +11200,7 @@ discard block |
||
11683 | 11200 | if (strtoupper($encoding) === 'US-ASCII') |
11684 | 11201 | { |
11685 | 11202 | $this->encoding = 'UTF-8'; |
11686 | - } |
|
11687 | - else |
|
11203 | + } else |
|
11688 | 11204 | { |
11689 | 11205 | $this->encoding = $encoding; |
11690 | 11206 | } |
@@ -11721,8 +11237,7 @@ discard block |
||
11721 | 11237 | { |
11722 | 11238 | $data = substr($data, $pos + 2); |
11723 | 11239 | $data = '<?xml version="' . $declaration->version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' . $data; |
11724 | - } |
|
11725 | - else |
|
11240 | + } else |
|
11726 | 11241 | { |
11727 | 11242 | $this->error_string = 'SimplePie bug! Please report this!'; |
11728 | 11243 | return false; |
@@ -11758,8 +11273,7 @@ discard block |
||
11758 | 11273 | $this->current_byte = xml_get_current_byte_index($xml); |
11759 | 11274 | xml_parser_free($xml); |
11760 | 11275 | return $return; |
11761 | - } |
|
11762 | - else |
|
11276 | + } else |
|
11763 | 11277 | { |
11764 | 11278 | libxml_clear_errors(); |
11765 | 11279 | $xml = new XMLReader(); |
@@ -11772,8 +11286,7 @@ discard block |
||
11772 | 11286 | if ($xml->namespaceURI !== '') |
11773 | 11287 | { |
11774 | 11288 | $tagName = $xml->namespaceURI . $this->separator . $xml->localName; |
11775 | - } |
|
11776 | - else |
|
11289 | + } else |
|
11777 | 11290 | { |
11778 | 11291 | $tagName = $xml->localName; |
11779 | 11292 | } |
@@ -11784,8 +11297,7 @@ discard block |
||
11784 | 11297 | if ($xml->namespaceURI !== '') |
11785 | 11298 | { |
11786 | 11299 | $tagName = $xml->namespaceURI . $this->separator . $xml->localName; |
11787 | - } |
|
11788 | - else |
|
11300 | + } else |
|
11789 | 11301 | { |
11790 | 11302 | $tagName = $xml->localName; |
11791 | 11303 | } |
@@ -11795,8 +11307,7 @@ discard block |
||
11795 | 11307 | if ($xml->namespaceURI !== '') |
11796 | 11308 | { |
11797 | 11309 | $attrName = $xml->namespaceURI . $this->separator . $xml->localName; |
11798 | - } |
|
11799 | - else |
|
11310 | + } else |
|
11800 | 11311 | { |
11801 | 11312 | $attrName = $xml->localName; |
11802 | 11313 | } |
@@ -11821,8 +11332,7 @@ discard block |
||
11821 | 11332 | $this->current_line = $error->line; |
11822 | 11333 | $this->current_column = $error->column; |
11823 | 11334 | return false; |
11824 | - } |
|
11825 | - else |
|
11335 | + } else |
|
11826 | 11336 | { |
11827 | 11337 | return true; |
11828 | 11338 | } |
@@ -11869,8 +11379,7 @@ discard block |
||
11869 | 11379 | $this->xml_base[] = $base; |
11870 | 11380 | $this->xml_base_explicit[] = true; |
11871 | 11381 | } |
11872 | - } |
|
11873 | - else |
|
11382 | + } else |
|
11874 | 11383 | { |
11875 | 11384 | $this->xml_base[] = end($this->xml_base); |
11876 | 11385 | $this->xml_base_explicit[] = end($this->xml_base_explicit); |
@@ -11878,8 +11387,7 @@ discard block |
||
11878 | 11387 | if (isset($attribs[SIMPLEPIE_NAMESPACE_XML]['lang'])) |
11879 | 11388 | { |
11880 | 11389 | $this->xml_lang[] = $attribs[SIMPLEPIE_NAMESPACE_XML]['lang']; |
11881 | - } |
|
11882 | - else |
|
11390 | + } else |
|
11883 | 11391 | { |
11884 | 11392 | $this->xml_lang[] = end($this->xml_lang); |
11885 | 11393 | } |
@@ -11898,8 +11406,7 @@ discard block |
||
11898 | 11406 | } |
11899 | 11407 | $this->data['data'] .= '>'; |
11900 | 11408 | } |
11901 | - } |
|
11902 | - else |
|
11409 | + } else |
|
11903 | 11410 | { |
11904 | 11411 | $this->datas[] =& $this->data; |
11905 | 11412 | $this->data =& $this->data['child'][end($this->namespace)][end($this->element)][]; |
@@ -11919,8 +11426,7 @@ discard block |
||
11919 | 11426 | if ($this->current_xhtml_construct >= 0) |
11920 | 11427 | { |
11921 | 11428 | $this->data['data'] .= htmlspecialchars($cdata, ENT_QUOTES, $this->encoding); |
11922 | - } |
|
11923 | - else |
|
11429 | + } else |
|
11924 | 11430 | { |
11925 | 11431 | $this->data['data'] .= $cdata; |
11926 | 11432 | } |
@@ -11974,8 +11480,7 @@ discard block |
||
11974 | 11480 | $namespace = SIMPLEPIE_NAMESPACE_MEDIARSS; |
11975 | 11481 | } |
11976 | 11482 | $cache[$string] = array($namespace, $local_name); |
11977 | - } |
|
11978 | - else |
|
11483 | + } else |
|
11979 | 11484 | { |
11980 | 11485 | $cache[$string] = array('', $string); |
11981 | 11486 | } |
@@ -12007,8 +11512,7 @@ discard block |
||
12007 | 11512 | if ($this->scheme !== null) |
12008 | 11513 | { |
12009 | 11514 | return $this->scheme; |
12010 | - } |
|
12011 | - else |
|
11515 | + } else |
|
12012 | 11516 | { |
12013 | 11517 | return null; |
12014 | 11518 | } |
@@ -12019,8 +11523,7 @@ discard block |
||
12019 | 11523 | if ($this->value !== null) |
12020 | 11524 | { |
12021 | 11525 | return $this->value; |
12022 | - } |
|
12023 | - else |
|
11526 | + } else |
|
12024 | 11527 | { |
12025 | 11528 | return null; |
12026 | 11529 | } |
@@ -12102,8 +11605,7 @@ discard block |
||
12102 | 11605 | if (!method_exists($class, '__construct')) |
12103 | 11606 | { |
12104 | 11607 | $instance = new $class; |
12105 | - } |
|
12106 | - else |
|
11608 | + } else |
|
12107 | 11609 | { |
12108 | 11610 | $reflector = new ReflectionClass($class); |
12109 | 11611 | $instance = $reflector->newInstanceArgs($parameters); |
@@ -12164,8 +11666,7 @@ discard block |
||
12164 | 11666 | if ($this->relationship !== null) |
12165 | 11667 | { |
12166 | 11668 | return $this->relationship; |
12167 | - } |
|
12168 | - else |
|
11669 | + } else |
|
12169 | 11670 | { |
12170 | 11671 | return null; |
12171 | 11672 | } |
@@ -12176,8 +11677,7 @@ discard block |
||
12176 | 11677 | if ($this->type !== null) |
12177 | 11678 | { |
12178 | 11679 | return $this->type; |
12179 | - } |
|
12180 | - else |
|
11680 | + } else |
|
12181 | 11681 | { |
12182 | 11682 | return null; |
12183 | 11683 | } |
@@ -12188,8 +11688,7 @@ discard block |
||
12188 | 11688 | if ($this->value !== null) |
12189 | 11689 | { |
12190 | 11690 | return $this->value; |
12191 | - } |
|
12192 | - else |
|
11691 | + } else |
|
12193 | 11692 | { |
12194 | 11693 | return null; |
12195 | 11694 | } |
@@ -12228,8 +11727,7 @@ discard block |
||
12228 | 11727 | if ($page) |
12229 | 11728 | { |
12230 | 11729 | $this->image_handler = (string) $page; |
12231 | - } |
|
12232 | - else |
|
11730 | + } else |
|
12233 | 11731 | { |
12234 | 11732 | $this->image_handler = false; |
12235 | 11733 | } |
@@ -12275,13 +11773,11 @@ discard block |
||
12275 | 11773 | if (is_array($tags)) |
12276 | 11774 | { |
12277 | 11775 | $this->strip_htmltags = $tags; |
12278 | - } |
|
12279 | - else |
|
11776 | + } else |
|
12280 | 11777 | { |
12281 | 11778 | $this->strip_htmltags = explode(',', $tags); |
12282 | 11779 | } |
12283 | - } |
|
12284 | - else |
|
11780 | + } else |
|
12285 | 11781 | { |
12286 | 11782 | $this->strip_htmltags = false; |
12287 | 11783 | } |
@@ -12297,13 +11793,11 @@ discard block |
||
12297 | 11793 | if (is_array($attribs)) |
12298 | 11794 | { |
12299 | 11795 | $this->strip_attributes = $attribs; |
12300 | - } |
|
12301 | - else |
|
11796 | + } else |
|
12302 | 11797 | { |
12303 | 11798 | $this->strip_attributes = explode(',', $attribs); |
12304 | 11799 | } |
12305 | - } |
|
12306 | - else |
|
11800 | + } else |
|
12307 | 11801 | { |
12308 | 11802 | $this->strip_attributes = false; |
12309 | 11803 | } |
@@ -12348,8 +11842,7 @@ discard block |
||
12348 | 11842 | if (preg_match('/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data)) |
12349 | 11843 | { |
12350 | 11844 | $type |= SIMPLEPIE_CONSTRUCT_HTML; |
12351 | - } |
|
12352 | - else |
|
11845 | + } else |
|
12353 | 11846 | { |
12354 | 11847 | $type |= SIMPLEPIE_CONSTRUCT_TEXT; |
12355 | 11848 | } |
@@ -12412,8 +11905,7 @@ discard block |
||
12412 | 11905 | if ($cache->load()) |
12413 | 11906 | { |
12414 | 11907 | $img->setAttribute('src', $this->image_handler . $image_url); |
12415 | - } |
|
12416 | - else |
|
11908 | + } else |
|
12417 | 11909 | { |
12418 | 11910 | $file = $this->registry->create('File', array($img['attribs']['src']['data'], $this->timeout, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen)); |
12419 | 11911 | $headers = $file->headers; |
@@ -12422,8 +11914,7 @@ discard block |
||
12422 | 11914 | if ($cache->save(array('headers' => $file->headers, 'body' => $file->body))) |
12423 | 11915 | { |
12424 | 11916 | $img->setAttribute('src', $this->image_handler . $image_url); |
12425 | - } |
|
12426 | - else |
|
11917 | + } else |
|
12427 | 11918 | { |
12428 | 11919 | trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING); |
12429 | 11920 | } |
@@ -12447,8 +11938,7 @@ discard block |
||
12447 | 11938 | { |
12448 | 11939 | $data = preg_replace('/^<div' . SIMPLEPIE_PCRE_XML_ATTRIBUTE . '>/', '', $data); |
12449 | 11940 | $data = preg_replace('/<\/div>$/', '', $data); |
12450 | - } |
|
12451 | - else |
|
11941 | + } else |
|
12452 | 11942 | { |
12453 | 11943 | $data = preg_replace('/^<div' . SIMPLEPIE_PCRE_XML_ATTRIBUTE . '>/', '<div>', $data); |
12454 | 11944 | } |
@@ -12482,8 +11972,7 @@ discard block |
||
12482 | 11972 | $html = '<div>' . $html . '</div>'; |
12483 | 11973 | $ret .= '<!DOCTYPE html>'; |
12484 | 11974 | $content_type = 'text/html'; |
12485 | - } |
|
12486 | - else |
|
11975 | + } else |
|
12487 | 11976 | { |
12488 | 11977 | $ret .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; |
12489 | 11978 | $content_type = 'application/xhtml+xml'; |
@@ -12527,17 +12016,14 @@ discard block |
||
12527 | 12016 | $match[1] = htmlspecialchars($match[1], ENT_COMPAT, 'UTF-8'); |
12528 | 12017 | $match[2] = htmlspecialchars($match[2], ENT_COMPAT, 'UTF-8'); |
12529 | 12018 | return "<$match[1]$match[2]>$match[3]</$match[1]>"; |
12530 | - } |
|
12531 | - else |
|
12019 | + } else |
|
12532 | 12020 | { |
12533 | 12021 | return htmlspecialchars($match[0], ENT_COMPAT, 'UTF-8'); |
12534 | 12022 | } |
12535 | - } |
|
12536 | - elseif (isset($match[4]) && !in_array(strtolower($match[1]), array('script', 'style'))) |
|
12023 | + } elseif (isset($match[4]) && !in_array(strtolower($match[1]), array('script', 'style'))) |
|
12537 | 12024 | { |
12538 | 12025 | return $match[4]; |
12539 | - } |
|
12540 | - else |
|
12026 | + } else |
|
12541 | 12027 | { |
12542 | 12028 | return ''; |
12543 | 12029 | } |
@@ -12593,16 +12079,14 @@ discard block |
||
12593 | 12079 | $element->parentNode->replaceChild($fragment, $element); |
12594 | 12080 | } |
12595 | 12081 | return; |
12596 | - } |
|
12597 | - elseif (in_array($tag, array('script', 'style'))) |
|
12082 | + } elseif (in_array($tag, array('script', 'style'))) |
|
12598 | 12083 | { |
12599 | 12084 | foreach ($elements as $element) |
12600 | 12085 | { |
12601 | 12086 | $element->parentNode->removeChild($element); |
12602 | 12087 | } |
12603 | 12088 | return; |
12604 | - } |
|
12605 | - else |
|
12089 | + } else |
|
12606 | 12090 | { |
12607 | 12091 | foreach ($elements as $element) |
12608 | 12092 | { |
@@ -12650,8 +12134,7 @@ discard block |
||
12650 | 12134 | if (isset($this->data['child'][$namespace][$tag])) |
12651 | 12135 | { |
12652 | 12136 | return $this->data['child'][$namespace][$tag]; |
12653 | - } |
|
12654 | - else |
|
12137 | + } else |
|
12655 | 12138 | { |
12656 | 12139 | return null; |
12657 | 12140 | } |
@@ -12673,32 +12156,25 @@ discard block |
||
12673 | 12156 | if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) |
12674 | 12157 | { |
12675 | 12158 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
12676 | - } |
|
12677 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) |
|
12159 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) |
|
12678 | 12160 | { |
12679 | 12161 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
12680 | - } |
|
12681 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
|
12162 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
|
12682 | 12163 | { |
12683 | 12164 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
12684 | - } |
|
12685 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
12165 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
12686 | 12166 | { |
12687 | 12167 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
12688 | - } |
|
12689 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
12168 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
12690 | 12169 | { |
12691 | 12170 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
12692 | - } |
|
12693 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
12171 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
12694 | 12172 | { |
12695 | 12173 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
12696 | - } |
|
12697 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
12174 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
12698 | 12175 | { |
12699 | 12176 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
12700 | - } |
|
12701 | - else |
|
12177 | + } else |
|
12702 | 12178 | { |
12703 | 12179 | return null; |
12704 | 12180 | } |
@@ -12709,8 +12185,7 @@ discard block |
||
12709 | 12185 | if (isset($categories[$key])) |
12710 | 12186 | { |
12711 | 12187 | return $categories[$key]; |
12712 | - } |
|
12713 | - else |
|
12188 | + } else |
|
12714 | 12189 | { |
12715 | 12190 | return null; |
12716 | 12191 | } |
@@ -12745,8 +12220,7 @@ discard block |
||
12745 | 12220 | if (isset($category['attribs']['']['domain'])) |
12746 | 12221 | { |
12747 | 12222 | $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); |
12748 | - } |
|
12749 | - else |
|
12223 | + } else |
|
12750 | 12224 | { |
12751 | 12225 | $scheme = null; |
12752 | 12226 | } |
@@ -12763,8 +12237,7 @@ discard block |
||
12763 | 12237 | if (!empty($categories)) |
12764 | 12238 | { |
12765 | 12239 | return array_unique($categories); |
12766 | - } |
|
12767 | - else |
|
12240 | + } else |
|
12768 | 12241 | { |
12769 | 12242 | return null; |
12770 | 12243 | } |
@@ -12775,8 +12248,7 @@ discard block |
||
12775 | 12248 | if (isset($authors[$key])) |
12776 | 12249 | { |
12777 | 12250 | return $authors[$key]; |
12778 | - } |
|
12779 | - else |
|
12251 | + } else |
|
12780 | 12252 | { |
12781 | 12253 | return null; |
12782 | 12254 | } |
@@ -12843,8 +12315,7 @@ discard block |
||
12843 | 12315 | if (!empty($authors)) |
12844 | 12316 | { |
12845 | 12317 | return array_unique($authors); |
12846 | - } |
|
12847 | - else |
|
12318 | + } else |
|
12848 | 12319 | { |
12849 | 12320 | return null; |
12850 | 12321 | } |
@@ -12855,8 +12326,7 @@ discard block |
||
12855 | 12326 | if (isset($contributors[$key])) |
12856 | 12327 | { |
12857 | 12328 | return $contributors[$key]; |
12858 | - } |
|
12859 | - else |
|
12329 | + } else |
|
12860 | 12330 | { |
12861 | 12331 | return null; |
12862 | 12332 | } |
@@ -12911,8 +12381,7 @@ discard block |
||
12911 | 12381 | if (!empty($contributors)) |
12912 | 12382 | { |
12913 | 12383 | return array_unique($contributors); |
12914 | - } |
|
12915 | - else |
|
12384 | + } else |
|
12916 | 12385 | { |
12917 | 12386 | return null; |
12918 | 12387 | } |
@@ -12923,8 +12392,7 @@ discard block |
||
12923 | 12392 | if (isset($links[$key])) |
12924 | 12393 | { |
12925 | 12394 | return $links[$key]; |
12926 | - } |
|
12927 | - else |
|
12395 | + } else |
|
12928 | 12396 | { |
12929 | 12397 | return null; |
12930 | 12398 | } |
@@ -12982,13 +12450,11 @@ discard block |
||
12982 | 12450 | { |
12983 | 12451 | $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]); |
12984 | 12452 | $this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]; |
12985 | - } |
|
12986 | - else |
|
12453 | + } else |
|
12987 | 12454 | { |
12988 | 12455 | $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; |
12989 | 12456 | } |
12990 | - } |
|
12991 | - elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) |
|
12457 | + } elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) |
|
12992 | 12458 | { |
12993 | 12459 | $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; |
12994 | 12460 | } |
@@ -12998,8 +12464,7 @@ discard block |
||
12998 | 12464 | if (isset($this->data['links'][$rel])) |
12999 | 12465 | { |
13000 | 12466 | return $this->data['links'][$rel]; |
13001 | - } |
|
13002 | - else |
|
12467 | + } else |
|
13003 | 12468 | { |
13004 | 12469 | return null; |
13005 | 12470 | } |
@@ -13009,40 +12474,31 @@ discard block |
||
13009 | 12474 | if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle')) |
13010 | 12475 | { |
13011 | 12476 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
13012 | - } |
|
13013 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline')) |
|
12477 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline')) |
|
13014 | 12478 | { |
13015 | 12479 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
13016 | - } |
|
13017 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) |
|
12480 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) |
|
13018 | 12481 | { |
13019 | 12482 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
13020 | - } |
|
13021 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) |
|
12483 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) |
|
13022 | 12484 | { |
13023 | 12485 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
13024 | - } |
|
13025 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) |
|
12486 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) |
|
13026 | 12487 | { |
13027 | 12488 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
13028 | - } |
|
13029 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) |
|
12489 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) |
|
13030 | 12490 | { |
13031 | 12491 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
13032 | - } |
|
13033 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) |
|
12492 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) |
|
13034 | 12493 | { |
13035 | 12494 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
13036 | - } |
|
13037 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) |
|
12495 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) |
|
13038 | 12496 | { |
13039 | 12497 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); |
13040 | - } |
|
13041 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) |
|
12498 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) |
|
13042 | 12499 | { |
13043 | 12500 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); |
13044 | - } |
|
13045 | - else |
|
12501 | + } else |
|
13046 | 12502 | { |
13047 | 12503 | return null; |
13048 | 12504 | } |
@@ -13052,24 +12508,19 @@ discard block |
||
13052 | 12508 | if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights')) |
13053 | 12509 | { |
13054 | 12510 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
13055 | - } |
|
13056 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright')) |
|
12511 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright')) |
|
13057 | 12512 | { |
13058 | 12513 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
13059 | - } |
|
13060 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright')) |
|
12514 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright')) |
|
13061 | 12515 | { |
13062 | 12516 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
13063 | - } |
|
13064 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) |
|
12517 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) |
|
13065 | 12518 | { |
13066 | 12519 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
13067 | - } |
|
13068 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) |
|
12520 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) |
|
13069 | 12521 | { |
13070 | 12522 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
13071 | - } |
|
13072 | - else |
|
12523 | + } else |
|
13073 | 12524 | { |
13074 | 12525 | return null; |
13075 | 12526 | } |
@@ -13079,20 +12530,16 @@ discard block |
||
13079 | 12530 | if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language')) |
13080 | 12531 | { |
13081 | 12532 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
13082 | - } |
|
13083 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language')) |
|
12533 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language')) |
|
13084 | 12534 | { |
13085 | 12535 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
13086 | - } |
|
13087 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language')) |
|
12536 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language')) |
|
13088 | 12537 | { |
13089 | 12538 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
13090 | - } |
|
13091 | - elseif (isset($this->data['xml_lang'])) |
|
12539 | + } elseif (isset($this->data['xml_lang'])) |
|
13092 | 12540 | { |
13093 | 12541 | return $this->sanitize($this->data['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
13094 | - } |
|
13095 | - else |
|
12542 | + } else |
|
13096 | 12543 | { |
13097 | 12544 | return null; |
13098 | 12545 | } |
@@ -13102,12 +12549,10 @@ discard block |
||
13102 | 12549 | if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat')) |
13103 | 12550 | { |
13104 | 12551 | return (float) $return[0]['data']; |
13105 | - } |
|
13106 | - elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
12552 | + } elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
13107 | 12553 | { |
13108 | 12554 | return (float) $match[1]; |
13109 | - } |
|
13110 | - else |
|
12555 | + } else |
|
13111 | 12556 | { |
13112 | 12557 | return null; |
13113 | 12558 | } |
@@ -13117,16 +12562,13 @@ discard block |
||
13117 | 12562 | if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long')) |
13118 | 12563 | { |
13119 | 12564 | return (float) $return[0]['data']; |
13120 | - } |
|
13121 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) |
|
12565 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) |
|
13122 | 12566 | { |
13123 | 12567 | return (float) $return[0]['data']; |
13124 | - } |
|
13125 | - elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
12568 | + } elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) |
|
13126 | 12569 | { |
13127 | 12570 | return (float) $match[2]; |
13128 | - } |
|
13129 | - else |
|
12571 | + } else |
|
13130 | 12572 | { |
13131 | 12573 | return null; |
13132 | 12574 | } |
@@ -13136,16 +12578,13 @@ discard block |
||
13136 | 12578 | if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image')) |
13137 | 12579 | { |
13138 | 12580 | return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI); |
13139 | - } |
|
13140 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo')) |
|
12581 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo')) |
|
13141 | 12582 | { |
13142 | 12583 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
13143 | - } |
|
13144 | - elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon')) |
|
12584 | + } elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon')) |
|
13145 | 12585 | { |
13146 | 12586 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); |
13147 | - } |
|
13148 | - else |
|
12587 | + } else |
|
13149 | 12588 | { |
13150 | 12589 | return null; |
13151 | 12590 | } |
@@ -13185,8 +12624,7 @@ discard block |
||
13185 | 12624 | if ($this->state === 'emit') |
13186 | 12625 | { |
13187 | 12626 | return true; |
13188 | - } |
|
13189 | - else |
|
12627 | + } else |
|
13190 | 12628 | { |
13191 | 12629 | $this->version = ''; |
13192 | 12630 | $this->encoding = ''; |
@@ -13228,8 +12666,7 @@ discard block |
||
13228 | 12666 | if ($this->skip_whitespace()) |
13229 | 12667 | { |
13230 | 12668 | $this->state = 'version_name'; |
13231 | - } |
|
13232 | - else |
|
12669 | + } else |
|
13233 | 12670 | { |
13234 | 12671 | $this->state = false; |
13235 | 12672 | } |
@@ -13241,8 +12678,7 @@ discard block |
||
13241 | 12678 | $this->position += 7; |
13242 | 12679 | $this->skip_whitespace(); |
13243 | 12680 | $this->state = 'version_equals'; |
13244 | - } |
|
13245 | - else |
|
12681 | + } else |
|
13246 | 12682 | { |
13247 | 12683 | $this->state = false; |
13248 | 12684 | } |
@@ -13254,8 +12690,7 @@ discard block |
||
13254 | 12690 | $this->position++; |
13255 | 12691 | $this->skip_whitespace(); |
13256 | 12692 | $this->state = 'version_value'; |
13257 | - } |
|
13258 | - else |
|
12693 | + } else |
|
13259 | 12694 | { |
13260 | 12695 | $this->state = false; |
13261 | 12696 | } |
@@ -13268,13 +12703,11 @@ discard block |
||
13268 | 12703 | if ($this->has_data()) |
13269 | 12704 | { |
13270 | 12705 | $this->state = 'encoding_name'; |
13271 | - } |
|
13272 | - else |
|
12706 | + } else |
|
13273 | 12707 | { |
13274 | 12708 | $this->state = 'emit'; |
13275 | 12709 | } |
13276 | - } |
|
13277 | - else |
|
12710 | + } else |
|
13278 | 12711 | { |
13279 | 12712 | $this->state = false; |
13280 | 12713 | } |
@@ -13286,8 +12719,7 @@ discard block |
||
13286 | 12719 | $this->position += 8; |
13287 | 12720 | $this->skip_whitespace(); |
13288 | 12721 | $this->state = 'encoding_equals'; |
13289 | - } |
|
13290 | - else |
|
12722 | + } else |
|
13291 | 12723 | { |
13292 | 12724 | $this->state = 'standalone_name'; |
13293 | 12725 | } |
@@ -13299,8 +12731,7 @@ discard block |
||
13299 | 12731 | $this->position++; |
13300 | 12732 | $this->skip_whitespace(); |
13301 | 12733 | $this->state = 'encoding_value'; |
13302 | - } |
|
13303 | - else |
|
12734 | + } else |
|
13304 | 12735 | { |
13305 | 12736 | $this->state = false; |
13306 | 12737 | } |
@@ -13313,13 +12744,11 @@ discard block |
||
13313 | 12744 | if ($this->has_data()) |
13314 | 12745 | { |
13315 | 12746 | $this->state = 'standalone_name'; |
13316 | - } |
|
13317 | - else |
|
12747 | + } else |
|
13318 | 12748 | { |
13319 | 12749 | $this->state = 'emit'; |
13320 | 12750 | } |
13321 | - } |
|
13322 | - else |
|
12751 | + } else |
|
13323 | 12752 | { |
13324 | 12753 | $this->state = false; |
13325 | 12754 | } |
@@ -13331,8 +12760,7 @@ discard block |
||
13331 | 12760 | $this->position += 10; |
13332 | 12761 | $this->skip_whitespace(); |
13333 | 12762 | $this->state = 'standalone_equals'; |
13334 | - } |
|
13335 | - else |
|
12763 | + } else |
|
13336 | 12764 | { |
13337 | 12765 | $this->state = false; |
13338 | 12766 | } |
@@ -13344,8 +12772,7 @@ discard block |
||
13344 | 12772 | $this->position++; |
13345 | 12773 | $this->skip_whitespace(); |
13346 | 12774 | $this->state = 'standalone_value'; |
13347 | - } |
|
13348 | - else |
|
12775 | + } else |
|
13349 | 12776 | { |
13350 | 12777 | $this->state = false; |
13351 | 12778 | } |
@@ -13370,13 +12797,11 @@ discard block |
||
13370 | 12797 | if ($this->has_data()) |
13371 | 12798 | { |
13372 | 12799 | $this->state = false; |
13373 | - } |
|
13374 | - else |
|
12800 | + } else |
|
13375 | 12801 | { |
13376 | 12802 | $this->state = 'emit'; |
13377 | 12803 | } |
13378 | - } |
|
13379 | - else |
|
12804 | + } else |
|
13380 | 12805 | { |
13381 | 12806 | $this->state = false; |
13382 | 12807 | } |