| @@ -35,9 +35,9 @@ | ||
| 35 | 35 | |
| 36 | 36 | public function admin_init() { |
| 37 | 37 | if ( isset( $_POST['gdbb-attach-submit'] ) ) { |
| 38 | 38 | |
| 39 | - check_admin_referer( 'bbp-core' ); | |
| 39 | + check_admin_referer( 'forumax' ); | |
| 40 | 40 | |
| 41 | 41 | //TODO: Check all these. |
| 42 | 42 | BBPCATTCore::instance()->o['max_file_size'] = absint( $_POST['max_file_size'] ); |
| 43 | 43 | BBPCATTCore::instance()->o['max_to_upload'] = absint( $_POST['max_to_upload'] ); |
| @@ -53,9 +53,9 @@ | ||
| 53 | 53 | exit(); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | if ( isset( $_POST['gdbb-att-advanced-submit'] ) ) { |
| 57 | - check_admin_referer( 'bbp-core' ); | |
| 57 | + check_admin_referer( 'forumax' ); | |
| 58 | 58 | |
| 59 | 59 | BBPCATTCore::instance()->o['log_upload_errors'] = isset( $_POST['log_upload_errors'] ) ? 1 : 0; |
| 60 | 60 | BBPCATTCore::instance()->o['errors_visible_to_admins'] = isset( $_POST['errors_visible_to_admins'] ) ? 1 : 0; |
| 61 | 61 | BBPCATTCore::instance()->o['errors_visible_to_moderators'] = isset( $_POST['errors_visible_to_moderators'] ) ? 1 : 0; |
| @@ -102,9 +102,9 @@ | ||
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | public function admin_post_columns( $columns ) { |
| 106 | - $columns['gdbbatt_count'] = '<img src="' . BBPCATTACHMENT_URL . 'css/gfx/attachment.png" width="16" height="12" alt="' . __( 'Attachments', 'bbp-core' ) . '" title="' . __( 'Attachments', 'bbp-core' ) . '" />'; | |
| 106 | + $columns['gdbbatt_count'] = '<img src="' . BBPCATTACHMENT_URL . 'css/gfx/attachment.png" width="16" height="12" alt="' . __( 'Attachments', 'forumax' ) . '" title="' . __( 'Attachments', 'forumax' ) . '" />'; | |
| 107 | 107 | |
| 108 | 108 | return $columns; |
| 109 | 109 | } |
| 110 | 110 | |
| @@ -109,18 +109,18 @@ | ||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | public function admin_columns_data( $column, $id ) { |
| 112 | 112 | if ( $column == 'gdbbatt_count' ) { |
| 113 | - $attachments = bbpc_get_post_attachments( $id ); | |
| 113 | + $attachments = forumax_get_post_attachments( $id ); | |
| 114 | 114 | echo count( $attachments ); |
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | public function admin_meta() { |
| 119 | - if ( current_user_can( BBPC_ATTACHMENT ) ) { | |
| 120 | - add_meta_box( 'gdbbattach-meta-forum', __( 'Attachments Settings', 'bbp-core' ), [ $this, 'metabox_forum' ], 'forum', 'side', 'high' ); | |
| 121 | - add_meta_box( 'gdbbattach-meta-files', __( 'Attachments List', 'bbp-core' ), [ $this, 'metabox_files' ], 'topic', 'side', 'high' ); | |
| 122 | - add_meta_box( 'gdbbattach-meta-files', __( 'Attachments List', 'bbp-core' ), [ $this, 'metabox_files' ], 'reply', 'side', 'high' ); | |
| 119 | + if ( current_user_can( FORUMAX_ATTACHMENT ) ) { | |
| 120 | + add_meta_box( 'gdbbattach-meta-forum', __( 'Attachments Settings', 'forumax' ), [ $this, 'metabox_forum' ], 'forum', 'side', 'high' ); | |
| 121 | + add_meta_box( 'gdbbattach-meta-files', __( 'Attachments List', 'forumax' ), [ $this, 'metabox_files' ], 'topic', 'side', 'high' ); | |
| 122 | + add_meta_box( 'gdbbattach-meta-files', __( 'Attachments List', 'forumax' ), [ $this, 'metabox_files' ], 'reply', 'side', 'high' ); | |
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | public function metabox_forum() { |