Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../SimplePi...
File: Item.php
{
[1000] Fix | Delete
$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
[1001] Fix | Delete
}
[1002] Fix | Delete
if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link'))
[1003] Fix | Delete
{
[1004] Fix | Delete
$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
[1005] Fix | Delete
}
[1006] Fix | Delete
if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link'))
[1007] Fix | Delete
{
[1008] Fix | Delete
$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
[1009] Fix | Delete
}
[1010] Fix | Delete
if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid'))
[1011] Fix | Delete
{
[1012] Fix | Delete
if (!isset($links[0]['attribs']['']['isPermaLink']) || strtolower(trim($links[0]['attribs']['']['isPermaLink'])) === 'true')
[1013] Fix | Delete
{
[1014] Fix | Delete
$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
[1015] Fix | Delete
}
[1016] Fix | Delete
}
[1017] Fix | Delete
[1018] Fix | Delete
$keys = array_keys($this->data['links']);
[1019] Fix | Delete
foreach ($keys as $key)
[1020] Fix | Delete
{
[1021] Fix | Delete
if ($this->registry->call('Misc', 'is_isegment_nz_nc', array($key)))
[1022] Fix | Delete
{
[1023] Fix | Delete
if (isset($this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]))
[1024] Fix | Delete
{
[1025] Fix | Delete
$this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]);
[1026] Fix | Delete
$this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key];
[1027] Fix | Delete
}
[1028] Fix | Delete
else
[1029] Fix | Delete
{
[1030] Fix | Delete
$this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key];
[1031] Fix | Delete
}
[1032] Fix | Delete
}
[1033] Fix | Delete
elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY)
[1034] Fix | Delete
{
[1035] Fix | Delete
$this->data['links'][substr($key, 41)] =& $this->data['links'][$key];
[1036] Fix | Delete
}
[1037] Fix | Delete
$this->data['links'][$key] = array_unique($this->data['links'][$key]);
[1038] Fix | Delete
}
[1039] Fix | Delete
}
[1040] Fix | Delete
if (isset($this->data['links'][$rel]))
[1041] Fix | Delete
{
[1042] Fix | Delete
return $this->data['links'][$rel];
[1043] Fix | Delete
}
[1044] Fix | Delete
[1045] Fix | Delete
return null;
[1046] Fix | Delete
}
[1047] Fix | Delete
[1048] Fix | Delete
/**
[1049] Fix | Delete
* Get an enclosure from the item
[1050] Fix | Delete
*
[1051] Fix | Delete
* Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS.
[1052] Fix | Delete
*
[1053] Fix | Delete
* @since Beta 2
[1054] Fix | Delete
* @todo Add ability to prefer one type of content over another (in a media group).
[1055] Fix | Delete
* @param int $key The enclosure that you want to return. Remember that arrays begin with 0, not 1
[1056] Fix | Delete
* @return SimplePie_Enclosure|null
[1057] Fix | Delete
*/
[1058] Fix | Delete
public function get_enclosure($key = 0, $prefer = null)
[1059] Fix | Delete
{
[1060] Fix | Delete
$enclosures = $this->get_enclosures();
[1061] Fix | Delete
if (isset($enclosures[$key]))
[1062] Fix | Delete
{
[1063] Fix | Delete
return $enclosures[$key];
[1064] Fix | Delete
}
[1065] Fix | Delete
[1066] Fix | Delete
return null;
[1067] Fix | Delete
}
[1068] Fix | Delete
[1069] Fix | Delete
/**
[1070] Fix | Delete
* Get all available enclosures (podcasts, etc.)
[1071] Fix | Delete
*
[1072] Fix | Delete
* Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS.
[1073] Fix | Delete
*
[1074] Fix | Delete
* At this point, we're pretty much assuming that all enclosures for an item
[1075] Fix | Delete
* are the same content. Anything else is too complicated to
[1076] Fix | Delete
* properly support.
[1077] Fix | Delete
*
[1078] Fix | Delete
* @since Beta 2
[1079] Fix | Delete
* @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4).
[1080] Fix | Delete
* @todo If an element exists at a level, but its value is empty, we should fall back to the value from the parent (if it exists).
[1081] Fix | Delete
* @return SimplePie_Enclosure[]|null List of SimplePie_Enclosure items
[1082] Fix | Delete
*/
[1083] Fix | Delete
public function get_enclosures()
[1084] Fix | Delete
{
[1085] Fix | Delete
if (!isset($this->data['enclosures']))
[1086] Fix | Delete
{
[1087] Fix | Delete
$this->data['enclosures'] = array();
[1088] Fix | Delete
[1089] Fix | Delete
// Elements
[1090] Fix | Delete
$captions_parent = null;
[1091] Fix | Delete
$categories_parent = null;
[1092] Fix | Delete
$copyrights_parent = null;
[1093] Fix | Delete
$credits_parent = null;
[1094] Fix | Delete
$description_parent = null;
[1095] Fix | Delete
$duration_parent = null;
[1096] Fix | Delete
$hashes_parent = null;
[1097] Fix | Delete
$keywords_parent = null;
[1098] Fix | Delete
$player_parent = null;
[1099] Fix | Delete
$ratings_parent = null;
[1100] Fix | Delete
$restrictions_parent = null;
[1101] Fix | Delete
$thumbnails_parent = null;
[1102] Fix | Delete
$title_parent = null;
[1103] Fix | Delete
[1104] Fix | Delete
// Let's do the channel and item-level ones first, and just re-use them if we need to.
[1105] Fix | Delete
$parent = $this->get_feed();
[1106] Fix | Delete
[1107] Fix | Delete
// CAPTIONS
[1108] Fix | Delete
if ($captions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text'))
[1109] Fix | Delete
{
[1110] Fix | Delete
foreach ($captions as $caption)
[1111] Fix | Delete
{
[1112] Fix | Delete
$caption_type = null;
[1113] Fix | Delete
$caption_lang = null;
[1114] Fix | Delete
$caption_startTime = null;
[1115] Fix | Delete
$caption_endTime = null;
[1116] Fix | Delete
$caption_text = null;
[1117] Fix | Delete
if (isset($caption['attribs']['']['type']))
[1118] Fix | Delete
{
[1119] Fix | Delete
$caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
[1120] Fix | Delete
}
[1121] Fix | Delete
if (isset($caption['attribs']['']['lang']))
[1122] Fix | Delete
{
[1123] Fix | Delete
$caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
[1124] Fix | Delete
}
[1125] Fix | Delete
if (isset($caption['attribs']['']['start']))
[1126] Fix | Delete
{
[1127] Fix | Delete
$caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT);
[1128] Fix | Delete
}
[1129] Fix | Delete
if (isset($caption['attribs']['']['end']))
[1130] Fix | Delete
{
[1131] Fix | Delete
$caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT);
[1132] Fix | Delete
}
[1133] Fix | Delete
if (isset($caption['data']))
[1134] Fix | Delete
{
[1135] Fix | Delete
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1136] Fix | Delete
}
[1137] Fix | Delete
$captions_parent[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text));
[1138] Fix | Delete
}
[1139] Fix | Delete
}
[1140] Fix | Delete
elseif ($captions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text'))
[1141] Fix | Delete
{
[1142] Fix | Delete
foreach ($captions as $caption)
[1143] Fix | Delete
{
[1144] Fix | Delete
$caption_type = null;
[1145] Fix | Delete
$caption_lang = null;
[1146] Fix | Delete
$caption_startTime = null;
[1147] Fix | Delete
$caption_endTime = null;
[1148] Fix | Delete
$caption_text = null;
[1149] Fix | Delete
if (isset($caption['attribs']['']['type']))
[1150] Fix | Delete
{
[1151] Fix | Delete
$caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
[1152] Fix | Delete
}
[1153] Fix | Delete
if (isset($caption['attribs']['']['lang']))
[1154] Fix | Delete
{
[1155] Fix | Delete
$caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
[1156] Fix | Delete
}
[1157] Fix | Delete
if (isset($caption['attribs']['']['start']))
[1158] Fix | Delete
{
[1159] Fix | Delete
$caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT);
[1160] Fix | Delete
}
[1161] Fix | Delete
if (isset($caption['attribs']['']['end']))
[1162] Fix | Delete
{
[1163] Fix | Delete
$caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT);
[1164] Fix | Delete
}
[1165] Fix | Delete
if (isset($caption['data']))
[1166] Fix | Delete
{
[1167] Fix | Delete
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1168] Fix | Delete
}
[1169] Fix | Delete
$captions_parent[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text));
[1170] Fix | Delete
}
[1171] Fix | Delete
}
[1172] Fix | Delete
if (is_array($captions_parent))
[1173] Fix | Delete
{
[1174] Fix | Delete
$captions_parent = array_values(array_unique($captions_parent));
[1175] Fix | Delete
}
[1176] Fix | Delete
[1177] Fix | Delete
// CATEGORIES
[1178] Fix | Delete
foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category)
[1179] Fix | Delete
{
[1180] Fix | Delete
$term = null;
[1181] Fix | Delete
$scheme = null;
[1182] Fix | Delete
$label = null;
[1183] Fix | Delete
if (isset($category['data']))
[1184] Fix | Delete
{
[1185] Fix | Delete
$term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1186] Fix | Delete
}
[1187] Fix | Delete
if (isset($category['attribs']['']['scheme']))
[1188] Fix | Delete
{
[1189] Fix | Delete
$scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
[1190] Fix | Delete
}
[1191] Fix | Delete
else
[1192] Fix | Delete
{
[1193] Fix | Delete
$scheme = 'http://search.yahoo.com/mrss/category_schema';
[1194] Fix | Delete
}
[1195] Fix | Delete
if (isset($category['attribs']['']['label']))
[1196] Fix | Delete
{
[1197] Fix | Delete
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
[1198] Fix | Delete
}
[1199] Fix | Delete
$categories_parent[] = $this->registry->create('Category', array($term, $scheme, $label));
[1200] Fix | Delete
}
[1201] Fix | Delete
foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category)
[1202] Fix | Delete
{
[1203] Fix | Delete
$term = null;
[1204] Fix | Delete
$scheme = null;
[1205] Fix | Delete
$label = null;
[1206] Fix | Delete
if (isset($category['data']))
[1207] Fix | Delete
{
[1208] Fix | Delete
$term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1209] Fix | Delete
}
[1210] Fix | Delete
if (isset($category['attribs']['']['scheme']))
[1211] Fix | Delete
{
[1212] Fix | Delete
$scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
[1213] Fix | Delete
}
[1214] Fix | Delete
else
[1215] Fix | Delete
{
[1216] Fix | Delete
$scheme = 'http://search.yahoo.com/mrss/category_schema';
[1217] Fix | Delete
}
[1218] Fix | Delete
if (isset($category['attribs']['']['label']))
[1219] Fix | Delete
{
[1220] Fix | Delete
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
[1221] Fix | Delete
}
[1222] Fix | Delete
$categories_parent[] = $this->registry->create('Category', array($term, $scheme, $label));
[1223] Fix | Delete
}
[1224] Fix | Delete
foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'category') as $category)
[1225] Fix | Delete
{
[1226] Fix | Delete
$term = null;
[1227] Fix | Delete
$scheme = 'http://www.itunes.com/dtds/podcast-1.0.dtd';
[1228] Fix | Delete
$label = null;
[1229] Fix | Delete
if (isset($category['attribs']['']['text']))
[1230] Fix | Delete
{
[1231] Fix | Delete
$label = $this->sanitize($category['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT);
[1232] Fix | Delete
}
[1233] Fix | Delete
$categories_parent[] = $this->registry->create('Category', array($term, $scheme, $label));
[1234] Fix | Delete
[1235] Fix | Delete
if (isset($category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category']))
[1236] Fix | Delete
{
[1237] Fix | Delete
foreach ((array) $category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category'] as $subcategory)
[1238] Fix | Delete
{
[1239] Fix | Delete
if (isset($subcategory['attribs']['']['text']))
[1240] Fix | Delete
{
[1241] Fix | Delete
$label = $this->sanitize($subcategory['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT);
[1242] Fix | Delete
}
[1243] Fix | Delete
$categories_parent[] = $this->registry->create('Category', array($term, $scheme, $label));
[1244] Fix | Delete
}
[1245] Fix | Delete
}
[1246] Fix | Delete
}
[1247] Fix | Delete
if (is_array($categories_parent))
[1248] Fix | Delete
{
[1249] Fix | Delete
$categories_parent = array_values(array_unique($categories_parent));
[1250] Fix | Delete
}
[1251] Fix | Delete
[1252] Fix | Delete
// COPYRIGHT
[1253] Fix | Delete
if ($copyright = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright'))
[1254] Fix | Delete
{
[1255] Fix | Delete
$copyright_url = null;
[1256] Fix | Delete
$copyright_label = null;
[1257] Fix | Delete
if (isset($copyright[0]['attribs']['']['url']))
[1258] Fix | Delete
{
[1259] Fix | Delete
$copyright_url = $this->sanitize($copyright[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT);
[1260] Fix | Delete
}
[1261] Fix | Delete
if (isset($copyright[0]['data']))
[1262] Fix | Delete
{
[1263] Fix | Delete
$copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1264] Fix | Delete
}
[1265] Fix | Delete
$copyrights_parent = $this->registry->create('Copyright', array($copyright_url, $copyright_label));
[1266] Fix | Delete
}
[1267] Fix | Delete
elseif ($copyright = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright'))
[1268] Fix | Delete
{
[1269] Fix | Delete
$copyright_url = null;
[1270] Fix | Delete
$copyright_label = null;
[1271] Fix | Delete
if (isset($copyright[0]['attribs']['']['url']))
[1272] Fix | Delete
{
[1273] Fix | Delete
$copyright_url = $this->sanitize($copyright[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT);
[1274] Fix | Delete
}
[1275] Fix | Delete
if (isset($copyright[0]['data']))
[1276] Fix | Delete
{
[1277] Fix | Delete
$copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1278] Fix | Delete
}
[1279] Fix | Delete
$copyrights_parent = $this->registry->create('Copyright', array($copyright_url, $copyright_label));
[1280] Fix | Delete
}
[1281] Fix | Delete
[1282] Fix | Delete
// CREDITS
[1283] Fix | Delete
if ($credits = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit'))
[1284] Fix | Delete
{
[1285] Fix | Delete
foreach ($credits as $credit)
[1286] Fix | Delete
{
[1287] Fix | Delete
$credit_role = null;
[1288] Fix | Delete
$credit_scheme = null;
[1289] Fix | Delete
$credit_name = null;
[1290] Fix | Delete
if (isset($credit['attribs']['']['role']))
[1291] Fix | Delete
{
[1292] Fix | Delete
$credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
[1293] Fix | Delete
}
[1294] Fix | Delete
if (isset($credit['attribs']['']['scheme']))
[1295] Fix | Delete
{
[1296] Fix | Delete
$credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
[1297] Fix | Delete
}
[1298] Fix | Delete
else
[1299] Fix | Delete
{
[1300] Fix | Delete
$credit_scheme = 'urn:ebu';
[1301] Fix | Delete
}
[1302] Fix | Delete
if (isset($credit['data']))
[1303] Fix | Delete
{
[1304] Fix | Delete
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1305] Fix | Delete
}
[1306] Fix | Delete
$credits_parent[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
[1307] Fix | Delete
}
[1308] Fix | Delete
}
[1309] Fix | Delete
elseif ($credits = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit'))
[1310] Fix | Delete
{
[1311] Fix | Delete
foreach ($credits as $credit)
[1312] Fix | Delete
{
[1313] Fix | Delete
$credit_role = null;
[1314] Fix | Delete
$credit_scheme = null;
[1315] Fix | Delete
$credit_name = null;
[1316] Fix | Delete
if (isset($credit['attribs']['']['role']))
[1317] Fix | Delete
{
[1318] Fix | Delete
$credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
[1319] Fix | Delete
}
[1320] Fix | Delete
if (isset($credit['attribs']['']['scheme']))
[1321] Fix | Delete
{
[1322] Fix | Delete
$credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
[1323] Fix | Delete
}
[1324] Fix | Delete
else
[1325] Fix | Delete
{
[1326] Fix | Delete
$credit_scheme = 'urn:ebu';
[1327] Fix | Delete
}
[1328] Fix | Delete
if (isset($credit['data']))
[1329] Fix | Delete
{
[1330] Fix | Delete
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1331] Fix | Delete
}
[1332] Fix | Delete
$credits_parent[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
[1333] Fix | Delete
}
[1334] Fix | Delete
}
[1335] Fix | Delete
if (is_array($credits_parent))
[1336] Fix | Delete
{
[1337] Fix | Delete
$credits_parent = array_values(array_unique($credits_parent));
[1338] Fix | Delete
}
[1339] Fix | Delete
[1340] Fix | Delete
// DESCRIPTION
[1341] Fix | Delete
if ($description_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'description'))
[1342] Fix | Delete
{
[1343] Fix | Delete
if (isset($description_parent[0]['data']))
[1344] Fix | Delete
{
[1345] Fix | Delete
$description_parent = $this->sanitize($description_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1346] Fix | Delete
}
[1347] Fix | Delete
}
[1348] Fix | Delete
elseif ($description_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'description'))
[1349] Fix | Delete
{
[1350] Fix | Delete
if (isset($description_parent[0]['data']))
[1351] Fix | Delete
{
[1352] Fix | Delete
$description_parent = $this->sanitize($description_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1353] Fix | Delete
}
[1354] Fix | Delete
}
[1355] Fix | Delete
[1356] Fix | Delete
// DURATION
[1357] Fix | Delete
if ($duration_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'duration'))
[1358] Fix | Delete
{
[1359] Fix | Delete
$seconds = null;
[1360] Fix | Delete
$minutes = null;
[1361] Fix | Delete
$hours = null;
[1362] Fix | Delete
if (isset($duration_parent[0]['data']))
[1363] Fix | Delete
{
[1364] Fix | Delete
$temp = explode(':', $this->sanitize($duration_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
[1365] Fix | Delete
if (sizeof($temp) > 0)
[1366] Fix | Delete
{
[1367] Fix | Delete
$seconds = (int) array_pop($temp);
[1368] Fix | Delete
}
[1369] Fix | Delete
if (sizeof($temp) > 0)
[1370] Fix | Delete
{
[1371] Fix | Delete
$minutes = (int) array_pop($temp);
[1372] Fix | Delete
$seconds += $minutes * 60;
[1373] Fix | Delete
}
[1374] Fix | Delete
if (sizeof($temp) > 0)
[1375] Fix | Delete
{
[1376] Fix | Delete
$hours = (int) array_pop($temp);
[1377] Fix | Delete
$seconds += $hours * 3600;
[1378] Fix | Delete
}
[1379] Fix | Delete
unset($temp);
[1380] Fix | Delete
$duration_parent = $seconds;
[1381] Fix | Delete
}
[1382] Fix | Delete
}
[1383] Fix | Delete
[1384] Fix | Delete
// HASHES
[1385] Fix | Delete
if ($hashes_iterator = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash'))
[1386] Fix | Delete
{
[1387] Fix | Delete
foreach ($hashes_iterator as $hash)
[1388] Fix | Delete
{
[1389] Fix | Delete
$value = null;
[1390] Fix | Delete
$algo = null;
[1391] Fix | Delete
if (isset($hash['data']))
[1392] Fix | Delete
{
[1393] Fix | Delete
$value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1394] Fix | Delete
}
[1395] Fix | Delete
if (isset($hash['attribs']['']['algo']))
[1396] Fix | Delete
{
[1397] Fix | Delete
$algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
[1398] Fix | Delete
}
[1399] Fix | Delete
else
[1400] Fix | Delete
{
[1401] Fix | Delete
$algo = 'md5';
[1402] Fix | Delete
}
[1403] Fix | Delete
$hashes_parent[] = $algo.':'.$value;
[1404] Fix | Delete
}
[1405] Fix | Delete
}
[1406] Fix | Delete
elseif ($hashes_iterator = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash'))
[1407] Fix | Delete
{
[1408] Fix | Delete
foreach ($hashes_iterator as $hash)
[1409] Fix | Delete
{
[1410] Fix | Delete
$value = null;
[1411] Fix | Delete
$algo = null;
[1412] Fix | Delete
if (isset($hash['data']))
[1413] Fix | Delete
{
[1414] Fix | Delete
$value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
[1415] Fix | Delete
}
[1416] Fix | Delete
if (isset($hash['attribs']['']['algo']))
[1417] Fix | Delete
{
[1418] Fix | Delete
$algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
[1419] Fix | Delete
}
[1420] Fix | Delete
else
[1421] Fix | Delete
{
[1422] Fix | Delete
$algo = 'md5';
[1423] Fix | Delete
}
[1424] Fix | Delete
$hashes_parent[] = $algo.':'.$value;
[1425] Fix | Delete
}
[1426] Fix | Delete
}
[1427] Fix | Delete
if (is_array($hashes_parent))
[1428] Fix | Delete
{
[1429] Fix | Delete
$hashes_parent = array_values(array_unique($hashes_parent));
[1430] Fix | Delete
}
[1431] Fix | Delete
[1432] Fix | Delete
// KEYWORDS
[1433] Fix | Delete
if ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords'))
[1434] Fix | Delete
{
[1435] Fix | Delete
if (isset($keywords[0]['data']))
[1436] Fix | Delete
{
[1437] Fix | Delete
$temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
[1438] Fix | Delete
foreach ($temp as $word)
[1439] Fix | Delete
{
[1440] Fix | Delete
$keywords_parent[] = trim($word);
[1441] Fix | Delete
}
[1442] Fix | Delete
}
[1443] Fix | Delete
unset($temp);
[1444] Fix | Delete
}
[1445] Fix | Delete
elseif ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords'))
[1446] Fix | Delete
{
[1447] Fix | Delete
if (isset($keywords[0]['data']))
[1448] Fix | Delete
{
[1449] Fix | Delete
$temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
[1450] Fix | Delete
foreach ($temp as $word)
[1451] Fix | Delete
{
[1452] Fix | Delete
$keywords_parent[] = trim($word);
[1453] Fix | Delete
}
[1454] Fix | Delete
}
[1455] Fix | Delete
unset($temp);
[1456] Fix | Delete
}
[1457] Fix | Delete
elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords'))
[1458] Fix | Delete
{
[1459] Fix | Delete
if (isset($keywords[0]['data']))
[1460] Fix | Delete
{
[1461] Fix | Delete
$temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
[1462] Fix | Delete
foreach ($temp as $word)
[1463] Fix | Delete
{
[1464] Fix | Delete
$keywords_parent[] = trim($word);
[1465] Fix | Delete
}
[1466] Fix | Delete
}
[1467] Fix | Delete
unset($temp);
[1468] Fix | Delete
}
[1469] Fix | Delete
elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords'))
[1470] Fix | Delete
{
[1471] Fix | Delete
if (isset($keywords[0]['data']))
[1472] Fix | Delete
{
[1473] Fix | Delete
$temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
[1474] Fix | Delete
foreach ($temp as $word)
[1475] Fix | Delete
{
[1476] Fix | Delete
$keywords_parent[] = trim($word);
[1477] Fix | Delete
}
[1478] Fix | Delete
}
[1479] Fix | Delete
unset($temp);
[1480] Fix | Delete
}
[1481] Fix | Delete
if (is_array($keywords_parent))
[1482] Fix | Delete
{
[1483] Fix | Delete
$keywords_parent = array_values(array_unique($keywords_parent));
[1484] Fix | Delete
}
[1485] Fix | Delete
[1486] Fix | Delete
// PLAYER
[1487] Fix | Delete
if ($player_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'player'))
[1488] Fix | Delete
{
[1489] Fix | Delete
if (isset($player_parent[0]['attribs']['']['url']))
[1490] Fix | Delete
{
[1491] Fix | Delete
$player_parent = $this->sanitize($player_parent[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
[1492] Fix | Delete
}
[1493] Fix | Delete
}
[1494] Fix | Delete
elseif ($player_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'player'))
[1495] Fix | Delete
{
[1496] Fix | Delete
if (isset($player_parent[0]['attribs']['']['url']))
[1497] Fix | Delete
{
[1498] Fix | Delete
$player_parent = $this->sanitize($player_parent[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function