testing something, do not explode

This commit is contained in:
flash 2015-07-25 19:50:02 +02:00
parent 638344c04c
commit 0abc8ee500
2 changed files with 4 additions and 4 deletions

View file

@ -19,16 +19,16 @@
</div> </div>
{% if newsPosts|length > 1 %} {% if newsPosts|length > 1 %}
<script type="text/javascript"> <script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'flashii';
/* * * DO NOT EDIT BELOW THIS LINE * * */ var disqus_shortname = '{{ sakura.disqus_shortname }}';
(function () { (function () {
var s = document.createElement('script'); s.async = true; var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript'; s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js'; s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}()); }());
</script> </script>
{% elseif newsPosts|length == 1 %} {% elseif newsPosts|length == 1 %}
<div id="disqus_thread"> <div id="disqus_thread">

View file

@ -28,7 +28,7 @@ $disqus_data = [
$renderData['newsPosts'] = Main::getNewsPosts((isset($_GET['id']) && !isset($_GET['xml']) && is_numeric($_GET['id'])) ? $_GET['id'] : null, (isset($_GET['id']) && !isset($_GET['xml']) && is_numeric($_GET['id']))); $renderData['newsPosts'] = Main::getNewsPosts((isset($_GET['id']) && !isset($_GET['xml']) && is_numeric($_GET['id'])) ? $_GET['id'] : null, (isset($_GET['id']) && !isset($_GET['xml']) && is_numeric($_GET['id'])));
$renderData['page'] = [ $renderData['page'] = [
'title' => (isset($_GET['id']) ? (count($renderData['newsPosts']) ? $renderData['newsPosts'][0]['title'] : 'Post does not exist!') : 'Flashii News'), 'title' => (isset($_GET['id']) ? (count($renderData['newsPosts']) ? $renderData['newsPosts'][0]['title'] : 'Post does not exist!') : 'Flashii News'),
'disqus_sso' => ($disqus_user['password_algo'] == 'nologin' ? '{}' : (($disqus_message = base64_encode(json_encode($disqus_data))) .' '. Main::dsqHmacSha1($disqus_message .' '. time(), Configuration::getConfig('disqus_api_secret')) .' '. time())) 'disqus_sso' => (($disqus_message = base64_encode(json_encode($disqus_data))) .' '. Main::dsqHmacSha1($disqus_message .' '. time(), Configuration::getConfig('disqus_api_secret')) .' '. time())
]; ];
// News XML feed // News XML feed