Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6f4676c

Browse files
committed
Merge remote-tracking branch 'origin/master' into useNamespaces_master
2 parents c0617bc + 77c5b0a commit 6f4676c

46 files changed

Lines changed: 146 additions & 172 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

db_central_columns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
if (isset($_POST['multi_edit_central_column_save'])) {
7979
$message = PMA_updateMultipleColumn();
8080
if (!is_bool($message)) {
81-
$response->isSuccess(false);
81+
$response->setRequestStatus(false);
8282
$response->addJSON('message', $message);
8383
}
8484
}

db_create.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
*/
5353
if ($GLOBALS['is_ajax_request'] == true) {
5454
$response = PMA\libraries\Response::getInstance();
55-
$response->isSuccess(false);
55+
$response->setRequestStatus(false);
5656
$response->addJSON('message', $message);
5757
} else {
5858
include_once 'index.php';

db_designer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
if ($_REQUEST['operation'] == 'deletePage') {
3939
$success = PMA_deletePage($_REQUEST['selected_page']);
40-
$response->isSuccess($success);
40+
$response->setRequestStatus($success);
4141
} elseif ($_REQUEST['operation'] == 'savePage') {
4242
if ($_REQUEST['save_page'] == 'same') {
4343
$page = $_REQUEST['selected_page'];
@@ -46,12 +46,12 @@
4646
$response->addJSON('id', $page);
4747
}
4848
$success = PMA_saveTablePositions($page);
49-
$response->isSuccess($success);
49+
$response->setRequestStatus($success);
5050
} elseif ($_REQUEST['operation'] == 'setDisplayField') {
5151
PMA_saveDisplayField(
5252
$_REQUEST['db'], $_REQUEST['table'], $_REQUEST['field']
5353
);
54-
$response->isSuccess(true);
54+
$response->setRequestStatus(true);
5555
} elseif ($_REQUEST['operation'] == 'addNewRelation') {
5656
list($success, $message) = PMA_addNewRelation(
5757
$_REQUEST['db'],
@@ -62,7 +62,7 @@
6262
$_REQUEST['on_delete'],
6363
$_REQUEST['on_update']
6464
);
65-
$response->isSuccess($success);
65+
$response->setRequestStatus($success);
6666
$response->addJSON('message', $message);
6767
} elseif ($_REQUEST['operation'] == 'removeRelation') {
6868
list($success, $message) = PMA_removeRelation(
@@ -71,11 +71,11 @@
7171
$_REQUEST['T2'],
7272
$_REQUEST['F2']
7373
);
74-
$response->isSuccess($success);
74+
$response->setRequestStatus($success);
7575
$response->addJSON('message', $message);
7676
} elseif ($_REQUEST['operation'] == 'save_setting_value') {
7777
$success = PMA_saveDesignerSetting($_REQUEST['index'], $_REQUEST['value']);
78-
$response->isSuccess($success);
78+
$response->setRequestStatus($success);
7979
}
8080

8181
return;

db_operations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
*/
183183
if ($GLOBALS['is_ajax_request'] == true) {
184184
$response = PMA\libraries\Response::getInstance();
185-
$response->isSuccess($message->isSuccess());
185+
$response->setRequestStatus($message->isSuccess());
186186
$response->addJSON('message', $message);
187187
$response->addJSON('newname', $_REQUEST['newname']);
188188
$response->addJSON(

doc/config.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,7 +2038,8 @@ Tabs display settings
20382038
:type: string
20392039
:default: ``'welcome'``
20402040

2041-
Defines the tab displayed by default on server view. Possible values:
2041+
Defines the tab displayed by default on server view. The possible values
2042+
are the localized equivalent of:
20422043

20432044
* ``welcome`` (recommended for multi-user setups)
20442045
* ``databases``,
@@ -2051,8 +2052,8 @@ Tabs display settings
20512052
:type: string
20522053
:default: ``'structure'``
20532054

2054-
Defines the tab displayed by default on database view. Possible
2055-
values:
2055+
Defines the tab displayed by default on database view. The possible values
2056+
are the localized equivalent of:
20562057

20572058
* ``structure``
20582059
* ``sql``
@@ -2064,7 +2065,8 @@ Tabs display settings
20642065
:type: string
20652066
:default: ``'browse'``
20662067

2067-
Defines the tab displayed by default on table view. Possible values:
2068+
Defines the tab displayed by default on table view. The possible values
2069+
are the localized equivalent of:
20682070

20692071
* ``structure``
20702072
* ``sql``

import.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
if ($GLOBALS['is_ajax_request'] == true) {
359359
$message = PMA\libraries\Message::success(__('Showing bookmark'));
360360
$response = PMA\libraries\Response::getInstance();
361-
$response->isSuccess($message->isSuccess());
361+
$response->setRequestStatus($message->isSuccess());
362362
$response->addJSON('message', $message);
363363
$response->addJSON('sql_query', $import_text);
364364
$response->addJSON('action_bookmark', $_REQUEST['action_bookmark']);
@@ -373,7 +373,7 @@
373373
if ($GLOBALS['is_ajax_request'] == true) {
374374
$message = PMA\libraries\Message::success(__('The bookmark has been deleted.'));
375375
$response = PMA\libraries\Response::getInstance();
376-
$response->isSuccess($message->isSuccess());
376+
$response->setRequestStatus($message->isSuccess());
377377
$response->addJSON('message', $message);
378378
$response->addJSON('action_bookmark', $_REQUEST['action_bookmark']);
379379
$response->addJSON('id_bookmark', $id_bookmark);
@@ -793,15 +793,15 @@
793793
}
794794

795795
$response = PMA\libraries\Response::getInstance();
796-
$response->isSuccess(true);
796+
$response->setRequestStatus(true);
797797
$response->addJSON('message', PMA\libraries\Message::success($msg));
798798
$response->addJSON(
799799
'sql_query',
800800
PMA\libraries\Util::getMessage($msg, $sql_query, 'success')
801801
);
802802
} else if ($result == false) {
803803
$response = PMA\libraries\Response::getInstance();
804-
$response->isSuccess(false);
804+
$response->setRequestStatus(false);
805805
$response->addJSON('message', PMA\libraries\Message::error($msg));
806806
} else {
807807
$active_page = $goto;

libraries/Response.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public static function getInstance()
136136
*
137137
* @return void
138138
*/
139-
public function isSuccess($state)
139+
public function setRequestStatus($state)
140140
{
141141
$this->_isSuccess = ($state == true);
142142
}
@@ -294,8 +294,7 @@ private function _ajaxResponse()
294294
if ($this->_isSuccess) {
295295
// Note: the old judge sentence is:
296296
// $this->_isAjaxPage && $this->_isSuccess
297-
// Removal the first, because console need log all queries, if caused any
298-
// bug, contact Edward Cheng
297+
// Removal the first, because console need log all queries
299298
$this->addJSON('_title', $this->getHeader()->getTitleTag());
300299

301300
if (isset($GLOBALS['dbi'])) {

libraries/SavedSearches.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public function save()
243243
__('Please provide a name for this bookmarked search.')
244244
);
245245
$response = Response::getInstance();
246-
$response->isSuccess($message->isSuccess());
246+
$response->setRequestStatus($message->isSuccess());
247247
$response->addJSON('fieldWithError', 'searchName');
248248
$response->addJSON('message', $message);
249249
exit;
@@ -258,7 +258,7 @@ public function save()
258258
__('Missing information to save the bookmarked search.')
259259
);
260260
$response = Response::getInstance();
261-
$response->isSuccess($message->isSuccess());
261+
$response->setRequestStatus($message->isSuccess());
262262
$response->addJSON('message', $message);
263263
exit;
264264
}
@@ -280,7 +280,7 @@ public function save()
280280
__('An entry with this name already exists.')
281281
);
282282
$response = Response::getInstance();
283-
$response->isSuccess($message->isSuccess());
283+
$response->setRequestStatus($message->isSuccess());
284284
$response->addJSON('fieldWithError', 'searchName');
285285
$response->addJSON('message', $message);
286286
exit;
@@ -317,7 +317,7 @@ public function save()
317317
__('An entry with this name already exists.')
318318
);
319319
$response = Response::getInstance();
320-
$response->isSuccess($message->isSuccess());
320+
$response->setRequestStatus($message->isSuccess());
321321
$response->addJSON('fieldWithError', 'searchName');
322322
$response->addJSON('message', $message);
323323
exit;
@@ -344,7 +344,7 @@ public function delete()
344344
__('Missing information to delete the search.')
345345
);
346346
$response = Response::getInstance();
347-
$response->isSuccess($message->isSuccess());
347+
$response->setRequestStatus($message->isSuccess());
348348
$response->addJSON('fieldWithError', 'searchId');
349349
$response->addJSON('message', $message);
350350
exit;
@@ -372,7 +372,7 @@ public function load()
372372
__('Missing information to load the search.')
373373
);
374374
$response = Response::getInstance();
375-
$response->isSuccess($message->isSuccess());
375+
$response->setRequestStatus($message->isSuccess());
376376
$response->addJSON('fieldWithError', 'searchId');
377377
$response->addJSON('message', $message);
378378
exit;
@@ -390,7 +390,7 @@ public function load()
390390
if (false === ($oneResult = $GLOBALS['dbi']->fetchArray($resList))) {
391391
$message = Message::error(__('Error while loading the search.'));
392392
$response = Response::getInstance();
393-
$response->isSuccess($message->isSuccess());
393+
$response->setRequestStatus($message->isSuccess());
394394
$response->addJSON('fieldWithError', 'searchId');
395395
$response->addJSON('message', $message);
396396
exit;

libraries/Util.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ public static function mysqlDie(
779779
*/
780780
if (!empty($GLOBALS['is_ajax_request'])) {
781781
$response = Response::getInstance();
782-
$response->isSuccess(false);
782+
$response->setRequestStatus(false);
783783
$response->addJSON('message', $error_msg);
784784
exit;
785785
}

libraries/common.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@
11051105
* an ajax request if there is a token mismatch
11061106
*/
11071107
if (isset($response) && $response->isAjax() && $token_mismatch) {
1108-
$response->isSuccess(false);
1108+
$response->setRequestStatus(false);
11091109
$response->addJSON(
11101110
'message',
11111111
Message::error(__('Error: Token mismatch'))

0 commit comments

Comments
 (0)