From: <jon...@us...> - 2010-06-15 17:23:56
|
Revision: 27640 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=27640&view=rev Author: jonnybradley Date: 2010-06-15 17:23:50 +0000 (Tue, 15 Jun 2010) Log Message: ----------- [ENH] Admin categories: Don't show categorised pages in the "add to cat" section as they're already added. TODO refactor to do same for all object types Modified Paths: -------------- branches/5.x/tiki-admin_categories.php Modified: branches/5.x/tiki-admin_categories.php =================================================================== --- branches/5.x/tiki-admin_categories.php 2010-06-15 17:21:36 UTC (rev 27639) +++ branches/5.x/tiki-admin_categories.php 2010-06-15 17:23:50 UTC (rev 27640) @@ -360,6 +360,22 @@ if( $prefs['feature_wiki'] == 'y' ) { $pages = $tikilib->list_pageNames($offset, $maxRecords, 'pageName_asc', $find_objects); + //TODO for all other object types + $pages_not_in_cat = array(); + foreach($pages['data'] as $pg) { + $found = false; + foreach ($objects['data'] as $obj) { + if ($obj['type'] == 'wiki page' && $obj['itemId'] == $pg['pageName']) { + $found = true; + break; + } + } + if (!$found) { + $pages_not_in_cat[] = $pg; + } + } + $pages['data'] = $pages_not_in_cat; + $pages['cant'] = count($pages_not_in_cat); } if( $prefs['feature_faqs'] == 'y' ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |