fix SQLite3 DQS

This commit is contained in:
olevole
2024-10-24 17:10:57 +03:00
parent 6c93ef50bd
commit 9831b31169
6 changed files with 23 additions and 14 deletions

View File

@@ -1,5 +1,11 @@
{ {
"require": { "require": {
"sentry/sdk": "^3.1" "sentry/sdk": "^3.1",
"sentry/sentry": "^3.22"
},
"config": {
"allow-plugins": {
"php-http/discovery": true
}
} }
} }

View File

@@ -1,5 +1,4 @@
<?php <?php
require_once("cbsd.php"); require_once("cbsd.php");
require_once('config.php'); require_once('config.php');
require_once('localization.php'); require_once('localization.php');
@@ -2317,11 +2316,15 @@ class ClonOS {
// $form=$this->form; // $form=$this->form;
$db=new Db('base','storage_media'); $db=new Db('base','storage_media');
$res=$db->select('select * from media where type="iso"', array()); $res=$db->select('select * from media where type="iso"', array());
//var_dump($res);exit;
if($res===false || empty($res)) return; if($res===false || empty($res)) return;
$html=''; $html='';
foreach($res as $r){ if(is_array($res)){
$html.='<option value="'.$r['idx'].'">'.$r['name'].'.'.$r['type'].'</option>'; foreach($res as $r){
$html.='<option value="'.$r['idx'].'">'.$r['name'].'.'.$r['type'].'</option>';
}
} }
return $html; return $html;
} }

View File

@@ -129,6 +129,7 @@ class Db {
# TODO once tested $values can have a default value of an empty array # TODO once tested $values can have a default value of an empty array
function select($sql, $values, $single = false){ function select($sql, $values, $single = false){
$sql=str_replace('"',"'",$sql);
if ($this->error){ if ($this->error){
return array('error' => $this->error, 'info' => $this->error_message); return array('error' => $this->error, 'info' => $this->error_message);
} }
@@ -151,7 +152,7 @@ class Db {
} }
return $res; return $res;
} catch(PDOException $e) { } catch(PDOException $e) {
return array('error' => $this->error, 'info' => $this->error_message); return array('error' => true, 'info' => 'Catch exception: ' . $e->getMessage()); //$this->error
} }
} }

View File

@@ -3493,6 +3493,7 @@ graphs={
if(typeof msg.__all!='undefined') if(typeof msg.__all!='undefined')
{ {
//if(msg.__all.length==0){alert('no data');}
for(a in msg.__all) for(a in msg.__all)
{ {
var items=msg.__all[a]; var items=msg.__all[a];

6
public/js/jquery.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -78,12 +78,12 @@ $lang=array(
'Virtual network stack (VIMAGE)'=>'виртуальный сетевой стек (VIMAGE)', 'Virtual network stack (VIMAGE)'=>'виртуальный сетевой стек (VIMAGE)',
'Mount'=>'примонтировать', 'Mount'=>'примонтировать',
'Enabled services'=>'автозапуск сервисов', 'Enabled services'=>'автозапуск сервисов',
'Create'=>'создать', 'Create'=>'Создать',
'Cancel'=>'отменить', 'Cancel'=>'Отменить',
'Save'=>'сохранить', 'Save'=>'Сохранить',
'Download'=>'скачать', 'Download'=>'Скачать',
'Delete'=>'удалить', 'Delete'=>'Удалить',
'Protected jail'=>'запрет на удаление', 'Protected jail'=>'запрет на удаление',
'Protected bhyve'=>'запрет на удаление', 'Protected bhyve'=>'запрет на удаление',
'Open VNC'=>'консоль управления', 'Open VNC'=>'консоль управления',