PluginProbe
Stream – Activity Log & Audit Trail / 4.0.2
Stream – Activity Log & Audit Trail v4.0.2
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
← All changes | classes/class-export.php +4 -27 trunk4.0.2 View file →
@@ -45,14 +45,8 @@
45 45 *
46 46 * @return void
47 47 */
48 48 public function render_download() {
49 - // Records are only viewable by users with the Stream view capability;
50 - // don't rely on the nonce alone for authorization.
51 - if ( ! current_user_can( $this->plugin->admin->view_cap ) ) {
52 - return;
53 - }
54 -
55 49 $nonce = wp_stream_filter_input( INPUT_GET, 'stream_record_actions_nonce' );
56 50 if ( ! wp_verify_nonce( $nonce, 'stream_record_actions_nonce' ) ) {
57 51 return;
58 52 }
@@ -116,9 +110,9 @@
116 110 foreach ( array_keys( $columns ) as $column_name ) {
117 111 switch ( $column_name ) {
118 112 case 'date':
119 113 $created = gmdate( 'Y-m-d H:i:s', strtotime( $record->created ) );
120 - $row_out[ $column_name ] = get_date_from_gmt( $created, 'Y/m/d h:i:s A T' );
114 + $row_out[ $column_name ] = get_date_from_gmt( $created, 'Y/m/d h:i:s A' );
121 115 break;
122 116
123 117 case 'summary':
124 118 $row_out[ $column_name ] = $record->summary;
@@ -123,17 +117,13 @@
123 117 case 'summary':
124 118 $row_out[ $column_name ] = $record->summary;
125 119 break;
126 120
127 - case 'user':
121 + case 'user_id':
128 122 $user = new Author( (int) $record->user_id, (array) $record->user_meta );
129 123 $row_out[ $column_name ] = $user->get_display_name();
130 124 break;
131 125
132 - case 'user_id':
133 - $row_out[ $column_name ] = $record->user_id;
134 - break;
135 -
136 126 case 'connector':
137 127 $row_out[ $column_name ] = $record->connector;
138 128 break;
139 129
@@ -140,12 +130,8 @@
140 130 case 'context':
141 131 $row_out[ $column_name ] = $record->context;
142 132 break;
143 133
144 - case 'object_id':
145 - $row_out[ $column_name ] = $record->object_id;
146 - break;
147 -
148 134 case 'action':
149 135 $row_out[ $column_name ] = $record->{$column_name};
150 136 break;
151 137
@@ -167,16 +153,9 @@
167 153 *
168 154 * @return int
169 155 */
170 156 public function disable_paginate() {
171 -
172 - /**
173 - * Filter to change how many records are exported.
174 - * Increasing this too much could cause your export to time out.
175 - *
176 - * @return int The number of records to export.
177 - */
178 - return apply_filters( 'wp_stream_export_limit', 10000 );
157 + return 10000;
179 158 }
180 159
181 160 /**
182 161 * Expand columns for CSV Output
@@ -187,13 +166,11 @@
187 166 public function expand_columns( $columns ) {
188 167 $new_columns = array(
189 168 'date' => $columns['date'],
190 169 'summary' => $columns['summary'],
191 - 'user' => $columns['user_id'],
192 - 'user_id' => __( 'User ID', 'stream' ),
170 + 'user_id' => $columns['user_id'],
193 171 'connector' => __( 'Connector', 'stream' ),
194 172 'context' => $columns['context'],
195 - 'object_id' => __( 'Object ID', 'stream' ),
196 173 'action' => $columns['action'],
197 174 'ip' => $columns['ip'],
198 175 );
199 176