|
@@ -56,7 +56,7 @@ discard block |
|
|
block discarded – undo |
|
56
|
56
|
return; |
|
57
|
57
|
} |
|
58
|
58
|
|
|
59
|
|
- $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min'; |
|
|
59
|
+ $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET[ 'gform_debug' ] ) ? '' : '.min'; |
|
60
|
60
|
$locking_path = GFCommon::get_base_url() . '/includes/locking/'; |
|
61
|
61
|
|
|
62
|
62
|
wp_enqueue_script( 'gforms_locking', $locking_path . "js/locking{$min}.js", array( 'jquery', 'heartbeat' ), GFCommon::$version ); |
|
@@ -65,20 +65,20 @@ discard block |
|
|
block discarded – undo |
|
65
|
65
|
$translations = array_map( 'wp_strip_all_tags', $this->get_strings() ); |
|
66
|
66
|
|
|
67
|
67
|
$strings = array( |
|
68
|
|
- 'noResponse' => $translations['no_response'], |
|
69
|
|
- 'requestAgain' => $translations['request_again'], |
|
70
|
|
- 'requestError' => $translations['request_error'], |
|
71
|
|
- 'gainedControl' => $translations['gained_control'], |
|
72
|
|
- 'rejected' => $translations['request_rejected'], |
|
73
|
|
- 'pending' => $translations['request_pending'], |
|
|
68
|
+ 'noResponse' => $translations[ 'no_response' ], |
|
|
69
|
+ 'requestAgain' => $translations[ 'request_again' ], |
|
|
70
|
+ 'requestError' => $translations[ 'request_error' ], |
|
|
71
|
+ 'gainedControl' => $translations[ 'gained_control' ], |
|
|
72
|
+ 'rejected' => $translations[ 'request_rejected' ], |
|
|
73
|
+ 'pending' => $translations[ 'request_pending' ], |
|
74
|
74
|
); |
|
75
|
75
|
|
|
76
|
|
- $lock_user_id = $this->check_lock( $entry['id'] ); |
|
|
76
|
+ $lock_user_id = $this->check_lock( $entry[ 'id' ] ); |
|
77
|
77
|
|
|
78
|
78
|
$vars = array( |
|
79
|
79
|
'hasLock' => ! $lock_user_id ? 1 : 0, |
|
80
|
80
|
'lockUI' => $this->get_lock_ui( $lock_user_id ), |
|
81
|
|
- 'objectID' => $entry['id'], |
|
|
81
|
+ 'objectID' => $entry[ 'id' ], |
|
82
|
82
|
'objectType' => 'entry', |
|
83
|
83
|
'strings' => $strings, |
|
84
|
84
|
); |
|
@@ -206,11 +206,11 @@ discard block |
|
|
block discarded – undo |
|
206
|
206
|
|
|
207
|
207
|
$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) ); |
|
208
|
208
|
|
|
209
|
|
- if ( isset( $_GET['get-edit-lock'] ) ) { |
|
|
209
|
+ if ( isset( $_GET[ 'get-edit-lock' ] ) ) { |
|
210
|
210
|
$this->set_lock( $entry_id ); |
|
211
|
211
|
echo '<script>window.location = ' . json_encode( remove_query_arg( 'get-edit-lock', $current_url ) ) . ';</script>'; |
|
212
|
212
|
exit(); |
|
213
|
|
- } else if ( isset( $_GET['release-edit-lock'] ) ) { |
|
|
213
|
+ } else if ( isset( $_GET[ 'release-edit-lock' ] ) ) { |
|
214
|
214
|
$this->delete_lock_meta( $entry_id ); |
|
215
|
215
|
$current_url = remove_query_arg( 'edit', $current_url ); |
|
216
|
216
|
echo '<script>window.location = ' . json_encode( remove_query_arg( 'release-edit-lock', $current_url ) ) . ';</script>'; |