function initFile($iMedID, $sTitle, $sCategories = '', $sTags = '', $sDesc = '', $aCustom = array()) { $aCustom['Approved'] = getParam('bx_photos_activation') == 'on' ? 'approved' : 'pending'; return parent::initFile($iMedID, $sTitle, $sCategories, $sTags, $sDesc, $aCustom); }