mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 08:12:17 +09:00
NOISSUE, trivial code change
This commit is contained in:
parent
ffcf599e68
commit
4c1ba64d25
4 changed files with 59 additions and 53 deletions
|
|
@ -15,8 +15,11 @@ class JSCallbackDisplayHandler
|
|||
$variables['error'] = $oModule->getError();
|
||||
$variables['message'] = $oModule->getMessage();
|
||||
$json = str_replace(array("\r\n", "\n", "\t"), array('\n', '\n', '\t'), json_encode2($variables));
|
||||
$output = sprintf('<script>%s(%s);</script>', Context::getJSCallbackFunc(), $json);
|
||||
return $output;
|
||||
return sprintf('<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
%s(%s);
|
||||
//]]>
|
||||
</script>', Context::getJSCallbackFunc(), $json);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,19 +44,23 @@ class VirtualXMLDisplayHandler
|
|||
}
|
||||
}
|
||||
|
||||
$html = '<script>' . "\n";
|
||||
$html = array();
|
||||
$html[] = '<script type="text/javascript">';
|
||||
$html[] = '//<![CDATA[';
|
||||
|
||||
if($output->message)
|
||||
{
|
||||
$html .= 'alert("' . $output->message . '");' . "\n";
|
||||
$html[] = 'alert("' . $output->message . '");';
|
||||
}
|
||||
if($output->url)
|
||||
{
|
||||
$url = preg_replace('/#(.+)$/i', '', $output->url);
|
||||
$html .= 'self.location.href = "' . $request_url . 'common/tpl/redirect.html?redirect_url=' . urlencode($url) . '";' . "\n";
|
||||
$html[] = 'self.location.href = "' . $request_url . 'common/tpl/redirect.html?redirect_url=' . urlencode($url) . '";';
|
||||
}
|
||||
$html .= '</script>' . "\n";
|
||||
return $html;
|
||||
$html[] = '//]]>';
|
||||
$html[] = '</script>';
|
||||
|
||||
return join(PHP_EOL, $html);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue