diff --git a/main/inc/lib/database.constants.inc.php b/main/inc/lib/database.constants.inc.php index 844eb79c9e..e9bbb88da5 100644 --- a/main/inc/lib/database.constants.inc.php +++ b/main/inc/lib/database.constants.inc.php @@ -135,20 +135,12 @@ define('TABLE_STATISTIC_TRACK_E_DEFAULT', 'track_e_default'); define('TABLE_STATISTIC_TRACK_E_UPLOADS', 'track_e_uploads'); define('TABLE_STATISTIC_TRACK_E_HOTSPOT', 'track_e_hotspot'); define('TABLE_STATISTIC_TRACK_E_ITEM_PROPERTY', 'track_e_item_property'); -define('TABLE_STATISTIC_TRACK_E_OPEN', 'track_e_open'); - define('TABLE_STATISTIC_TRACK_FILTERED_TERMS', 'track_filtered_terms'); -define('TABLE_STATISTIC_TRACK_C_BROWSERS', 'track_c_browsers'); -define('TABLE_STATISTIC_TRACK_C_COUNTRIES', 'track_c_countries'); -define('TABLE_STATISTIC_TRACK_C_OS', 'track_c_os'); -define('TABLE_STATISTIC_TRACK_C_PROVIDERS', 'track_c_providers'); -define('TABLE_STATISTIC_TRACK_C_REFERERS', 'track_c_referers'); //Course catalog stats see #4191 define('TABLE_STATISTIC_TRACK_COURSE_RANKING', 'track_course_ranking'); define('TABLE_MAIN_USER_REL_COURSE_VOTE', 'user_rel_course_vote'); - // SCORM database tables this is used only during the migration from 1.6 to 1.8 see update-db-scorm-1.6.x-1.8.0.inc define('TABLE_SCORM_MAIN', 'scorm_main'); define('TABLE_SCORM_SCO_DATA', 'scorm_sco_data'); diff --git a/main/inc/lib/events.lib.inc.php b/main/inc/lib/events.lib.inc.php index 81b4cc2b5c..ee964c8f80 100644 --- a/main/inc/lib/events.lib.inc.php +++ b/main/inc/lib/events.lib.inc.php @@ -12,46 +12,6 @@ * @package chamilo.library */ -/** - * @author Sebastien Piraux - * @desc Record information for open event (when homepage is opened) - */ -function event_open() -{ - global $_configuration; - $TABLETRACK_OPEN = Database::get_main_table(TABLE_STATISTIC_TRACK_E_OPEN); - - // @getHostByAddr($_SERVER['REMOTE_ADDR']) : will provide host and country information - // $_SERVER['HTTP_USER_AGENT'] : will provide browser and os information - // $_SERVER['HTTP_REFERER'] : provide information about refering url - if (isset($_SERVER['HTTP_REFERER'])) { - $referer = Database::escape_string($_SERVER['HTTP_REFERER']); - } else { - $referer = ''; - } - // record informations only if user comes from another site - //if(!eregi($_configuration['root_web'],$referer)) - $pos = strpos($referer, $_configuration['root_web']); - if ($pos === false && $referer != '') { - $ip = api_get_real_ip(); - $remhost = @ getHostByAddr($ip); - if ($remhost == $ip) { - $remhost = "Unknown"; // don't change this - } - $reallyNow = api_get_utc_datetime(); - $sql = "INSERT INTO ".$TABLETRACK_OPEN." - (open_remote_host, - open_agent, - open_referer, - open_date) - VALUES - ('".$remhost."', - '".Database::escape_string($_SERVER['HTTP_USER_AGENT'])."', '".Database::escape_string($referer)."', '$reallyNow')"; - Database::query($sql); - } - return 1; -} - /** * @author Sebastien Piraux old code * @author Julio Montoya 2013