mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
apply codeformatter
This commit is contained in:
parent
ce412d56a4
commit
6b1b787023
@ -468,11 +468,18 @@ class Pastes extends CI_Model
|
||||
$total_rows = $query->num_rows();
|
||||
|
||||
// query
|
||||
if($this->db->dbdriver == "postgre") {
|
||||
|
||||
if ($this->db->dbdriver == "postgre")
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw FROM pastes WHERE private = 0 AND (title LIKE ? OR raw LIKE ?) ORDER BY created DESC LIMIT $amount OFFSET $page";
|
||||
} else if ($root == 'api/recent'){
|
||||
}
|
||||
else
|
||||
if ($root == 'api/recent')
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw FROM pastes WHERE private = 0 AND (title LIKE ? OR raw LIKE ?) ORDER BY created DESC LIMIT 0,15";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw FROM pastes WHERE private = 0 AND (title LIKE ? OR raw LIKE ?) ORDER BY created DESC LIMIT $page,$amount";
|
||||
}
|
||||
$query = $this->db->query($sql, array(
|
||||
@ -489,9 +496,13 @@ class Pastes extends CI_Model
|
||||
$total_rows = $query->num_rows();
|
||||
|
||||
// query
|
||||
if($this->db->dbdriver == "postgre") {
|
||||
|
||||
if ($this->db->dbdriver == "postgre")
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw FROM pastes WHERE private = 0 ORDER BY created DESC LIMIT $amount OFFSET $page";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw FROM pastes WHERE private = 0 ORDER BY created DESC LIMIT $page,$amount";
|
||||
}
|
||||
$query = $this->db->query($sql);
|
||||
@ -551,11 +562,18 @@ class Pastes extends CI_Model
|
||||
$total_rows = $query->num_rows();
|
||||
|
||||
// query
|
||||
if($this->db->dbdriver == "postgre") {
|
||||
|
||||
if ($this->db->dbdriver == "postgre")
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw, hits FROM pastes WHERE private = 0 AND (title LIKE ? OR raw LIKE ?) ORDER BY hits DESC, created DESC LIMIT $amount OFFSET $page";
|
||||
} else if ($root == "api/trending"){
|
||||
}
|
||||
else
|
||||
if ($root == "api/trending")
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw, hits FROM pastes WHERE private = 0 AND (title LIKE ? OR raw LIKE ?) ORDER BY hits DESC, created DESC LIMIT 0,15";
|
||||
}else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw, hits FROM pastes WHERE private = 0 AND (title LIKE ? OR raw LIKE ?) ORDER BY hits DESC, created DESC LIMIT $page,$amount";
|
||||
}
|
||||
$query = $this->db->query($sql, array(
|
||||
@ -572,9 +590,13 @@ class Pastes extends CI_Model
|
||||
$total_rows = $query->num_rows();
|
||||
|
||||
// query
|
||||
if($this->db->dbdriver == "postgre") {
|
||||
|
||||
if ($this->db->dbdriver == "postgre")
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw, hits FROM pastes WHERE private = 0 ORDER BY hits DESC, created DESC LIMIT $amount OFFSET $page";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT id, title, name, created, pid, lang, raw, hits FROM pastes WHERE private = 0 ORDER BY hits DESC, created DESC LIMIT $page,$amount";
|
||||
}
|
||||
$query = $this->db->query($sql);
|
||||
|
Loading…
x
Reference in New Issue
Block a user