mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-26 04:51:08 -05:00
geshified row in db uses WAY too much space! we process it online. db-cleanup: "ALTER TABLE pastes DROP paste;"
This commit is contained in:
parent
3f8db5b299
commit
dd3018e2dc
@ -39,7 +39,6 @@ class Pastes extends CI_Model
|
|||||||
|
|
||||||
function createPaste()
|
function createPaste()
|
||||||
{
|
{
|
||||||
$this->load->library('process');
|
|
||||||
$data['id'] = NULL;
|
$data['id'] = NULL;
|
||||||
$data['created'] = time();
|
$data['created'] = time();
|
||||||
|
|
||||||
@ -150,7 +149,6 @@ class Pastes extends CI_Model
|
|||||||
$data['snipurl'] = false;
|
$data['snipurl'] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data['paste'] = $this->process->syntax($this->input->post('code') , $this->input->post('lang'));
|
|
||||||
$this->db->insert('pastes', $data);
|
$this->db->insert('pastes', $data);
|
||||||
return 'view/' . $data['pid'];
|
return 'view/' . $data['pid'];
|
||||||
}
|
}
|
||||||
@ -190,6 +188,7 @@ class Pastes extends CI_Model
|
|||||||
$pid = $this->uri->segment($seg);
|
$pid = $this->uri->segment($seg);
|
||||||
$data['script'] = 'jquery.js';
|
$data['script'] = 'jquery.js';
|
||||||
}
|
}
|
||||||
|
$this->load->library('process');
|
||||||
$this->db->where('pid', $pid);
|
$this->db->where('pid', $pid);
|
||||||
$query = $this->db->get('pastes');
|
$query = $this->db->get('pastes');
|
||||||
foreach ($query->result_array() as $row)
|
foreach ($query->result_array() as $row)
|
||||||
@ -199,7 +198,7 @@ class Pastes extends CI_Model
|
|||||||
$data['name'] = $row['name'];
|
$data['name'] = $row['name'];
|
||||||
$data['lang_code'] = $row['lang'];
|
$data['lang_code'] = $row['lang'];
|
||||||
$data['lang'] = $this->languages->code_to_description($row['lang']);
|
$data['lang'] = $this->languages->code_to_description($row['lang']);
|
||||||
$data['paste'] = $row['paste'];
|
$data['paste'] = $this->process->syntax(htmlspecialchars_decode($row['raw']) , $row['lang']);
|
||||||
$data['created'] = $row['created'];
|
$data['created'] = $row['created'];
|
||||||
$data['url'] = site_url('view/' . $row['pid']);
|
$data['url'] = site_url('view/' . $row['pid']);
|
||||||
$data['raw'] = $row['raw'];
|
$data['raw'] = $row['raw'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user