From: <be...@us...> - 2012-06-10 06:13:00
|
Revision: 9629 http://xoops.svn.sourceforge.net/xoops/?rev=9629&view=rev Author: beckmi Date: 2012-06-10 06:12:53 +0000 (Sun, 10 Jun 2012) Log Message: ----------- Code cleanup Modified Paths: -------------- XoopsModules/news/branches/mamba/news/admin/index.php XoopsModules/news/branches/mamba/news/language/english/admin.php Modified: XoopsModules/news/branches/mamba/news/admin/index.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/index.php 2012-06-10 04:01:22 UTC (rev 9628) +++ XoopsModules/news/branches/mamba/news/admin/index.php 2012-06-10 06:12:53 UTC (rev 9629) @@ -1587,17 +1587,17 @@ $criteria->add(new Criteria("published", 0,'>')); $stories_published = $storiesHandler->getCount($criteria); - $storiesNeedApproval = $count_stories- $stories_published; + $stories_need_approval = $count_stories- $stories_published; $criteria = new CriteriaCompo(); $criteria->add(new Criteria("expired", 0,'>')); $criteria->add(new Criteria("expired", time(),'<')); $stories_expired = $storiesHandler->getCount($criteria); - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria("expired", 0,'>')); - $criteria->add(new Criteria("expired", time(),'>')); - $storiesExpiredSoon = $storiesHandler->getCount($criteria); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("expired", 0,'>')); + $criteria->add(new Criteria("expired", time(),'>')); + $stories_expired_soon = $storiesHandler->getCount($criteria); //compte "total" $count_topics = $topicsHandler->getCount(); @@ -1609,18 +1609,23 @@ $clr_count_stories = ($count_stories == 0) ? 'red': 'green'; $clr_count_topics = ($count_topics == 0) ? 'red': 'green'; $clr_ihome_stories = ($stories_ihome == 0) ? 'red': 'green'; - $clr_menu_topics = ($topics_menu == 0) ? 'red': 'green'; - + $clr_menu_topics = ($topics_menu == 0) ? 'red': 'green'; + + $clr_published_stories = ($stories_published == 0) ? 'red': 'green'; + $clr_need_approval_stories = ($stories_need_approval == 0) ? 'green': 'red'; + $clr_expired_stories = ($stories_expired == 0) ? 'red': 'green'; + $clr_need_expired_soon_stories = ($stories_expired_soon == 0) ? 'red': 'green'; + $indexAdmin->addInfoBox(_AM_NEWS_STATISTICS); $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_TOPICS, $count_topics, $clr_count_topics); $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_TOPICS_ONLINE, $topics_menu, $clr_menu_topics); $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES, $count_stories, $clr_count_stories); $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_ONLINE, $stories_ihome, $clr_ihome_stories); - $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_APPROVED, $stories_published, $clr_ihome_stories); - $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_NEED_APPROVAL, $storiesNeedApproval, 'red'); - $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_EXPIRED, $stories_expired, $clr_ihome_stories); - $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_EXPIRED_SOON, $storiesExpiredSoon, $clr_ihome_stories); + $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_APPROVED, $stories_published, $clr_ihome_stories); + $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_NEED_APPROVAL, $stories_need_approval, $clr_need_approval_stories); + $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_EXPIRED, $stories_expired, $clr_expired_stories); + $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_EXPIRED_SOON, $stories_expired_soon, $clr_need_expired_soon_stories); Modified: XoopsModules/news/branches/mamba/news/language/english/admin.php =================================================================== --- XoopsModules/news/branches/mamba/news/language/english/admin.php 2012-06-10 04:01:22 UTC (rev 9628) +++ XoopsModules/news/branches/mamba/news/language/english/admin.php 2012-06-10 06:12:53 UTC (rev 9629) @@ -223,6 +223,6 @@ define ("_AM_NEWS_THEREARE_STORIES_IMPORTED", "There are <span class='red bold'>%s</span> Imported Stories"); define ("_AM_NEWS_THEREARE_STORIES_EXPORTED", "There are <span class='red bold'>%s</span> Stories exported"); define ("_AM_NEWS_THEREARE_STORIES_EXPIRED", "There are <span class='red bold'>%s</span> Expired News"); -define ("_AM_NEWS_THEREARE_STORIES_EXPIRED_SOON", "There are <span class='red bold'>%s</span> News to be Expired soon"); +define ("_AM_NEWS_THEREARE_STORIES_EXPIRED_SOON", "There are <span class='red bold'>%s</span> News to Expire soon"); define ("_AM_NEWS_THEREARE_STORIES_APPROVED", "There are <span class='red bold'>%s</span> Approved News"); define ("_AM_NEWS_THEREARE_STORIES_NEED_APPROVAL", "There are <span class='red bold'>%s</span> News that need Approval"); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |