diff options
| author | wjames5 <will@tekimaki.com> | 2009-01-24 18:40:54 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2009-01-24 18:40:54 +0000 |
| commit | 369e449b168e13f749aa88e837f1836f4ed584ce (patch) | |
| tree | ec636c83f24b5e1770c337563272f67e770fd8c6 | |
| parent | 871e65e8ac15977e9f6cb2a0be2c4ffa6e807a55 (diff) | |
| download | liberty-369e449b168e13f749aa88e837f1836f4ed584ce.tar.gz liberty-369e449b168e13f749aa88e837f1836f4ed584ce.tar.bz2 liberty-369e449b168e13f749aa88e837f1836f4ed584ce.zip | |
standardize search with 'find' param, removes find_objects - CUSTOM PACKAGE DEVELOPERS who use get_content_list_inc take notecvs up -dP
| -rw-r--r-- | get_content_list_inc.php | 18 | ||||
| -rw-r--r-- | list_content.php | 6 | ||||
| -rw-r--r-- | templates/edit_structure_content.tpl | 2 | ||||
| -rw-r--r-- | templates/list_content_inc.tpl | 2 |
4 files changed, 20 insertions, 8 deletions
diff --git a/get_content_list_inc.php b/get_content_list_inc.php index 367f9dc..adbd4dd 100644 --- a/get_content_list_inc.php +++ b/get_content_list_inc.php @@ -3,7 +3,7 @@ * get_content_list * * @author Christian Fowler> - * @version $Revision: 1.32 $ + * @version $Revision: 1.33 $ * @package liberty * @subpackage functions */ @@ -38,7 +38,21 @@ if( empty( $contentListHash ) ) { // sort by this: <table column>_asc (or _desc) 'sort_mode' => !empty( $content_sort_mode ) ? $content_sort_mode : 'title_asc', // limit the result to this set - 'find' => !empty( $_REQUEST["find_objects"] ) ? $_REQUEST["find_objects"] : NULL, + /** + * NOTE: the use of 'find' here replaces the former value 'find_objects' to standardize the use of 'find' as a + * search param. 'find' is used commonly in getList methods both in LibertyContent and throughout bitweaver packages + * to search titles for matches. 'find_objects' was perhaps used in the past to distinguish from 'find' as there seemed + * to be collisions with modules that might have used $_REQUEST['find'] in their processes for unknown reasons. Those collisions + * do not appear to exist any longer. Module processes in general should not use $_REQUEST params. Further an investigation + * of the bitweaver code base turned up no obvious instances where the use of find here would collide with other uses. + * Thus there is no anticipation that this change should effect any other processess that are actively maintained. That said, + * should some conflict be found there are two possible solutions. One is investigating whether the use of $_REQUEST['find'] + * is necessary to the process or if find should be passed to the process in another hash. The other is to decease all use of + * $_REQUEST here and instead pass a hash to this process, which would likely be a more intellegent solution. + * + * This change was made Jan 24 2008. If after 6 months no conflict has been discovered, you may remove this comment bloat. -wjames5 + **/ + 'find' => !empty( $_REQUEST["find"] ) ? $_REQUEST["find"] : NULL, // display this page number - replaces antiquated offset 'page' => !empty( $_REQUEST["list_page"] ) ? $_REQUEST["list_page"] : NULL, // only display content by this user diff --git a/list_content.php b/list_content.php index c8dcdac..3f04c80 100644 --- a/list_content.php +++ b/list_content.php @@ -3,7 +3,7 @@ * list_content * * @author spider <spider@steelsun.com> - * @version $Revision: 1.31 $ + * @version $Revision: 1.32 $ * @package liberty * @subpackage functions */ @@ -41,9 +41,7 @@ $gBitSmarty->assign( 'contentTypes', $contentTypes ); $gBitSmarty->assign( 'contentList', $contentList ); $contentListHash['listInfo']['ihash']['content_type_guid'] = $contentSelect[0]; $contentListHash['listInfo']['ihash']['user_id'] = @BitBase::verifyId( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : NULL; -if ( isset( $contentListHash['listInfo']['find'] ) ) { - $contentListHash['listInfo']['ihash']['find_objects'] = $contentListHash['listInfo']['find']; -} +$contentListHash['listInfo']['ihash']['find'] = $contentListHash['listInfo']['find']; $gBitSmarty->assign( 'listInfo', $contentListHash['listInfo'] ); $gBitSmarty->assign( 'content_type_guids', ( isset( $_REQUEST['content_type_guid'] ) ? $_REQUEST['content_type_guid'] : NULL )); diff --git a/templates/edit_structure_content.tpl b/templates/edit_structure_content.tpl index ead6920..7794c50 100644 --- a/templates/edit_structure_content.tpl +++ b/templates/edit_structure_content.tpl @@ -34,7 +34,7 @@ {/forminput} {forminput} - <input type="text" name="find_objects" /> + <input type="text" name="find" /> <input type="submit" value="{tr}Apply filter{/tr}" name="search_objects" /> {formhelp note=""} {/forminput} diff --git a/templates/list_content_inc.tpl b/templates/list_content_inc.tpl index 202e923..1a524fd 100644 --- a/templates/list_content_inc.tpl +++ b/templates/list_content_inc.tpl @@ -23,7 +23,7 @@ {/if} {forminput} - <input type="text" name="find_objects" value="{$listInfo.find}" /> + <input type="text" name="find" value="{$listInfo.find}" /> <input type="submit" value="{tr}Apply Filter{/tr}" name="search_objects" /> {formhelp note="You can restrict the content listing to a given content type or apply a filter on content title."} {/forminput} |
