mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
rss feed config update modify
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12554 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
371bf616ad
commit
58af552862
3 changed files with 22 additions and 26 deletions
|
|
@ -8,7 +8,7 @@
|
|||
<action name="atom" type="view" standalone="true" />
|
||||
<action name="procRssAdminInsertConfig" type="controller" standalone="true" ruleset="insertRssConfig" />
|
||||
<action name="procRssAdminDeleteFeedImage" type="controller" standalone="true" />
|
||||
<action name="procRssAdminInsertModuleConfig" type="controller" standalone="true" ruleset="insertRssModuleConfig" />
|
||||
<action name="procRssAdminInsertModuleConfig" type="controller" standalone="true" />
|
||||
</actions>
|
||||
<menus>
|
||||
<menu name="rss">
|
||||
|
|
|
|||
|
|
@ -113,29 +113,26 @@ class rssAdminController extends rss
|
|||
*/
|
||||
function procRssAdminInsertModuleConfig()
|
||||
{
|
||||
// Get the object
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
// In case of batch configuration of several modules
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
if(!is_array($module_srl)) $module_srl[0] = $module_srl;
|
||||
|
||||
$config_vars = Context::getRequestVars();
|
||||
|
||||
$open_rss = $config_vars->open_rss;
|
||||
$open_total_feed = $config_vars->open_total_feed;
|
||||
$feed_description = trim($config_vars->feed_description);
|
||||
$feed_copyright = trim($config_vars->feed_copyright);
|
||||
$openRssList = $config_vars->open_rss;
|
||||
$openTotalFeedList = $config_vars->open_total_feed;
|
||||
$feedDescriptionList = $config_vars->feed_description;
|
||||
$feedCopyrightList = $config_vars->feed_copyright;
|
||||
|
||||
if(!$module_srl || !$open_rss) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
if(!in_array($open_rss, array('Y','H','N'))) $open_rss = 'N';
|
||||
// Save configurations
|
||||
for($i=0;$i<count($module_srl);$i++)
|
||||
if(is_array($openRssList))
|
||||
{
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$output = $this->setRssModuleConfig($srl, $open_rss, $open_total_feed, $feed_description, $feed_copyright);
|
||||
foreach($openRssList AS $module_srl=>$open_rss)
|
||||
{
|
||||
if(!$module_srl || !$open_rss)
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
if(!in_array($open_rss, array('Y','H','N'))) $open_rss = 'N';
|
||||
|
||||
$this->setRssModuleConfig($module_srl, $open_rss, $openTotalFeedList[$module_srl], $feedDescriptionList[$module_srl], $feedCopyrightList[$module_srl]);
|
||||
}
|
||||
}
|
||||
|
||||
//$this->setError(0);
|
||||
|
|
|
|||
|
|
@ -66,10 +66,9 @@
|
|||
</section>
|
||||
<section class="section">
|
||||
<h1 style="margin-bottom:0">{$lang->feed} {$lang->cmd_management}</h1>
|
||||
<form ruleset="insertRssModuleConfig" action="./" method="post">
|
||||
<form action="./" method="post">
|
||||
<input type="hidden" name="act" value="procRssAdminInsertModuleConfig" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', $module, 'act', 'dispRssAdminIndex')}" />
|
||||
<input type="hidden" name="target_module_srl" value="{$key}" />
|
||||
<table class="x_table x_table-striped x_table-hover" style="border-top:0;margin-top:0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -87,13 +86,13 @@
|
|||
<th cond="$value['url']">
|
||||
<a href="{$value['url']}" target="_blank">{$value['mid']}</a>
|
||||
</th>
|
||||
<td class="title">{$value['feed_description']}<textarea name="feed_description" hidden>{$value['feed_description']}</textarea></td>
|
||||
<td class="title">{$value['feed_description']}<textarea name="feed_description[{$key}]" hidden>{$value['feed_description']}</textarea></td>
|
||||
<td>
|
||||
<label class="x_inline" loop="$lang->open_rss_types => $key2,$value2"><input type="radio" name="open_rss" value="{$key2}" id="feed_open_{$key2}" checked="checked"|cond="$key2 == $value['open_feed']" /> {$value2}</label>
|
||||
<label class="x_inline" loop="$lang->open_rss_types => $key2,$value2"><input type="radio" name="open_rss[{$key}]" value="{$key2}" checked="checked"|cond="$key2 == $value['open_feed']" /> {$value2}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label class="x_inline"><input type="radio" name="open_total_feed" value="N" id="open_total_feed_N" checked="checked"|cond="$value['open_total_feed'] != 'T_N'" /> {$lang->use}</label>
|
||||
<label class="x_inline"><input type="radio" name="open_total_feed" value="T_N" id="open_total_feed_T_N" checked="checked"|cond="$value['open_total_feed'] == 'T_N'" /> {$lang->notuse}</label>
|
||||
<label class="x_inline"><input type="radio" name="open_total_feed[{$key}]" value="N" checked="checked"|cond="$value['open_total_feed'] != 'T_N'" /> {$lang->use}</label>
|
||||
<label class="x_inline"><input type="radio" name="open_total_feed[{$key}]" value="T_N" checked="checked"|cond="$value['open_total_feed'] == 'T_N'" /> {$lang->notuse}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr cond="!$feed_config">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue