Index: branches/5.3.x/units/articles/articles_event_handler.php =================================================================== diff -u -r16400 -r16524 --- branches/5.3.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 16400) +++ branches/5.3.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 16524) @@ -1,6 +1,6 @@ getObject(); - /* @var $object kDBList */ if ( !$this->Application->isAdminUser ) { $where_clause = '(Archived = 0) AND (StartDate < ' . time() . ' OR StartDate = 0) AND (EndOn > ' . time() . ' OR EndOn IS NULL)'; @@ -130,8 +130,8 @@ (LENGTH(cd.'.$article_custom_fields['RssOriginalURL'].') > 0)'; $article_ids = $this->Conn->GetCol($sql); if ($article_ids) { + /** @var kTempTablesHandler $temp_handler */ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event)); - /* @var $temp_handler kTempTablesHandler */ $temp_handler->DeleteItems($event->Prefix, $event->Special, $article_ids); } @@ -182,8 +182,8 @@ return true; } + /** @var kCurlHelper $curl_helper */ $curl_helper = $this->Application->recallObject('CurlHelper'); - /* @var $curl_helper kCurlHelper */ $curl_helper->followLocation = true; $curl_helper->setOptions( Array (CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows; U; Windows NT 5.2; ru; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)') ); // otherwise FeedBurner will return HTML @@ -194,8 +194,8 @@ return false; } + /** @var kXMLHelper $xml_helper */ $xml_helper = $this->Application->recallObject('kXMLHelper'); - /* @var $xml_helper kXMLHelper */ $root_node =& $xml_helper->Parse($xml_data, kXMLHelper::XML_WITH_TEXT_NODES); @@ -233,8 +233,8 @@ */ function _getMLFields(&$object) { + /** @var kMultiLanguage $ml_formatter */ $ml_formatter = $this->Application->recallObject('kMultiLanguage'); - /* @var $ml_formatter kMultiLanguage */ $title_field = 'Title'; $title_formatter = $object->GetFieldOption($title_field, 'formatter'); @@ -264,8 +264,8 @@ $current_node = $root_node->firstChild; $feed_articles = $this->getFeedArticles($event); + /** @var kDBItem $object */ $object = $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true)); - /* @var $object kDBItem */ $category_id = $event->getEventParam('category_id'); list ($title_field, $body_field) = $this->_getMLFields($object); @@ -275,8 +275,9 @@ if ($current_node->Name != 'ITEM') continue; // collect item data $data = Array(); + + /** @var kXMLNode $sub_node */ $sub_node =& $current_node->firstChild; - /* @var $sub_node kXMLNode */ do { if ($sub_node->Name == 'ATOM:SUMMARY') { @@ -354,8 +355,8 @@ $current_node = $root_node->firstChild; $feed_articles = $this->getFeedArticles($event); + /** @var kDBItem $object */ $object = $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true)); - /* @var $object kDBItem */ $category_id = $event->getEventParam('category_id'); list ($title_field, $body_field) = $this->_getMLFields($object); @@ -364,8 +365,9 @@ if ($current_node->Name != 'ENTRY') continue; // collect item data $data = Array(); + + /** @var kXMLNode $sub_node */ $sub_node =& $current_node->firstChild; - /* @var $sub_node kXMLNode */ do { if ($sub_node->Name == 'LINK') { @@ -409,8 +411,8 @@ function getCustomColumns($prefix) { + /** @var kMultiLanguage $ml_formatter */ $ml_formatter = $this->Application->recallObject('kMultiLanguage'); - /* @var $ml_formatter kMultiLanguage */ $custom_fields = array_flip($this->Application->getUnitConfig($prefix)->getCustomFields()); @@ -458,8 +460,8 @@ */ function createExcerpt($event) { + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ if ( !$object->GetField('Excerpt') || $object->GetDBField('GenerateExcerpt') ) { $excerpt = strip_tags($object->GetField('Body')); @@ -484,8 +486,8 @@ $excerpt_formatter = $object->GetFieldOption('Excerpt', 'formatter'); if ( $excerpt_formatter == 'kMultiLanguage' ) { + /** @var kMultiLanguage $ml_formatter */ $ml_formatter = $this->Application->recallObject('kMultiLanguage'); - /* @var $ml_formatter kMultiLanguage */ $excerpt_field = $ml_formatter->LangFieldName($excerpt_field); } @@ -546,8 +548,8 @@ return ; } + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $archive_days = $this->Application->ConfigValue('News_Archive'); if ( $archive_days ) {