Здравствуйте, есть такая проблема поставил кнопки для "Активации и Деактивация объявления" вот пример: 
https://prnt.sc/25i83wuДеактивация объявления, работает все хорошо.
Активация, не активирует объявления, видает что  "Объявление уже деактивировано"  вот пример  
https://prnt.sc/25i8j58 И вот код кнопок. 
https://prnt.sc/25i8r41Помогите пожалуйста, разобраться с этой проблемой.
Добали эти 3 кода.
1. В function.php 
function osc_item_deactivate_url($secret = '', $id = '') {
if ($id == '') { $id = osc_item_id(); };
if ( osc_rewrite_enabled() ) {
return osc_base_url() . 'item/deactivate' . '/' . $id . '/' . $secret;
} else {
return osc_base_url(true) . '?page=item&action=deactivate&id=' . $id . ($secret != '' ? '&secret=' . $secret : '');
}
 }
2. В контроллер /oc-includes/osclass/controller/item.php  
case 'deactivate':
                    $secret = Params::getParam('secret');
                    $id     = Params::getParam('id');
                    $item   = $this->itemManager->listWhere("i.pk_i_id = %d AND ((i.s_secret = %s) OR (i.fk_i_user_id = %d))", (int)($id), $secret, (int)($this->userId));
                    // item doesn't exist
                    if( count($item) == 0 ) {
                        $this->do404();
                        return;
                    }
                    View::newInstance()->_exportVariableToView('item', $item[0]);
                    if( $item[0]['b_active'] == 1 ) {
                        // DEACTIVATE ITEM
                        $mItems = new ItemActions(false);
                        $success = $mItems->deactivate( $item[0]['pk_i_id'], $item[0]['s_secret'] );
                        if( $success ) {
                            osc_add_flash_ok_message( _m('The listing has been deactivated') );
                        }else{
                            osc_add_flash_error_message( _m("The listing can't be deactivated") );
                        }
                    } else {
                        osc_add_flash_warning_message( _m('The listing has already been deactivated') );
                    }
                    $this->redirectTo( osc_item_url( ) );
                break;
3. В файле шаблона user-items.php в блок объявления добавить кнопки вроде этих:
<?php if(osc_item_is_active()) {?> <a href="<?php echo osc_item_deactivate_url(); ?>" class="edit-link"><?php _e('Deactivate', 'bender'); ?></a> <?php } ?>
<?php if(!osc_item_is_active()) {?> <a href="<?php echo osc_item_activate_url(); ?>" class="edit-link"><?php _e('Activate', 'bender'); ?></a> <?php } ?>