root/ip/tags/release_1_3_0_53/includes/news.php

111163
48
	var $config;
48
	var $config;
49
	var $name;
49
	var $name;
50
	var $item_count;
50
	var $item_count;
51
	var $is_topic = false;
51
52
52
	/**
53
	/**
53
	* Class constructor.
54
	* Class constructor.
...
...
579
		else
580
		else
580
		{
581
		{
581
			$topic_id = 0;
582
			$topic_id = 0;
582
			if(isset($_GET['topic_id']))
583
			if(!empty($_GET['topic_id']))
583
			{
584
			{
584
				$topic_id = $_GET['topic_id'];
585
				$topic_id = intval($_GET['topic_id']);
585
			}
586
			}
586
			elseif(isset($_GET['news_id']))
587
			elseif(!empty($_GET['news_id']))
587
			{
588
			{
588
				$topic_id = $_GET['news_id'];
589
				$topic_id = intval($_GET['news_id']);
589
			}
590
			}
591
			$topic_id = ($topic_id < 0) ? 0 : $topic_id;
590
592
593
			if (!empty($topic_id))
594
			{
595
				$this->is_topic = true;
596
			}
597
591
			$this->setVariables(array('TITLE' => $lang['News_Cmx'] . ' ' . $lang['Articles']));
598
			$this->setVariables(array('TITLE' => $lang['News_Cmx'] . ' ' . $lang['Articles']));
592
			$this->renderArticles($topic_id);
599
			$this->renderArticles($topic_id);
593
		}
600
		}
...
...
609
			$news_counter = $this->config['news_item_num'];
616
			$news_counter = $this->config['news_item_num'];
610
		}
617
		}
611
618
619
		if ($this->is_topic)
620
		{
621
			$news_counter = $this->config['posts_per_page'];
622
		}
623
612
		if($this->item_count > $news_counter)
624
		if($this->item_count > $news_counter)
613
		{
625
		{
614
			//$index_file = PORTAL_MG;
626
			//$index_file = PORTAL_MG;