1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Sort by primary id when exporting tables. Alert-box styling fix on modern-light admin theme.

This commit is contained in:
Cameron
2021-05-11 13:26:27 -07:00
parent 6674beaf82
commit 8d29f97bd2
3 changed files with 16 additions and 3 deletions

View File

@@ -1273,7 +1273,7 @@ class system_tools
<td> <td>
".$frm->checkbox("xml_tables[".$name."]", $name, $checked, array('label'=>DBLAN_99." ".$name)). ".$frm->checkbox("xml_tables[".$name."]", $name, $checked, array('label'=>DBLAN_99." ".$name)).
"</td> "</td>
<td class='right'>$count</td> <td class='right'>".$count."</td>
</tr>"; </tr>";
} }

View File

@@ -491,7 +491,7 @@ class xmlClass
{ {
$this->errors = $this->getErrors($xmlData); $this->errors = $this->getErrors($xmlData);
return FALSE; return FALSE;
}; }
$xml = $simple ? $this->xml_convert_to_array($xml, $this->filter, $this->stripComments) : $this->xml2array($xml); $xml = $simple ? $this->xml_convert_to_array($xml, $this->filter, $this->stripComments) : $this->xml2array($xml);
return $xml; return $xml;
@@ -1006,8 +1006,21 @@ class xmlClass
$text .= "\t<database>\n"; $text .= "\t<database>\n";
foreach($tables as $tbl) foreach($tables as $tbl)
{ {
$primaryKey = '';
$eTable= str_replace(MPREFIX,"",$tbl); $eTable= str_replace(MPREFIX,"",$tbl);
$eQry = (!empty($options['query'])) ? $options['query'] : null; $eQry = (!empty($options['query'])) ? $options['query'] : null;
// order by the primary-key
if($pri = e107::getDb()->index($eTable, 'PRIMARY', null, true))
{
$primaryKey = varset($pri[0]['Column_name']);
}
if(empty($eQry) && !empty($primaryKey))
{
$eQry = " 1 ORDER BY ".$primaryKey." ASC";
}
e107::getDb()->select($eTable, "*", $eQry); e107::getDb()->select($eTable, "*", $eQry);
$text .= "\t<dbTable name=\"".$eTable."\">\n"; $text .= "\t<dbTable name=\"".$eTable."\">\n";
// $count = 1; // $count = 1;

View File

@@ -1649,7 +1649,7 @@ ul.col-selection { background-color: #FCFDFF; }
#admin-menus #sc-admin-help , #admin-menus #sc-admin-help ,
#admin-menus .admin-ui-nav-menu { background: #373737 } #admin-menus .admin-ui-nav-menu { background: #373737 }
h4.caption { margin-bottom: 15px !important; } h4.caption { margin-bottom: 15px !important; }
.s-message-body .well { color: white; }