Bearsampp 2025.8.29
Loading...
Searching...
No Matches
class.action.debugPostgresql.php
Go to the documentation of this file.
1<?php
2/*
3 * Copyright (c) 2021-2024 Bearsampp
4 * License: GNU General Public License version 3 or later; see LICENSE.txt
5 * Author: Bear
6 * Website: https://bearsampp.com
7 * Github: https://github.com/Bearsampp
8 */
9
17{
31 public function __construct($args)
32 {
33 global $bearsamppLang, $bearsamppBins, $bearsamppTools, $bearsamppWinbinder;
34
35 if (isset($args[0]) && !empty($args[0])) {
36 $editor = false;
37 $msgBoxError = false;
38 $caption = $bearsamppLang->getValue(Lang::DEBUG) . ' ' . $bearsamppLang->getValue(Lang::POSTGRESQL) . ' - ';
39 if ($args[0] == BinPostgresql::CMD_VERSION) {
41 }
42 $caption .= ' (' . $args[0] . ')';
43
44 $debugOutput = $bearsamppBins->getPostgresql()->getCmdLineOutput($args[0]);
45
46 if ($editor) {
47 Util::openFileContent($caption, $debugOutput);
48 } else {
49 if ($msgBoxError) {
50 $bearsamppWinbinder->messageBoxError(
51 $debugOutput,
52 $caption
53 );
54 } else {
55 $bearsamppWinbinder->messageBoxInfo(
56 $debugOutput,
57 $caption
58 );
59 }
60 }
61 }
62 }
63}
global $bearsamppBins
global $bearsamppLang
const DEBUG_POSTGRESQL_VERSION
const POSTGRESQL
const DEBUG
static openFileContent($caption, $content)