diff options
Diffstat (limited to 'application/service')
-rw-r--r-- | application/service/multipaste_queue.php | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/application/service/multipaste_queue.php b/application/service/multipaste_queue.php index 28ff683b7..453ea3429 100644 --- a/application/service/multipaste_queue.php +++ b/application/service/multipaste_queue.php @@ -11,13 +11,26 @@ namespace service; class multipaste_queue { - public function __construct() { + public function __construct($session = null, $mfile = null, $mmultipaste = null) { $CI =& get_instance(); - $CI->load->model("mfile"); - $CI->load->model("mmultipaste"); - $this->session = $CI->session; - $this->mfile = $CI->mfile; - $this->mmultipaste = $CI->mmultipaste; + + $this->session = $session; + $this->mfile = $mfile; + $this->mmultipaste = $mmultipaste; + + if ($this->session === null) { + $this->session = $CI->session; + } + + if ($this->mfile === null) { + $CI->load->model("mfile"); + $this->mfile = $CI->mfile; + } + + if ($this->mmultipaste === null) { + $CI->load->model("mmultipaste"); + $this->mmultipaste = $CI->mmultipaste; + } } /** |