mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-26 04:51:08 -05:00
speedup for recents
This commit is contained in:
parent
cb1c5ff014
commit
0910dca1e4
@ -346,6 +346,7 @@ class Pastes extends CI_Model
|
|||||||
{
|
{
|
||||||
$page = $this->uri->segment(2);
|
$page = $this->uri->segment(2);
|
||||||
}
|
}
|
||||||
|
$this->db->select('title, name, created, pid, lang, raw');
|
||||||
$this->db->where('private', 0);
|
$this->db->where('private', 0);
|
||||||
$this->db->order_by('created', 'desc');
|
$this->db->order_by('created', 'desc');
|
||||||
$query = $this->db->get('pastes', $amount, $page);
|
$query = $this->db->get('pastes', $amount, $page);
|
||||||
@ -360,7 +361,11 @@ class Pastes extends CI_Model
|
|||||||
$data['pastes'][$n]['created'] = $row['created'];
|
$data['pastes'][$n]['created'] = $row['created'];
|
||||||
$data['pastes'][$n]['lang'] = $row['lang'];
|
$data['pastes'][$n]['lang'] = $row['lang'];
|
||||||
$data['pastes'][$n]['pid'] = $row['pid'];
|
$data['pastes'][$n]['pid'] = $row['pid'];
|
||||||
|
|
||||||
|
if ($this->uri->segment(2) == 'rss')
|
||||||
|
{
|
||||||
$data['pastes'][$n]['paste'] = $this->process->syntax(htmlspecialchars_decode($row['raw']) , $row['lang']);
|
$data['pastes'][$n]['paste'] = $this->process->syntax(htmlspecialchars_decode($row['raw']) , $row['lang']);
|
||||||
|
}
|
||||||
$data['pastes'][$n]['raw'] = $row['raw'];
|
$data['pastes'][$n]['raw'] = $row['raw'];
|
||||||
$n++;
|
$n++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user