mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Close Connection when there is no connection value.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13161 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
034a5c0288
commit
f70ce644ce
1410 changed files with 7188 additions and 53541 deletions
|
|
@ -19,7 +19,7 @@
|
|||
<action name="procWidgetInsertDocument" type="controller" standalone="true" />
|
||||
<action name="procWidgetCopyDocument" type="controller" standalone="true" />
|
||||
<action name="procWidgetDeleteDocument" type="controller" standalone="true" />
|
||||
<action name="procWidgetGenerateCodeInPage" type="controller" standalone="true" />
|
||||
<action name="procWidgetGenerateCodeInPage" type="controller" standalone="true" ruleset="generateCodeInPage" />
|
||||
<action name="procWidgetGetColorsetList" type="controller" standalone="true" />
|
||||
|
||||
<action name="procWidgetStyleExtraImageUpload" type="controller" standalone="true" />
|
||||
|
|
|
|||
11
modules/widget/ruleset/generateCodeInPage.xml
Normal file
11
modules/widget/ruleset/generateCodeInPage.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
<rule name="class_name" type="regex" test="/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/" />
|
||||
<rule name="skin_name" type="regex" test="/^[a-zA-Z0-9_\-\.]+$/" />
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="selected_widget" required="true" rule="class_name" />
|
||||
<field name="skin" rule="skin_name" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="x_page-header">
|
||||
<h1>
|
||||
{$lang->installed_widgets} <a class="x_icon-question-sign" href="./help/index.html#UMAN_advanced_installed_widget" target="_blank">{$lang->help}</a>
|
||||
{$lang->installed_widgets} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_advanced_installed_widget" target="_blank">{$lang->help}</a>
|
||||
<span class="path" cond="$widget_info">
|
||||
> {$widget_info->title} <a cond="$widget_info" href="#widgetInfo" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
|
||||
</span>
|
||||
|
|
@ -9,6 +9,6 @@
|
|||
</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/autoinstall/tpl/uninstall/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
|
|
|||
48
modules/widget/tpl/js/widget.min.js
vendored
48
modules/widget/tpl/js/widget.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -22,7 +22,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="widget_cache">{$lang->widget_cache}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" name="widget_cache" id="widget_cache" value="0" size="2" style="width:50px" /> {$lang->unit_min}
|
||||
<input type="number" name="widget_cache" id="widget_cache" value="0" size="2" /> {$lang->unit_min}
|
||||
<p class="x_help-inline">{$lang->about_widget_cache}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -126,6 +126,7 @@
|
|||
<option value="">-</option>
|
||||
<option loop="$menu_list => $key, $val" value="{$val->menu_srl}">{$val->title}</option>
|
||||
</select>
|
||||
<p cond="$var->description">{$var->description}</p>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
</block>
|
||||
{@$not_first = true}
|
||||
<div class="x_control-group">
|
||||
<label for="{$id}" class="x_control-label">{$var->name}</label>
|
||||
<label class="x_control-label" for="{$id}"|cond="$var->type!='text'&&$var->type!='textarea'" for="lang_{$id}"|cond="$var->type=='text'||$var->type=='textarea'">{$var->name}</label>
|
||||
<div class="x_controls extra_vars">
|
||||
<div cond="$var->type == 'text'">
|
||||
<input type="text" name="{$id}" value="" class="lang_code" />
|
||||
|
|
|
|||
|
|
@ -28,7 +28,14 @@ class widgetAdminView extends widget
|
|||
|
||||
foreach($widget_list as $no => $widget)
|
||||
{
|
||||
$widget_list[$no]->description = nl2br(trim($widget->description));
|
||||
if($widget->widget)
|
||||
{
|
||||
$widget_list[$no]->description = nl2br(trim($widget->description));
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($widget_list[$no]);
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('widget_list', $widget_list);
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ class widgetController extends widget
|
|||
else $vars = $xml_doc->attrs;
|
||||
|
||||
$widget = $vars->widget;
|
||||
if(!$widget) return $match[0];
|
||||
if(!$widget) return $matches[0];
|
||||
unset($vars->widget);
|
||||
|
||||
return $this->execute($widget, $vars, $this->javascript_mode);
|
||||
|
|
@ -623,6 +623,11 @@ class widgetController extends widget
|
|||
*/
|
||||
function getWidgetObject($widget)
|
||||
{
|
||||
if(!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $widget))
|
||||
{
|
||||
return Context::getLang('msg_invalid_request');
|
||||
}
|
||||
|
||||
if(!$GLOBALS['_xe_loaded_widgets_'][$widget])
|
||||
{
|
||||
// Finding the location of a widget
|
||||
|
|
@ -635,8 +640,12 @@ class widgetController extends widget
|
|||
require_once($class_file);
|
||||
|
||||
// Creating Objects
|
||||
$tmp_fn = create_function('', "return new {$widget}();");
|
||||
$oWidget = $tmp_fn();
|
||||
if(!class_exists($widget))
|
||||
{
|
||||
return sprintf(Context::getLang('msg_widget_object_is_null'), $widget);
|
||||
}
|
||||
|
||||
$oWidget = new $widget();
|
||||
if(!is_object($oWidget)) return sprintf(Context::getLang('msg_widget_object_is_null'), $widget);
|
||||
|
||||
if(!method_exists($oWidget, 'proc')) return sprintf(Context::getLang('msg_widget_proc_is_null'), $widget);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue