mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-01 08:00:47 +08:00
[Legacy] Add enable_record_pagination and change disable_vcr as fallback
This commit is contained in:
parent
c4797f7e0b
commit
ae7e40b2ca
3 changed files with 17 additions and 4 deletions
|
@ -80,10 +80,13 @@ class DetailView extends ListView
|
|||
global $previous_offset;
|
||||
global $list_view_row_count;
|
||||
global $current_offset;
|
||||
if (!empty($sugar_config['disable_vcr'])) {
|
||||
|
||||
$recordPaginationEnabled = isset($sugar_config['enable_record_pagination']) ? $sugar_config['enable_record_pagination'] : (!isset($sugar_config['disable_vcr']) || !$sugar_config['disable_vcr']);
|
||||
if (!$recordPaginationEnabled) {
|
||||
$seed->retrieve($_REQUEST['record']);
|
||||
return $seed;
|
||||
}
|
||||
|
||||
$isfirstview = 0;
|
||||
|
||||
$nav_history_set=false;
|
||||
|
@ -352,9 +355,13 @@ class DetailView extends ListView
|
|||
$post_html_text .= "</td>\n";
|
||||
$post_html_text .= "</tr>\n";
|
||||
$showVCRControl = true;
|
||||
if (isset($sugar_config['disable_vcr'])) {
|
||||
|
||||
if (isset($sugar_config['enable_record_pagination'])) {
|
||||
$showVCRControl = $sugar_config['enable_record_pagination'];
|
||||
} elseif (isset($sugar_config['disable_vcr'])) {
|
||||
$showVCRControl = !$sugar_config['disable_vcr'];
|
||||
}
|
||||
|
||||
if ($showVCRControl && $html_text != "") {
|
||||
$xtpl->assign("PAGINATION", $pre_html_text.$html_text.$post_html_text);
|
||||
}
|
||||
|
|
|
@ -92,9 +92,13 @@ class DetailView2 extends EditView
|
|||
$this->tpl = get_custom_file_if_exists($tpl);
|
||||
$this->module = $module;
|
||||
$this->metadataFile = $metadataFile;
|
||||
if (isset($GLOBALS['sugar_config']['disable_vcr'])) {
|
||||
|
||||
if (isset($GLOBALS['sugar_config']['enable_record_pagination'])) {
|
||||
$this->showVCRControl = $GLOBALS['sugar_config']['enable_record_pagination'];
|
||||
} else {
|
||||
$this->showVCRControl = !$GLOBALS['sugar_config']['disable_vcr'];
|
||||
}
|
||||
|
||||
if (!empty($this->metadataFile) && file_exists($this->metadataFile)) {
|
||||
require($this->metadataFile);
|
||||
} else {
|
||||
|
|
|
@ -241,7 +241,9 @@ class EditView
|
|||
}
|
||||
$this->metadataFile = $metadataFile;
|
||||
|
||||
if (isset($GLOBALS['sugar_config']['disable_vcr'])) {
|
||||
if (isset($GLOBALS['sugar_config']['enable_record_pagination'])) {
|
||||
$this->showVCRControl = $GLOBALS['sugar_config']['enable_record_pagination'];
|
||||
} else {
|
||||
$this->showVCRControl = !$GLOBALS['sugar_config']['disable_vcr'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue