Skip to content

Commit

Permalink
fix coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
ruleant committed Sep 2, 2012
1 parent d9bef96 commit 163dba1
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 160 deletions.
96 changes: 48 additions & 48 deletions libraries/opendocument.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,60 +38,60 @@ function PMA_createOpenDocument($mime, $data)
$zipfile -> addFile(
'<?xml version="1.0" encoding="UTF-8"?'. '>'
. '<office:document-meta '
. 'xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" '
. 'xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" '
. 'office:version="1.0">'
. '<office:meta>'
. '<meta:generator>phpMyAdmin ' . PMA_VERSION . '</meta:generator>'
. '<meta:initial-creator>phpMyAdmin ' . PMA_VERSION . '</meta:initial-creator>'
. '<meta:creation-date>' . strftime('%Y-%m-%dT%H:%M:%S') . '</meta:creation-date>'
. '</office:meta>'
. 'xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" '
. 'xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" '
. 'office:version="1.0">'
. '<office:meta>'
. '<meta:generator>phpMyAdmin ' . PMA_VERSION . '</meta:generator>'
. '<meta:initial-creator>phpMyAdmin ' . PMA_VERSION . '</meta:initial-creator>'
. '<meta:creation-date>' . strftime('%Y-%m-%dT%H:%M:%S') . '</meta:creation-date>'
. '</office:meta>'
. '</office:document-meta>',
'meta.xml'
);
$zipfile -> addFile(
'<?xml version="1.0" encoding="UTF-8"?' . '>'
. '<office:document-styles '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
. '<office:font-face-decls>'
. '<style:font-face style:name="Arial Unicode MS" svg:font-family="\'Arial Unicode MS\'" style:font-pitch="variable"/>'
. '<style:font-face style:name="DejaVu Sans1" svg:font-family="\'DejaVu Sans\'" style:font-pitch="variable"/>'
. '<style:font-face style:name="HG Mincho Light J" svg:font-family="\'HG Mincho Light J\'" style:font-pitch="variable"/>'
. '<style:font-face style:name="DejaVu Serif" svg:font-family="\'DejaVu Serif\'" style:font-family-generic="roman" style:font-pitch="variable"/>'
. '<style:font-face style:name="Thorndale" svg:font-family="Thorndale" style:font-family-generic="roman" style:font-pitch="variable"/>'
. '<style:font-face style:name="DejaVu Sans" svg:font-family="\'DejaVu Sans\'" style:font-family-generic="swiss" style:font-pitch="variable"/>'
. '</office:font-face-decls>'
. '<office:styles>'
. '<style:default-style style:family="paragraph">'
. '<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.4925in" style:writing-mode="page"/>'
. '<style:text-properties style:use-window-font-color="true" style:font-name="DejaVu Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-name-asian="DejaVu Sans1" style:font-size-asian="12pt" style:language-asian="none" style:country-asian="none" style:font-name-complex="DejaVu Sans1" style:font-size-complex="12pt" style:language-complex="none" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>'
. '</style:default-style>'
. '<style:style style:name="Standard" style:family="paragraph" style:class="text"/>'
. '<style:style style:name="Text_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">'
. '<style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0835in"/>'
. '</style:style>'
. '<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_body" style:class="text">'
. '<style:paragraph-properties fo:margin-top="0.1665in" fo:margin-bottom="0.0835in" fo:keep-with-next="always"/>'
. '<style:text-properties style:font-name="DejaVu Sans" fo:font-size="14pt" style:font-name-asian="DejaVu Sans1" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans1" style:font-size-complex="14pt"/>'
. '</style:style>'
. '<style:style style:name="Heading_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_body" style:class="text" style:default-outline-level="1">'
. '<style:text-properties style:font-name="Thorndale" fo:font-size="24pt" fo:font-weight="bold" style:font-name-asian="HG Mincho Light J" style:font-size-asian="24pt" style:font-weight-asian="bold" style:font-name-complex="Arial Unicode MS" style:font-size-complex="24pt" style:font-weight-complex="bold"/>'
. '</style:style>'
. '<style:style style:name="Heading_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_body" style:class="text" style:default-outline-level="2">'
. '<style:text-properties style:font-name="DejaVu Serif" fo:font-size="18pt" fo:font-weight="bold" style:font-name-asian="DejaVu Sans1" style:font-size-asian="18pt" style:font-weight-asian="bold" style:font-name-complex="DejaVu Sans1" style:font-size-complex="18pt" style:font-weight-complex="bold"/>'
. '</style:style>'
. '</office:styles>'
. '<office:automatic-styles>'
. '<style:page-layout style:name="pm1">'
. '<style:page-layout-properties fo:page-width="8.2673in" fo:page-height="11.6925in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1in" fo:margin-bottom="1in" fo:margin-left="1.25in" fo:margin-right="1.25in" style:writing-mode="lr-tb" style:footnote-max-height="0in">'
. '<style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>'
. '</style:page-layout-properties>'
. '<style:header-style/>'
. '<style:footer-style/>'
. '</style:page-layout>'
. '</office:automatic-styles>'
. '<office:master-styles>'
. '<style:master-page style:name="Standard" style:page-layout-name="pm1"/>'
. '</office:master-styles>'
. '<office:font-face-decls>'
. '<style:font-face style:name="Arial Unicode MS" svg:font-family="\'Arial Unicode MS\'" style:font-pitch="variable"/>'
. '<style:font-face style:name="DejaVu Sans1" svg:font-family="\'DejaVu Sans\'" style:font-pitch="variable"/>'
. '<style:font-face style:name="HG Mincho Light J" svg:font-family="\'HG Mincho Light J\'" style:font-pitch="variable"/>'
. '<style:font-face style:name="DejaVu Serif" svg:font-family="\'DejaVu Serif\'" style:font-family-generic="roman" style:font-pitch="variable"/>'
. '<style:font-face style:name="Thorndale" svg:font-family="Thorndale" style:font-family-generic="roman" style:font-pitch="variable"/>'
. '<style:font-face style:name="DejaVu Sans" svg:font-family="\'DejaVu Sans\'" style:font-family-generic="swiss" style:font-pitch="variable"/>'
. '</office:font-face-decls>'
. '<office:styles>'
. '<style:default-style style:family="paragraph">'
. '<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.4925in" style:writing-mode="page"/>'
. '<style:text-properties style:use-window-font-color="true" style:font-name="DejaVu Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-name-asian="DejaVu Sans1" style:font-size-asian="12pt" style:language-asian="none" style:country-asian="none" style:font-name-complex="DejaVu Sans1" style:font-size-complex="12pt" style:language-complex="none" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>'
. '</style:default-style>'
. '<style:style style:name="Standard" style:family="paragraph" style:class="text"/>'
. '<style:style style:name="Text_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">'
. '<style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0835in"/>'
. '</style:style>'
. '<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_body" style:class="text">'
. '<style:paragraph-properties fo:margin-top="0.1665in" fo:margin-bottom="0.0835in" fo:keep-with-next="always"/>'
. '<style:text-properties style:font-name="DejaVu Sans" fo:font-size="14pt" style:font-name-asian="DejaVu Sans1" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans1" style:font-size-complex="14pt"/>'
. '</style:style>'
. '<style:style style:name="Heading_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_body" style:class="text" style:default-outline-level="1">'
. '<style:text-properties style:font-name="Thorndale" fo:font-size="24pt" fo:font-weight="bold" style:font-name-asian="HG Mincho Light J" style:font-size-asian="24pt" style:font-weight-asian="bold" style:font-name-complex="Arial Unicode MS" style:font-size-complex="24pt" style:font-weight-complex="bold"/>'
. '</style:style>'
. '<style:style style:name="Heading_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_body" style:class="text" style:default-outline-level="2">'
. '<style:text-properties style:font-name="DejaVu Serif" fo:font-size="18pt" fo:font-weight="bold" style:font-name-asian="DejaVu Sans1" style:font-size-asian="18pt" style:font-weight-asian="bold" style:font-name-complex="DejaVu Sans1" style:font-size-complex="18pt" style:font-weight-complex="bold"/>'
. '</style:style>'
. '</office:styles>'
. '<office:automatic-styles>'
. '<style:page-layout style:name="pm1">'
. '<style:page-layout-properties fo:page-width="8.2673in" fo:page-height="11.6925in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1in" fo:margin-bottom="1in" fo:margin-left="1.25in" fo:margin-right="1.25in" style:writing-mode="lr-tb" style:footnote-max-height="0in">'
. '<style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>'
. '</style:page-layout-properties>'
. '<style:header-style/>'
. '<style:footer-style/>'
. '</style:page-layout>'
. '</office:automatic-styles>'
. '<office:master-styles>'
. '<style:master-page style:name="Standard" style:page-layout-name="pm1"/>'
. '</office:master-styles>'
. '</office:document-styles>',
'styles.xml'
);
Expand Down
5 changes: 3 additions & 2 deletions libraries/plugins/export/ExportLatex.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ public function exportData($db, $table, $crlf, $error_url, $sql_query)
array(
'texEscape',
get_class($this),
'libraries/plugins/export/' . get_class($this) . ".class.php"
'libraries/plugins/export/'
. get_class($this) . ".class.php"
),
array('table' => $table, 'database' => $db)
)
Expand Down Expand Up @@ -647,4 +648,4 @@ public static function texEscape($string)
return $string;
}
}
?>
?>
139 changes: 72 additions & 67 deletions libraries/schema/Dia_Relation_Schema.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ function __construct()
* @return void
*
* @access public
* @see XMLWriter::startElement(),XMLWriter::writeAttribute(),XMLWriter::writeRaw()
* @see XMLWriter::startElement(),XMLWriter::writeAttribute(),
* XMLWriter::writeRaw()
*/
function startDiaDoc($paper,$topMargin,$bottomMargin,$leftMargin,$rightMargin,$portrait)
{
function startDiaDoc($paper, $topMargin, $bottomMargin, $leftMargin,
$rightMargin, $portrait
) {
if ($portrait == 'P') {
$isPortrait='true';
} else {
Expand All @@ -80,66 +82,66 @@ function startDiaDoc($paper,$topMargin,$bottomMargin,$leftMargin,$rightMargin,$p
$this->writeAttribute('xmlns:dia', 'http://www.lysator.liu.se/~alla/dia/');
$this->startElement('dia:diagramdata');
$this->writeRaw(
'<dia:attribute name="background">
<dia:color val="#ffffff"/>
</dia:attribute>
<dia:attribute name="pagebreak">
<dia:color val="#000099"/>
</dia:attribute>
<dia:attribute name="paper">
<dia:composite type="paper">
<dia:attribute name="name">
<dia:string>#' . $paper . '#</dia:string>
</dia:attribute>
<dia:attribute name="tmargin">
<dia:real val="' . $topMargin . '"/>
</dia:attribute>
<dia:attribute name="bmargin">
<dia:real val="' . $bottomMargin . '"/>
</dia:attribute>
<dia:attribute name="lmargin">
<dia:real val="' . $leftMargin . '"/>
</dia:attribute>
<dia:attribute name="rmargin">
<dia:real val="' . $rightMargin . '"/>
'<dia:attribute name="background">
<dia:color val="#ffffff"/>
</dia:attribute>
<dia:attribute name="is_portrait">
<dia:boolean val="' . $isPortrait . '"/>
<dia:attribute name="pagebreak">
<dia:color val="#000099"/>
</dia:attribute>
<dia:attribute name="scaling">
<dia:real val="1"/>
</dia:attribute>
<dia:attribute name="fitto">
<dia:boolean val="false"/>
</dia:attribute>
</dia:composite>
</dia:attribute>
<dia:attribute name="grid">
<dia:composite type="grid">
<dia:attribute name="width_x">
<dia:real val="1"/>
</dia:attribute>
<dia:attribute name="width_y">
<dia:real val="1"/>
<dia:attribute name="paper">
<dia:composite type="paper">
<dia:attribute name="name">
<dia:string>#' . $paper . '#</dia:string>
</dia:attribute>
<dia:attribute name="tmargin">
<dia:real val="' . $topMargin . '"/>
</dia:attribute>
<dia:attribute name="bmargin">
<dia:real val="' . $bottomMargin . '"/>
</dia:attribute>
<dia:attribute name="lmargin">
<dia:real val="' . $leftMargin . '"/>
</dia:attribute>
<dia:attribute name="rmargin">
<dia:real val="' . $rightMargin . '"/>
</dia:attribute>
<dia:attribute name="is_portrait">
<dia:boolean val="' . $isPortrait . '"/>
</dia:attribute>
<dia:attribute name="scaling">
<dia:real val="1"/>
</dia:attribute>
<dia:attribute name="fitto">
<dia:boolean val="false"/>
</dia:attribute>
</dia:composite>
</dia:attribute>
<dia:attribute name="visible_x">
<dia:int val="1"/>
<dia:attribute name="grid">
<dia:composite type="grid">
<dia:attribute name="width_x">
<dia:real val="1"/>
</dia:attribute>
<dia:attribute name="width_y">
<dia:real val="1"/>
</dia:attribute>
<dia:attribute name="visible_x">
<dia:int val="1"/>
</dia:attribute>
<dia:attribute name="visible_y">
<dia:int val="1"/>
</dia:attribute>
<dia:composite type="color"/>
</dia:composite>
</dia:attribute>
<dia:attribute name="visible_y">
<dia:int val="1"/>
<dia:attribute name="color">
<dia:color val="#d8e5e5"/>
</dia:attribute>
<dia:composite type="color"/>
</dia:composite>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#d8e5e5"/>
</dia:attribute>
<dia:attribute name="guides">
<dia:composite type="guides">
<dia:attribute name="hguides"/>
<dia:attribute name="vguides"/>
</dia:composite>
</dia:attribute>'
<dia:attribute name="guides">
<dia:composite type="guides">
<dia:attribute name="hguides"/>
<dia:attribute name="vguides"/>
</dia:composite>
</dia:attribute>'
);
$this->endElement();
$this->startElement('dia:layer');
Expand Down Expand Up @@ -256,11 +258,12 @@ function __construct($tableName, $pageNumber, $showKeys = false)
}

$sql = 'SELECT x, y FROM '
. $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.'
. $common_functions->backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . $common_functions->sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . $common_functions->sqlAddSlashes($tableName) . '\''
. ' AND pdf_page_number = ' . $pageNumber;
. $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.'
. $common_functions->backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . $common_functions->sqlAddSlashes($db) . '\''
. ' AND table_name = \''
. $common_functions->sqlAddSlashes($tableName) . '\''
. ' AND pdf_page_number = ' . $pageNumber;
$result = PMA_queryAsControlUser($sql, false, PMA_DBI_QUERY_STORE);
if (! $result || ! PMA_DBI_num_rows($result)) {
$dia->dieSchema(
Expand Down Expand Up @@ -496,8 +499,9 @@ class Relation_Stats
*
* @see Relation_Stats::_getXy
*/
function __construct($master_table, $master_field, $foreign_table, $foreign_field)
{
function __construct($master_table, $master_field, $foreign_table,
$foreign_field
) {
$src_pos = $this->_getXy($master_table, $master_field);
$dest_pos = $this->_getXy($foreign_table, $foreign_field);
$this->srcConnPointsLeft = $src_pos[0];
Expand Down Expand Up @@ -769,8 +773,9 @@ function __construct()
* @access private
* @see Table_Stats::__construct(),Relation_Stats::__construct()
*/
private function _addRelation($masterTable, $masterField, $foreignTable, $foreignField, $showKeys)
{
private function _addRelation($masterTable, $masterField, $foreignTable,
$foreignField, $showKeys
) {
if (! isset($this->tables[$masterTable])) {
$this->tables[$masterTable] = new Table_Stats(
$masterTable, $this->pageNumber, $showKeys
Expand Down
Loading

0 comments on commit 163dba1

Please sign in to comment.