output tweak hack for primary keys on single line
This commit is contained in:
parent
fcef2aaab7
commit
312b87ea79
@ -457,7 +457,7 @@ $schema['foreign_service'] = array(
|
||||
|
||||
$schema['foreign_user'] = array(
|
||||
'fields' => array(
|
||||
'id' => array('type' => 'bigint', 'not null' => true, 'description' => 'unique numeric key on foreign service'),
|
||||
'id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'unique numeric key on foreign service'),
|
||||
'service' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to service'),
|
||||
'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'identifying URI'),
|
||||
'nickname' => array('type' => 'varchar', 'length' => 255, 'description' => 'nickname on foreign service'),
|
||||
|
@ -48,8 +48,15 @@ function indentOptions($indent)
|
||||
|
||||
function prettyDumpArray($arr, $key=null, $indent=0)
|
||||
{
|
||||
// hack
|
||||
if ($key == 'primary key') {
|
||||
$subIndent = $indent + 2;
|
||||
} else {
|
||||
$subIndent = $indent + 1;
|
||||
}
|
||||
|
||||
list($space, $sep, $lf, $endspace) = indentOptions($indent);
|
||||
list($inspace, $insep, $inlf, $inendspace) = indentOptions($indent + 1);
|
||||
list($inspace, $insep, $inlf, $inendspace) = indentOptions($subIndent);
|
||||
|
||||
print "{$space}";
|
||||
if (!is_numeric($key)) {
|
||||
@ -60,7 +67,7 @@ function prettyDumpArray($arr, $key=null, $indent=0)
|
||||
$n = 0;
|
||||
foreach ($arr as $key => $row) {
|
||||
$n++;
|
||||
prettyDumpArray($row, $key, $indent + 1);
|
||||
prettyDumpArray($row, $key, $subIndent);
|
||||
if ($n < count($arr)) {
|
||||
print "$insep$inlf";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user