Document previous foreign-key dropdown work, and also ensure that the configuration import code works properly with it.

This commit is contained in:
Robin Johnson
2005-07-11 05:51:13 +00:00
parent 34bd15df0e
commit 63798666e5
5 changed files with 192 additions and 160 deletions

312
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -1231,6 +1231,26 @@ Defaults to FALSE (drop-down). <br />
</ul>
Default is old behavior so input.
<br /><br />
</dd>
<dt><b>$cfg['InsertRows']</b> integer</dt>
<dd>
Defines the maximum number of concurrent entries for the Insert page.
</dd>
<dt><b>$cfg['ForeignKeyMaxLimit']</b> integer</dt>
<dd>
If there are fewer items than this in the set of foreign keys, then a
drop-down box of foreign keys is presented, in the style described by the
<b>$cfg['ForeignKeyDropdownOrder']</b> setting.
</dd>
<dt><b>$cfg['ForeignKeyDropdownOrder']</b> array</dt>
<dd>
For the foreign key drop-down fields, there are several methods of
display, offering both the key and value data. The contents of the
array should be one or both of the following strings:
<i>'content-id'</i>, <i>'id-content'</i>.
</dd>
<dt>

View File

@@ -275,12 +275,10 @@ $cfg['CharEditing'] = 'input';
// input - allows limiting of input length
// textarea - allows newlines in fields
$cfg['InsertRows'] = 2; // How many rows can be inserted at one time
$cfg['ForeignKeyDropdownOrder'] = array(
'content-id'
//,
//'id-content'
); // Sort order for items in a foreign-key dropdown box.
$cfg['ForeignKeyMaxLimit'] = 100; // If less items than this exist, a dropdown will be used.
$cfg['ForeignKeyDropdownOrder'] = // Sort order for items in a foreign-key dropdown box.
array( 'content-id', 'id-content'); // 'content' is the referenced data, 'id' is the key value.
$cfg['ForeignKeyMaxLimit'] = 100; // A dropdown will be used if fewer items are present
// For the export features...

View File

@@ -142,7 +142,7 @@ if (isset($cfg['FileRevision'])) {
} else {
$cfg['FileRevision'] = array(1, 1);
}
if ($cfg['FileRevision'][0] < 2 || ($cfg['FileRevision'][0] == 2 && $cfg['FileRevision'][1] < 58)) {
if ($cfg['FileRevision'][0] < 2 || ($cfg['FileRevision'][0] == 2 && $cfg['FileRevision'][1] < 59)) {
require_once('./libraries/config_import.lib.php');
}

View File

@@ -478,6 +478,14 @@ if (!isset($cfg['InsertRows'])) {
$cfg['InsertRows'] = 2;
}
if (!isset($cfg['ForeignKeyDropdownOrder'])) {
$cfg['ForeignKeyDropdownOrder'] = array( 'content-id', 'id-content');
}
if (!isset($cfg['ForeignKeyMaxLimit'])) {
$cfg['ForeignKeyMaxLimit'] = 100;
}
if (!isset($cfg['ZipDump'])) {
if (isset($cfgZipDump)) {
$cfg['ZipDump'] = $cfgZipDump;