Skip to content

Commit

Permalink
Fixed #91, Fixed #92
Browse files Browse the repository at this point in the history
  • Loading branch information
BugBuster1701 committed May 31, 2014
1 parent 2ea6bbc commit d137ca7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Contao Module Visitors
======================
[![Latest Stable Version](https://poser.pugx.org/bugbuster/visitors/v/stable.svg)](https://packagist.org/packages/bugbuster/visitors) [![Total Downloads](https://poser.pugx.org/bugbuster/visitors/downloads.svg)](https://packagist.org/packages/bugbuster/visitors) [![Latest Unstable Version](https://poser.pugx.org/bugbuster/visitors/v/unstable.svg)](https://packagist.org/packages/bugbuster/visitors) [![License](https://poser.pugx.org/bugbuster/visitors/license.svg)](https://packagist.org/packages/bugbuster/visitors)

## About

Expand Down
5 changes: 1 addition & 4 deletions classes/ModuleVisitorChecks.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@ public function isDomain($host)
$dnsResult = false;
//$this->_vhost : Host.TLD
//idn_to_ascii
require_once TL_ROOT . '/system/modules/core/vendor/idna/idna_convert.class.php';
$objIdn = new \idna_convert();

$dnsResult = dns_get_record( $objIdn->encode( $host ), DNS_ANY );
$dnsResult = dns_get_record( \Idna::encode( $host ), DNS_ANY );
if ( $dnsResult )
{
//log_message('isDomain True','debug.log');
Expand Down
8 changes: 8 additions & 0 deletions config/autoload.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ requires[] = "core"
register_namespaces = true
register_classes = true
register_templates = true

;;
; Override the default configuration for certain sub directories
;;
[runonce/*]
register_namespaces = false
register_classes = false
register_templates = false
4 changes: 2 additions & 2 deletions public/ModuleVisitorReferrerDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function run()
<body id="top">
<div id="main">
<br />
<h1 class="main_headline">'.$GLOBALS['TL_LANG']['tl_visitors_referrer']['details_for'].': '.str_rot13($this->Input->get('tl_referrer',true)).'</h1>
<h1 class="main_headline">'.$GLOBALS['TL_LANG']['tl_visitors_referrer']['details_for'].': '.\Idna::decode(str_rot13($this->Input->get('tl_referrer',true))).'</h1>
<br /><br />
<div class="tl_formbody_edit">
<table cellpadding="0" cellspacing="0" summary="Table lists records" class="mod_visitors_be_table_max">
Expand Down Expand Up @@ -122,7 +122,7 @@ public function run()
{
echo '
<tr>
<td class="tl_file_list" style="padding-left: 2px; text-align: left;">'.rawurldecode(htmlspecialchars($objDetails->visitors_referrer_full)).'</td>
<td class="tl_file_list" style="padding-left: 2px; text-align: left;">'.rawurldecode(htmlspecialchars(\Idna::decode($objDetails->visitors_referrer_full))).'</td>
<td class="tl_file_list" style="padding-left: 2px; text-align: left;">'.date($GLOBALS['TL_CONFIG']['datimFormat'],$objDetails->maxtstamp).'</td>
<td class="tl_file_list" style="text-align: center;">'.$objDetails->ANZ.'</td>
</tr>';
Expand Down
2 changes: 1 addition & 1 deletion templates/mod_visitors_be_stat.html5
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ o.open = function(url,type){
<?php if ($this->visitorsstatReferrer !== false) : ?>
<?php foreach ($this->visitorsstatReferrer[$vcid] AS $Referrer) : ?>
<tr>
<td style="padding-left: 2px; text-align: left;" class="tl_file_list"><?php echo (isset($Referrer[0]) ? $Referrer[0] : ''); ?></td>
<td style="padding-left: 2px; text-align: left;" class="tl_file_list"><?php echo (isset($Referrer[0]) ? \Idna::decode($Referrer[0]) : ''); ?></td>
<td style="padding-left: 2px; text-align: center;" class="tl_file_list"><?php echo (isset($Referrer[1]) ? $Referrer[1] : ''); ?></td>
<td style="text-align: center;" class="tl_file_list"><?php if ($Referrer[2]) : ?><a onclick="Backend.openModalIframe({'width':780,'height':600,'title':'Details','url':this.href});return false" title="Details" href="<?php echo $this->visitors_base; ?>system/modules/visitors/public/ModuleVisitorReferrerDetails.php?tl_referrer=<?php echo str_rot13($Referrer[0]); ?>&amp;tl_vid=<?php echo $Referrer[2]; ?>"><img width="16" height="16" alt="Details" src="system/themes/<?php echo $this->theme; ?>/images/show.gif"></a><?php endif; ?></td>
</tr>
Expand Down

0 comments on commit d137ca7

Please sign in to comment.