Index: branches/5.2.x/units/articles/articles_event_handler.php =================================================================== diff -u -r16312 -r16518 --- branches/5.2.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 16312) +++ branches/5.2.x/units/articles/articles_event_handler.php (.../articles_event_handler.php) (revision 16518) @@ -1,6 +1,6 @@ getObject(); - /* @var $object kDBList */ if ( !$this->Application->isAdminUser ) { $where_clause = '(Archived = 0) AND (StartDate < ' . adodb_mktime() . ' OR StartDate = 0) AND (EndOn > ' . adodb_mktime() . ' OR EndOn IS NULL)'; @@ -129,8 +129,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'); - /* @var $temp_handler kTempTablesHandler */ $temp_handler->DeleteItems($event->Prefix, $event->Special, $article_ids); } @@ -179,8 +179,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 @@ -191,8 +191,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); @@ -230,8 +230,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'); @@ -261,8 +261,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); @@ -272,8 +272,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') { @@ -351,8 +352,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); @@ -361,8 +362,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') { @@ -406,8 +408,8 @@ function getCustomColumns($prefix) { + /** @var kMultiLanguage $ml_formatter */ $ml_formatter = $this->Application->recallObject('kMultiLanguage'); - /* @var $ml_formatter kMultiLanguage */ $custom_fields = array_flip($this->Application->getUnitOption($prefix, 'CustomFields')); foreach ($custom_fields as $custom_name => $custom_id) { @@ -454,8 +456,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')); @@ -480,8 +482,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); } @@ -529,8 +531,8 @@ return ; } + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $archive_days = $this->Application->ConfigValue('News_Archive'); if ( $archive_days ) {