Permalink
Browse files

banishing delay_first_hit functionality.

  • Loading branch information...
Peter Adams
Peter Adams committed Dec 17, 2016
1 parent b2b0490 commit 3ab5b7ce3c066bf48a2b113903f2605fec6c3735
@@ -542,7 +542,6 @@ private function getDefaultSettingsArray() {
'session_param' => 's',
'site_session_param' => 'ss',
'last_request_param' => 'last_req',
'first_hit_param' => 'first_hit',
'feed_subscription_param' => 'sid',
'source_param' => 'source',
'graph_param' => 'graph',
@@ -580,7 +579,6 @@ private function getDefaultSettingsArray() {
'log_robots' => false,
'log_sessions' => true,
'log_dom_clicks' => true,
'delay_first_hit' => false,
'async_db' => false,
'clean_query_string' => true,
'fetch_refering_page_info' => true,
@@ -64,16 +64,6 @@ function action() {
function post() {
if ( owa_coreAPI::getSetting('base', 'delay_first_hit') ) {
// If not, then make sure that there is an inbound visitor_id
if ( ! $this->event->get( 'visitor_id' ) ) {
// Log request properties to a cookie for processing by a second request and return
owa_coreAPI::debug('Logging this request to first hit cookie.');
return $this->log_first_hit();
}
}
owa_coreAPI::debug('Logging '.$this->event->getEventType().' to event queue...');
return $this->addToEventQueue();
@@ -81,17 +81,6 @@
On</option>
</select>
</div>
</div>
<div class="setting" id="first_hit">
<div class="title">Delay First Hit</div>
<div class="description">This setting controls whether OWA should delay logging the first hit of new visitors until a secondary http request for a special web bug is made. This tactic is used to foil spiders/robots that spoof their user agents in an attempt to appear like a normal web browser.</div>
<div class="field">
<select name="<?php echo $this->getNs();?>config[base.delay_first_hit]">
<option value="0" <?php if ($config['delay_first_hit'] == false):?>SELECTED<?php endif;?>>Off</option>
<option value="1" <?php if ($config['delay_first_hit'] == true):?>SELECTED<?php endif;?>>On</option>
</select>
</div>
</div>
<div class="setting" id="p3p_policy">
View
@@ -170,7 +170,6 @@ function owa_singleton() {
$owa->setSetting( 'base', 'link_template', '%s&%s' );
$owa->setSetting( 'base', 'is_embedded', true );
$owa->setSetting( 'base', 'query_string_filters', 'returnto' );
$owa->setSetting( 'base', 'delay_first_hit', false );
if ( ! $wgOwaSiteId ) {
$wgOwaSiteId = md5($wgServer.$wgScriptPath);
View
@@ -179,22 +179,10 @@ function handleRequestFromUrl() {
*/
function placeHelperPageTags($echo = true, $options = array()) {
if(!owa_coreAPI::getRequestParam('is_robot')) {
if( ! owa_coreAPI::getRequestParam( 'is_robot' ) ) {
// check to see if first hit tag is needed
if ( isset( $options['delay_first_hit'] ) || owa_coreAPI::getSetting('base', 'delay_first_hit')) {
$service = owa_coreAPI::serviceSingleton();
//check for persistant cookie
$v = $service->request->getOwaCookie('v');
if (empty($v)) {
$options['first_hit_tag'] = true;
}
}
if ( ! class_exists( 'owa_template' ) ) {
require_once(OWA_BASE_CLASSES_DIR.'owa_template.php');
}
View
@@ -221,8 +221,6 @@ function &owa_getInstance() {
$owa->setSetting( 'base', 'action_url', get_bloginfo('url').'/index.php?owa_specialAction' );
$owa->setSetting( 'base', 'api_url', get_bloginfo('url').'/index.php?owa_apiAction' );
$owa->setSetting( 'base', 'is_embedded', true );
// needed as old installs might have this turned on by default...
$owa->setSetting( 'base', 'delay_first_hit', false );
// Access WP current user object to check permissions
//$current_user = owa_getCurrentWpUser();

0 comments on commit 3ab5b7c

Please sign in to comment.