[welcome] SQL statements being totally wrong

这个提交包含在:
Peter Goodhall 2022-10-11 17:10:44 +01:00
父节点 75952cec2a
当前提交 eecd2bf71d
共有 6 个文件被更改,包括 7 次插入8 次删除

查看文件

@ -11,7 +11,6 @@ class Welcome extends CI_Controller {
public function index()
{
if($this->optionslib->get_option('version2_trigger') == "false") {
$data['page_title'] = "Welcome to Cloudlog Version 2.0";
@ -31,7 +30,7 @@ class Welcome extends CI_Controller {
$this->load->model('note');
$data['NumberOfNotes'] = $this->note->CountAllNotes();
if($data['CountAllStationLocations'] == 0 || $data['NumberOfStationLogbooks'] == 0 || $data['NumberOfAPIKeys'] > 0 || $data['NumberOfNotes'] > 0) {
if($data['CountAllStationLocations'] > 0 || $data['NumberOfStationLogbooks'] > 0 || $data['NumberOfAPIKeys'] > 0 || $data['NumberOfNotes'] > 0) {
// load views
$this->load->view('interface_assets/mini_header', $data);
$this->load->view('welcome/index');

查看文件

@ -15,7 +15,7 @@ class API_Model extends CI_Model {
}
function CountKeysWithNoUserID() {
$this->db->where('user_id !=', NULL);
$this->db->where('user_id =', NULL);
$query = $this->db->get('api');
return $query->num_rows();
}

查看文件

@ -9,7 +9,7 @@ class Logbooks_model extends CI_Model {
function CountAllStationLogbooks() {
// count all logbooks
$this->db->where('user_id !=', NULL);
$this->db->where('user_id =', NULL);
$query = $this->db->get('station_logbooks');
return $query->num_rows();
}

查看文件

@ -57,7 +57,7 @@ class Note extends CI_Model {
function CountAllNotes() {
// count all notes
$this->db->where('user_id', NULL);
$this->db->where('user_id =', NULL);
$query = $this->db->get('notes');
return $query->num_rows();
}

查看文件

@ -157,7 +157,7 @@ class Stations extends CI_Model {
}
function CountAllStationLocations() {
$this->db->where('user_id !=', NULL);
$this->db->where('user_id =', NULL);
$query = $this->db->get('station_profile');
return $query->num_rows();
}

查看文件

@ -92,7 +92,7 @@
<br>
<?php if(!$CountAllStationLocations) { ?>
<?php if($CountAllStationLocations > 0) { ?>
<div class="card">
<div class="card-header">Assign ALL Station Locations to this username</div>
<div class="card-body">
@ -104,7 +104,7 @@
<br>
<?php } ?>
<?php if(!$NumberOfStationLogbooks) { ?>
<?php if($NumberOfStationLogbooks > 0) { ?>
<div class="card">
<div class="card-header">Create Station Logbooks</div>
<div class="card-body">