fix small issues
This commit is contained in:
parent
c69f491005
commit
60bfcad932
@ -25,9 +25,6 @@ class d3cmp_geoip extends oxView
|
|||||||
|
|
||||||
private $_sModId = 'd3_geoip';
|
private $_sModId = 'd3_geoip';
|
||||||
|
|
||||||
/**
|
|
||||||
* @return null
|
|
||||||
*/
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
|
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
|
||||||
|
@ -20,6 +20,9 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
|
|||||||
protected $_sThisTemplate = "d3_cfg_geoipset_main.tpl";
|
protected $_sThisTemplate = "d3_cfg_geoipset_main.tpl";
|
||||||
protected $_blHasDebugSwitch = true;
|
protected $_blHasDebugSwitch = true;
|
||||||
protected $_sDebugHelpTextIdent = 'D3_GEOIP_SET_DEBUG_DESC';
|
protected $_sDebugHelpTextIdent = 'D3_GEOIP_SET_DEBUG_DESC';
|
||||||
|
protected $_sMenuItemTitle = 'd3mxgeoip';
|
||||||
|
protected $_sMenuSubItemTitle = 'd3mxgeoip_settings';
|
||||||
|
public $oCountryList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $sIP
|
* @param $sIP
|
||||||
@ -44,46 +47,30 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
|
|||||||
return $sTitle;
|
return $sTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return oxcountrylist
|
|
||||||
*/
|
|
||||||
public function getCountryList()
|
|
||||||
{
|
|
||||||
startProfile(__METHOD__);
|
|
||||||
|
|
||||||
/** @var $oCountryList oxcountrylist */
|
|
||||||
$oCountryList = oxNew('oxcountrylist');
|
|
||||||
$oListObject = $oCountryList->getBaseObject();
|
|
||||||
$sFieldList = $oListObject->getSelectFields();
|
|
||||||
$sQ = "select $sFieldList from " . $oListObject->getViewName();
|
|
||||||
$oCountryList->selectString($sQ);
|
|
||||||
|
|
||||||
stopProfile(__METHOD__);
|
|
||||||
|
|
||||||
return $oCountryList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return oxcountrylist
|
* @return oxcountrylist
|
||||||
*/
|
*/
|
||||||
public function getIPCountryList()
|
public function getIPCountryList()
|
||||||
{
|
{
|
||||||
startProfile(__METHOD__);
|
if ($this->oCountryList) {
|
||||||
|
return $this->oCountryList;
|
||||||
|
}
|
||||||
|
|
||||||
|
startProfile(__METHOD__);
|
||||||
/** @var $oGeoIp d3geoip */
|
/** @var $oGeoIp d3geoip */
|
||||||
$oGeoIp = oxNew('d3geoip');
|
$oGeoIp = oxNew('d3geoip');
|
||||||
/** @var $oCountryList oxcountrylist */
|
/** @var $oCountryList oxcountrylist */
|
||||||
$oCountryList = oxNew('oxcountrylist');
|
$this->oCountryList = oxNew('oxcountrylist');
|
||||||
$oListObject = $oCountryList->getBaseObject();
|
$oListObject = $this->oCountryList->getBaseObject();
|
||||||
$sFieldList = $oListObject->getSelectFields();
|
$sFieldList = $oListObject->getSelectFields();
|
||||||
$sQ = "select (SELECT d3startip FROM ".$oGeoIp->getViewName().
|
$sQ = "select (SELECT d3startip FROM ".$oGeoIp->getViewName().
|
||||||
" WHERE D3ISO = " .$oListObject->getViewName(). ".
|
" WHERE D3ISO = " .$oListObject->getViewName(). ".
|
||||||
oxisoalpha2 LIMIT 1) as IP, $sFieldList from " . $oListObject->getViewName();
|
oxisoalpha2 LIMIT 1) as IP, $sFieldList from " . $oListObject->getViewName();
|
||||||
|
|
||||||
$oCountryList->selectString($sQ);
|
$this->oCountryList->selectString($sQ);
|
||||||
|
|
||||||
stopProfile(__METHOD__);
|
stopProfile(__METHOD__);
|
||||||
|
|
||||||
return $oCountryList;
|
return $this->oCountryList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ class d3_oxshopcontrol_geoip extends d3_oxshopcontrol_geoip_parent
|
|||||||
* @param null $sFunction
|
* @param null $sFunction
|
||||||
* @param null $aParams
|
* @param null $aParams
|
||||||
* @param null $aViewsChain
|
* @param null $aViewsChain
|
||||||
* @return null
|
|
||||||
*/
|
*/
|
||||||
public function start ($sClass = null, $sFunction = null, $aParams = null, $aViewsChain = null)
|
public function start ($sClass = null, $sFunction = null, $aParams = null, $aViewsChain = null)
|
||||||
{
|
{
|
||||||
@ -33,8 +32,6 @@ class d3_oxshopcontrol_geoip extends d3_oxshopcontrol_geoip_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* check, if developer mode has to be enabled
|
* check, if developer mode has to be enabled
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
protected function _d3AddGeoIpComponent()
|
protected function _d3AddGeoIpComponent()
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ $iLangNr = 0;
|
|||||||
// -------------------------------
|
// -------------------------------
|
||||||
$aLang = array(
|
$aLang = array(
|
||||||
'charset' => 'ISO-8859-15',
|
'charset' => 'ISO-8859-15',
|
||||||
'd3mxgeoip' => 'GeoIP',
|
'd3mxgeoip' => "<i class='fa fa-globe'></i> GeoIP",
|
||||||
'd3mxgeoip_settings' => 'Einstellungen',
|
'd3mxgeoip_settings' => 'Einstellungen',
|
||||||
'd3tbclgeoip_settings_main' => 'Grundeinstellungen',
|
'd3tbclgeoip_settings_main' => 'Grundeinstellungen',
|
||||||
'tbclcountry_geoip' => 'GeoIP-Kundenumleitungen',
|
'tbclcountry_geoip' => 'GeoIP-Kundenumleitungen',
|
||||||
|
@ -126,7 +126,6 @@ td.edittext {
|
|||||||
<input id="blChangeShop" class="edittext ext_edittext" type="checkbox" name="value[blChangeShop]" value='1' [{if $edit->getValue('blChangeShop') == 1}]checked[{/if}]>
|
<input id="blChangeShop" class="edittext ext_edittext" type="checkbox" name="value[blChangeShop]" value='1' [{if $edit->getValue('blChangeShop') == 1}]checked[{/if}]>
|
||||||
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP_DESC"}]
|
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP_DESC"}]
|
||||||
</dd>
|
</dd>
|
||||||
<div class="spacer"></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@ -137,7 +136,6 @@ td.edittext {
|
|||||||
<input id="blChangeCurr" class="edittext ext_edittext" type="checkbox" name="value[blChangeCurr]" value='1' [{if $edit->getValue('blChangeCurr') == 1}]checked[{/if}]>
|
<input id="blChangeCurr" class="edittext ext_edittext" type="checkbox" name="value[blChangeCurr]" value='1' [{if $edit->getValue('blChangeCurr') == 1}]checked[{/if}]>
|
||||||
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGECURR_DESC"}]
|
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGECURR_DESC"}]
|
||||||
</dd>
|
</dd>
|
||||||
<div class="spacer"></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@ -148,7 +146,6 @@ td.edittext {
|
|||||||
<input id="blChangeLang" class="edittext ext_edittext" type="checkbox" name="value[blChangeLang]" value='1' [{if $edit->getValue('blChangeLang') == 1}]checked[{/if}]>
|
<input id="blChangeLang" class="edittext ext_edittext" type="checkbox" name="value[blChangeLang]" value='1' [{if $edit->getValue('blChangeLang') == 1}]checked[{/if}]>
|
||||||
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGELANG_DESC"}]
|
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGELANG_DESC"}]
|
||||||
</dd>
|
</dd>
|
||||||
<div class="spacer"></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@ -159,7 +156,6 @@ td.edittext {
|
|||||||
<input id="blChangeURL" class="edittext ext_edittext" type="checkbox" name="value[blChangeURL]" value='1' [{if $edit->getValue('blChangeURL') == 1}]checked[{/if}]>
|
<input id="blChangeURL" class="edittext ext_edittext" type="checkbox" name="value[blChangeURL]" value='1' [{if $edit->getValue('blChangeURL') == 1}]checked[{/if}]>
|
||||||
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGEURL_DESC"}]
|
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGEURL_DESC"}]
|
||||||
</dd>
|
</dd>
|
||||||
<div class="spacer"></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@ -169,13 +165,12 @@ td.edittext {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<select id="sFallbackCountryId" size="5" name="value[sFallbackCountryId]">
|
<select id="sFallbackCountryId" size="5" name="value[sFallbackCountryId]">
|
||||||
[{foreach from=$oView->getCountryList() item="oCountry"}]
|
[{foreach from=$oView->getIPCountryList() item="oCountry"}]
|
||||||
<option value="[{$oCountry->getId()}]" [{if $edit->getValue('sFallbackCountryId') == $oCountry->getId()}] selected[{/if}]>[{$oCountry->oxcountry__oxtitle->value}]</option>
|
<option value="[{$oCountry->getId()}]" [{if $edit->getValue('sFallbackCountryId') == $oCountry->getId()}] selected[{/if}]>[{$oCountry->oxcountry__oxtitle->value}]</option>
|
||||||
[{/foreach}]
|
[{/foreach}]
|
||||||
</select>
|
</select>
|
||||||
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_NOCOUNTRY_DESC"}]
|
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_NOCOUNTRY_DESC"}]
|
||||||
</dd>
|
</dd>
|
||||||
<div class="spacer"></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -197,7 +192,6 @@ td.edittext {
|
|||||||
<input id="sTestIp" type="text" maxlength="39" size="17" name="value[sTestIp]" value="[{$edit->getValue('sTestIp')}]">
|
<input id="sTestIp" type="text" maxlength="39" size="17" name="value[sTestIp]" value="[{$edit->getValue('sTestIp')}]">
|
||||||
[{oxinputhelp ident="D3_GEOIP_SET_IP_TESTIP_DESC"}]
|
[{oxinputhelp ident="D3_GEOIP_SET_IP_TESTIP_DESC"}]
|
||||||
</dd>
|
</dd>
|
||||||
<div class="spacer"></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@ -213,7 +207,6 @@ td.edittext {
|
|||||||
</select>
|
</select>
|
||||||
[{oxinputhelp ident="D3_GEOIP_SET_IP_TESTCOUNTRY_DESC"}]
|
[{oxinputhelp ident="D3_GEOIP_SET_IP_TESTCOUNTRY_DESC"}]
|
||||||
</dd>
|
</dd>
|
||||||
<div class="spacer"></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@ -227,7 +220,6 @@ td.edittext {
|
|||||||
[{$oView->getIpCountry($edit->getValue('sCheckIp'))}]
|
[{$oView->getIpCountry($edit->getValue('sCheckIp'))}]
|
||||||
[{/if}]
|
[{/if}]
|
||||||
</dd>
|
</dd>
|
||||||
<div class="spacer"></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -247,14 +239,4 @@ td.edittext {
|
|||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
[{include file="d3_cfg_mod_inc.tpl"}]
|
[{include file="d3_cfg_mod_inc.tpl"}]
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
if (parent.parent) {
|
|
||||||
parent.parent.sShopTitle = "[{$actshopobj->oxshops__oxname->getRawValue()|oxaddslashes}]";
|
|
||||||
parent.parent.sMenuItem = "[{oxmultilang ident="d3mxgeoip"}]";
|
|
||||||
parent.parent.sMenuSubItem = "[{oxmultilang ident="d3mxgeoip_settings"}]";
|
|
||||||
parent.parent.sWorkArea = "[{$_act}]";
|
|
||||||
parent.parent.setTitle();
|
|
||||||
}
|
|
||||||
</script>
|
|
Loading…
x
Reference in New Issue
Block a user