Index: branches/5.2.x/units/articles/articles_event_handler.php =================================================================== diff -u -N -r13843 -r14091 --- branches/5.2.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 13843) +++ branches/5.2.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 14091) @@ -1,6 +1,6 @@ Attributes) ? $node->Attributes['TYPE'] : false; + if ( !isset($content_type) ) { + $content_type = $node->GetAttribute('TYPE'); } switch ($content_type) { @@ -325,11 +325,11 @@ break; case 'html': - $data = unhtmlentities($node->firstChild->Data); // $node->Data + $data = unhtmlentities( $node->GetXML(true) ); // $node->firstChild->Data // $node->Data break; default: - $data = $node->firstChild->Data; // $node->Data; also for 'text' + $data = $node->GetXML(true); // $node->firstChild->Data; // $node->Data; also for 'text' break; } @@ -361,15 +361,15 @@ do { if ($sub_node->Name == 'LINK') { - if ($sub_node->Attributes['REL'] == 'alternate') { - $data[$sub_node->Name] = $sub_node->Attributes['HREF']; + if ($sub_node->GetAttribute('REL') === false || $sub_node->GetAttribute('REL') == 'alternate') { + $data[$sub_node->Name] = $sub_node->GetAttribute('HREF'); } } elseif ($sub_node->Name == 'CONTENT' || $sub_node->Name == 'SUMMARY' || $sub_node->Name == 'TITLE') { $data[$sub_node->Name] = $this->getNodeContent($sub_node); } else { - $data[$sub_node->Name] = $sub_node->firstChild->Data; // $sub_node->Data + $data[$sub_node->Name] = $sub_node->GetXML(true); // firstChild->Data; // $sub_node->Data } } while ( ($sub_node =& $sub_node->NextSibling()) ); @@ -477,12 +477,12 @@ { $new_virtual_fields = Array( 'cust_RssSource' => Array('type' => 'string', 'default' => ''), - 'cust_RssDefaultExpiration' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), + 'cust_RssDefaultExpiration' => Array('type' => 'int', 'default' => ''), 'cust_RssDefaultExpirationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month', 29030400 => 'la_opt_year'), 'default' => 60), - 'cust_RssExpireInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), + 'cust_RssExpireInterval' => Array('type' => 'int', 'default' => ''), 'cust_RssExpireIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60), 'cust_RssDeleteExpired' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'default' => 0), - 'cust_RssUpdateInterval' => Array('type' => 'int', 'not_null' => 1, 'default' => ''), + 'cust_RssUpdateInterval' => Array('type' => 'int', 'default' => ''), 'cust_RssUpdateIntervalType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(60 => 'la_opt_min', 3600 => 'la_opt_hour', 86400 => 'la_opt_day', 2419200 => 'la_opt_month'), 'default' => 60), 'cust_RssLastUpdated' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''), 'cust_RssLastExpired' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),