-
Notifications
You must be signed in to change notification settings - Fork 1
/
newposts.admin.model.php
40 lines (39 loc) · 1.08 KB
/
newposts.admin.model.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* vi:set sw=4 ts=4 noexpandtab fileencoding=utf8:
* @class newpostsAdminModel
* @author NURIGO ([email protected])
* @brief newpostsAdminModel
*/
class newpostsAdminModel extends newposts
{
/**
* @brief get templates for deleting config
*
**/
function getNewpostsAdminDelete()
{
// get configs.
$args->config_srl = Context::get('config_srl');
$output = executeQuery("newposts.getConfig", $args);
if(!$output->toBool()) return $output;
$config = $output->data;
$output = executeQueryArray("newposts.getModuleInfoByConfigSrl", $args);
if(!$output->toBool()) return $output;
$mid_list = array();
if ($output->data)
{
foreach ($output->data as $no => $val)
{
$mid_list[] = $val->mid;
}
}
$config->mid_list = join(',', $mid_list);
Context::set('config', $config);
$oTemplate = &TemplateHandler::getInstance();
$tpl = $oTemplate->compile($this->module_path.'tpl', 'delete');
$this->add('tpl', str_replace("\n"," ",$tpl));
}
}
/* End of file newposts.admin.model.php */
/* Location: ./modules/newposts/newposts.admin.model.php */