Ticket #3188: 3188.patch
| File 3188.patch, 1.3 KB (added by , 9 years ago) |
|---|
-
src/includes/common/functions.php
179 179 // Default value 180 180 $retval = false; 181 181 182 // Get number of minutes to allow editing for 183 $minutes = (int) get_option( '_bbp_edit_lock', 5 ); 184 185 // Now 186 $cur_time = current_time( 'timestamp', true ); 187 188 // Period of time 189 $lockable = "+{$minutes} minutes"; 190 191 // Add lockable time to post time 192 $lock_time = strtotime( $lockable, strtotime( $post_date_gmt ) ); 193 182 194 // Check if date and editing is allowed 183 195 if ( ! empty( $post_date_gmt ) && bbp_allow_content_edit() ) { 184 196 185 // Get number of minutes to allow editing for186 $minutes = (int) get_option( '_bbp_edit_lock', 5 );187 188 197 // "0" minutes set, so allow forever 189 198 if ( 0 === $minutes ) { 190 199 $retval = true; 191 200 192 201 // Not "0" so compare 193 } else { 194 195 // Period of time 196 $lockable = "+{$minutes} minutes"; 197 198 // Now 199 $cur_time = current_time( 'timestamp', true ); 200 201 // Add lockable time to post time 202 $lock_time = strtotime( $lockable, strtotime( $post_date_gmt ) ); 203 204 // Compare 205 if ( $cur_time >= $lock_time ) { 206 $retval = true; 207 } 202 } elseif ( $cur_time >= $lock_time ) { 203 $retval = true; 208 204 } 209 205 } 210 206
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)