Changes in PHP code don't take effect

More
3 years 3 months ago #111657 by aesteban
aesteban created the topic: Changes in PHP code don't take effect
Hi,

I'm trying to develop new functionality for Audit plugin. I create a new subscription and function. However, nothing happens when I modify code (even if I restart server or clean ./tmp/runtime/cache). Other minor modifications take effects, for example string changes in existing subscriptions. I can't see errors in Apache log.

This is the code:

> diff -u AuditLog.php.orig AuditLog.php
--- AuditLog.php.orig 2014-08-12 12:03:24.511645932 +0200
+++ AuditLog.php 2014-08-13 17:16:39.411078340 +0200
@@ -17,6 +17,17 @@
$this->subscribe('beforePermissionSetSave');
$this->subscribe('beforeParticipantSave');
$this->subscribe('beforeParticipantDelete');
+ $this->subscribe('beforeLogout');
+ }
+
+ public function beforeLogout()
+ {
+ $event = $this->getEvent();
+ $oCurrentUser=$this->api->getCurrentUser();
+ $oAutoLog = $this->api->newModel($this, 'log');
+ $oAutoLog->uid=$oCurrentUser->uid;
+ $oAutoLog->action='logout';
+ $oAutoLog->save();
}

/**

Any help is welcome.

Thanks in advance,

Alfredo

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!