Skip to content

Commit

Permalink
More style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
annda committed Jan 25, 2024
1 parent a7a40fb commit 14fe8e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static function register($pdo)
* @param string $string column value
* @param string $separator separator added between values
*/
// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
public static function GroupConcatStep(&$context, $rownumber, $string, $separator = ',')
{
if (is_null($context)) {
Expand All @@ -64,6 +65,7 @@ public static function GroupConcatStep(&$context, $rownumber, $string, $separato
* @param int $rownumber number of rows over which the aggregate was performed.
* @return null|string
*/
// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
public static function GroupConcatFinalize(&$context, $rownumber)
{
if (!is_array($context)) {
Expand Down
12 changes: 10 additions & 2 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ public function handle()
case 'download':
$file = $this->db->getDbFile();
header('Content-Type: application/vnd.sqlite3');
header('Content-Disposition: attachment; filename="' . $this->db->getDbName() . SQLiteDB::FILE_EXTENSION . '"');
header(
'Content-Disposition: attachment; filename="'
. $this->db->getDbName() . SQLiteDB::FILE_EXTENSION . '"'
);
readfile($file);
exit(0);
}
Expand Down Expand Up @@ -149,7 +152,12 @@ public function getTOC()
$dbfiles = glob($conf['metadir'] . '/*.sqlite3');
if (is_array($dbfiles)) foreach ($dbfiles as $file) {
$db = basename($file, '.sqlite3');
$toc[] = ['link' => wl($ID, ['do' => 'admin', 'page' => 'sqlite', 'db' => $db, 'sectok' => getSecurityToken()]), 'title' => $db, 'level' => 2, 'type' => 'ul'];
$toc[] = [
'link' => wl($ID, ['do' => 'admin', 'page' => 'sqlite', 'db' => $db, 'sectok' => getSecurityToken()]),
'title' => $db,
'level' => 2,
'type' => 'ul',
];
}

return $toc;
Expand Down
3 changes: 3 additions & 0 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use dokuwiki\plugin\sqlite\SQLiteDB;
use dokuwiki\plugin\sqlite\Tools;

// phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols, PSR1.Classes.ClassDeclaration.MultipleClasses
// phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps

/**
* For compatibility with previous adapter implementation.
*/
Expand Down

0 comments on commit 14fe8e2

Please sign in to comment.