phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: sitemgr/modules class.module_news.inc.php,1.2.2


From: Michael Totschnig <address@hidden>
Subject: [Phpgroupware-cvs] CVS: sitemgr/modules class.module_news.inc.php,1.2.2.3,1.2.2.4
Date: Mon, 23 Jun 2003 18:58:42 -0400

Update of /cvsroot/phpgroupware/sitemgr/modules
In directory subversions:/tmp/cvs-serv23050/modules

Modified Files:
      Tag: Version-0_9_16-branch
        class.module_news.inc.php 
Log Message:
ACL_BO: accnt object was not created
adapt module news to changes in news_admin


Index: class.module_news.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/modules/class.module_news.inc.php,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -C2 -r1.2.2.3 -r1.2.2.4
*** class.module_news.inc.php   23 Jun 2003 20:31:21 -0000      1.2.2.3
--- class.module_news.inc.php   23 Jun 2003 22:58:39 -0000      1.2.2.4
***************
*** 29,35 ****
                        $cat = 
createobject('phpgwapi.categories','','news_admin');
                        $cats = 
$cat->return_array('all',0,False,'','','cat_name',True);
!                       while (list(,$category) = @each($cats))
                        {
!                               $cat_ids[$category['id']] = $category['name'];
                        }
                        $this->arguments['category']['options'] = $cat_ids;
--- 29,39 ----
                        $cat = 
createobject('phpgwapi.categories','','news_admin');
                        $cats = 
$cat->return_array('all',0,False,'','','cat_name',True);
!                       if ($cats)
                        {
!                               $cat_ids['all'] = lang('All categories');
!                               while (list(,$category) = each($cats))
!                               {
!                                       $cat_ids[$category['id']] = 
$category['name'];
!                               }
                        }
                        $this->arguments['category']['options'] = $cat_ids;
***************
*** 47,50 ****
--- 51,56 ----
                        
$this->template->set_block('news','RssBlock','rsshandle');
  
+                       $limit = $arguments['limit'] ? $arguments['limit'] : 5;
+ 
                        if ($arguments['rsslink'])
                        {
***************
*** 78,83 ****
                        }
  
!                       $newslist = 
$bonews->get_newslist($arguments['category'],$arguments['start'],'','',$arguments['limit'],True);
!                       $total = $bonews->total($arguments['category'],True);
  
                        while (list(,$newsitem) = @each($newslist))
--- 84,88 ----
                        }
  
!                       $newslist = 
$bonews->get_newslist($arguments['category'],$arguments['start'],'','',$limit,True);
  
                        while (list(,$newsitem) = @each($newslist))
***************
*** 87,98 ****
                        if ($arguments['start'])
                        {
!                               $link_data['start'] = $arguments['start'] - 
$arguments['limit'];
                                $this->template->set_var('lesslink',
                                        '<a href="' . $this->link($link_data) . 
'">&lt;&lt;&lt;</a>'
                                );
                        }
!                       if ($total > $arguments['start'] + $arguments['limit'])
                        {
!                               $link_data['start'] = $arguments['start'] + 
$arguments['limit'];
                                $this->template->set_var('morelink',
                                        '<a href="' . $this->link($link_data) . 
'">' . lang('More news') . '</a>'
--- 92,103 ----
                        if ($arguments['start'])
                        {
!                               $link_data['start'] = $arguments['start'] - 
$limit;
                                $this->template->set_var('lesslink',
                                        '<a href="' . $this->link($link_data) . 
'">&lt;&lt;&lt;</a>'
                                );
                        }
!                       if ($bonews->total > $arguments['start'] + $limit)
                        {
!                               $link_data['start'] = $arguments['start'] + 
$limit;
                                $this->template->set_var('morelink',
                                        '<a href="' . $this->link($link_data) . 
'">' . lang('More news') . '</a>'





reply via email to

[Prev in Thread] Current Thread [Next in Thread]