mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
crypto-urls for all pastes
This commit is contained in:
parent
1e0a90e486
commit
460226d009
@ -66,15 +66,7 @@ class Pastes extends CI_Model
|
|||||||
$data['private'] = $this->input->post('private');
|
$data['private'] = $this->input->post('private');
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
$data['pid'] = substr(md5(md5(mt_rand(0, 1000000) . mktime())) , rand(0, 24) , 8);
|
||||||
if ($this->input->post('private'))
|
|
||||||
{
|
|
||||||
$data['pid'] = substr(md5(md5(rand())) , 0, 8);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$data['pid'] = mt_rand(10000, 99999999);
|
|
||||||
}
|
|
||||||
$this->db->select('id');
|
$this->db->select('id');
|
||||||
$this->db->where('pid', $data['pid']);
|
$this->db->where('pid', $data['pid']);
|
||||||
$query = $this->db->get('pastes');
|
$query = $this->db->get('pastes');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user