diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2007-07-09 21:47:01 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2007-07-09 21:47:01 +0000 |
| commit | de2ab510e334e2b4a1eaa80a4384aad7224ec543 (patch) | |
| tree | aecde49bc1ef0021d454f99581a0db946e5dc953 /list_content.php | |
| parent | ddc8b2ee22a25daa8dfcf72b410f23cd9ea4c968 (diff) | |
| download | liberty-de2ab510e334e2b4a1eaa80a4384aad7224ec543.tar.gz liberty-de2ab510e334e2b4a1eaa80a4384aad7224ec543.tar.bz2 liberty-de2ab510e334e2b4a1eaa80a4384aad7224ec543.zip | |
indent using tabs, not 2 spaces
Diffstat (limited to 'list_content.php')
| -rw-r--r-- | list_content.php | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/list_content.php b/list_content.php index 5e0f8b0..aa708d1 100644 --- a/list_content.php +++ b/list_content.php @@ -3,7 +3,7 @@ * list_content * * @author spider <spider@steelsun.com> - * @version $Revision: 1.23 $ + * @version $Revision: 1.24 $ * @package liberty * @subpackage functions */ @@ -16,12 +16,12 @@ require_once("../bit_setup_inc.php"); $gBitSystem->verifyPermission( 'p_liberty_list_content' ); // some content specific offsets and pagination settings -if( !empty( $_REQUEST['sort_mode'] ) ) { +if( !empty( $_REQUEST['sort_mode'] )) { $content_sort_mode = $_REQUEST['sort_mode']; $gBitSmarty->assign( 'sort_mode', $content_sort_mode ); } -$max_content = ( !empty( $_REQUEST['max_records'] ) )?$_REQUEST['max_records']:$gBitSystem->getConfig( 'max_records' ); +$max_content = ( !empty( $_REQUEST['max_records'] )) ? $_REQUEST['max_records'] : $gBitSystem->getConfig( 'max_records' ); $gBitSmarty->assign( 'user_id', @BitBase::verifyId( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : NULL ); // now that we have all the offsets, we can get the content list @@ -32,40 +32,40 @@ $gBitSmarty->assign( 'contentTypes', $contentTypes ); $gBitSmarty->assign( 'contentList', $contentList['data'] ); $contentList['listInfo']['parameters']['content_type_guid'] = $contentSelect; $gBitSmarty->assign( 'listInfo', $contentList['listInfo'] ); -$gBitSmarty->assign( 'content_type_guids', (isset($_REQUEST['content_type_guid'])?$_REQUEST['content_type_guid']:NULL) ); +$gBitSmarty->assign( 'content_type_guids', ( isset( $_REQUEST['content_type_guid'] ) ? $_REQUEST['content_type_guid'] : NULL )); //depricate 'ajax_xml', use 'output' //@todo clean out from other packages -if( !empty( $_REQUEST['ajax_xml'] ) ) { - $_REQUEST['output'] = 'ajax'; +if( !empty( $_REQUEST['ajax_xml'] )) { + $_REQUEST['output'] = 'ajax'; } -if ( !empty( $_REQUEST['output'] ) ){ - switch ($_REQUEST['output']){ - case 'json': - $gBitSmarty->assign_by_ref('listcontent', $contentList['data']); - header('Content-type:application/json'); - $gBitSmarty->display( 'bitpackage:liberty/list_content_json.tpl' ); - break; - case 'ajax': - /*@todo the results structure of this are limited and - * seem specific to some package use. It also requires - * an extra value 'id' which also seems very specific. - * Recommend that this be standardized, but - * a package dependency somewhere is likely an issue - */ - require_once( UTIL_PKG_PATH.'javascript/libs/suggest/suggest_lib.php' ); - foreach( array_keys( $contentList['data'] ) as $row ) { - $xmlList[$contentList['data'][$row]['content_id']] = $contentList['data'][$row]['title']; - } - $xml = SuggestLib::exportXml( $xmlList, $_REQUEST['id'] ); - header( "Content-Type: text/xml\n\n" ); - print $xml; - break; - case 'raw': - //means we just want the contents of $contentList when we include this file - break; - } +if( !empty( $_REQUEST['output'] )) { + switch( $_REQUEST['output'] ) { + case 'json': + $gBitSmarty->assign_by_ref( 'listcontent', $contentList['data'] ); + header( 'Content-type:application/json' ); + $gBitSmarty->display( 'bitpackage:liberty/list_content_json.tpl' ); + break; + case 'ajax': + /* @TODO: the results structure of this are limited and + * seem specific to some package use. It also requires + * an extra value 'id' which also seems very specific. + * Recommend that this be standardized, but + * a package dependency somewhere is likely an issue + */ + require_once( UTIL_PKG_PATH.'javascript/libs/suggest/suggest_lib.php' ); + foreach( array_keys( $contentList['data'] ) as $row ) { + $xmlList[$contentList['data'][$row]['content_id']] = $contentList['data'][$row]['title']; + } + $xml = SuggestLib::exportXml( $xmlList, $_REQUEST['id'] ); + header( "Content-Type: text/xml\n\n" ); + print $xml; + break; + case 'raw': + //means we just want the contents of $contentList when we include this file + break; + } } else { $gBitSystem->setBrowserTitle( 'List Content' ); $gBitSystem->display( 'bitpackage:liberty/list_content.tpl' ); |
