-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- filecounter rewritten. Now we used some more arrays and TYPO3-API. …
…3 new functions. - 2 new hooks in filecounter: modifyPathArray: Explodes the current path into directories. This is useful, when you want to save directory names like "DE", "EN", ... into db modifyFileDataBeforeQueue: One to modify fieldset before saving and the other to git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/ke_stats/trunk@47522 735d13b6-9817-0410-8766-e36946ffe9aa
- Loading branch information
froemken
committed
May 10, 2011
1 parent
2401319
commit e61eaf3
Showing
4 changed files
with
129 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ class tx_kestats_lib { | |
* @access public | ||
* @return void | ||
*/ | ||
function tx_kestats_lib() {/* {{{ */ | ||
function tx_kestats_lib() { | ||
$this->now = time(); | ||
$this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ke_stats']); | ||
$this->extConf['asynchronousDataRefreshing'] = $this->extConf['asynchronousDataRefreshing'] ? 1 : 0; | ||
|
@@ -58,8 +58,6 @@ function tx_kestats_lib() {/* {{{ */ | |
$this->extConf['enableBackendModuleCaching'] = $this->extConf['enableBackendModuleCaching'] ? 1 : 0; | ||
} | ||
|
||
/* }}} */ | ||
|
||
/** | ||
* Increases a statistics counter for the given $category. | ||
* $compareFieldList is a comma-separated list. | ||
|
@@ -81,7 +79,7 @@ function tx_kestats_lib() {/* {{{ */ | |
* @access public | ||
* @return void | ||
*/ | ||
function increaseCounter($category, $compareFieldList, $element_title='', $element_uid=0, $element_pid=0, $element_language=0, $element_type=0, $stat_type=STAT_TYPE_PAGES, $parent_uid=0, $additionalData='', $counter = 1) {/* {{{ */ | ||
function increaseCounter($category, $compareFieldList, $element_title='', $element_uid=0, $element_pid=0, $element_language=0, $element_type=0, $stat_type=STAT_TYPE_PAGES, $parent_uid=0, $additionalData='', $counter = 1) { | ||
|
||
// hook for individual modifications of the statistical data | ||
// before submitting it to the queue or updatign it directly | ||
|
@@ -150,8 +148,6 @@ function increaseCounter($category, $compareFieldList, $element_title='', $eleme | |
} | ||
} | ||
|
||
/* }}} */ | ||
|
||
/** | ||
* refreshOverviewPageData | ||
* | ||
|
@@ -164,7 +160,7 @@ function increaseCounter($category, $compareFieldList, $element_title='', $eleme | |
* @access public | ||
* @return void | ||
*/ | ||
function refreshOverviewPageData($pageUid=0) {/* {{{ */ | ||
function refreshOverviewPageData($pageUid=0) { | ||
$overviewPageData = array(); | ||
|
||
// all languages and types will be shown in the overview page | ||
|
@@ -261,8 +257,6 @@ function refreshOverviewPageData($pageUid=0) {/* {{{ */ | |
return $overviewPageData; | ||
} | ||
|
||
/* }}} */ | ||
|
||
/** | ||
* Returns an array with statistical data of a certain time period. | ||
* | ||
|
@@ -278,7 +272,7 @@ function refreshOverviewPageData($pageUid=0) {/* {{{ */ | |
* @param int $element_type | ||
* @return array | ||
*/ | ||
function getStatResults($statType='pages', $statCategory, $columns, $onlySum=0, $orderBy='counter DESC', $groupBy='', $encode_title_to_utf8=0, $fromToArray=array(), $element_language=0, $element_type=0) {/* {{{ */ | ||
function getStatResults($statType='pages', $statCategory, $columns, $onlySum=0, $orderBy='counter DESC', $groupBy='', $encode_title_to_utf8=0, $fromToArray=array(), $element_language=0, $element_type=0) { | ||
$resultArray = array(); | ||
$yearArray = $this->getDateArray($fromToArray['from_year'], $fromToArray['from_month'], $fromToArray['to_year'], $fromToArray['to_month']); | ||
|
||
|
@@ -441,8 +435,6 @@ function getStatResults($statType='pages', $statCategory, $columns, $onlySum=0, | |
return $resultArray; | ||
} | ||
|
||
/* }}} */ | ||
|
||
/** | ||
* getSubPages | ||
* | ||
|
@@ -454,7 +446,7 @@ function getStatResults($statType='pages', $statCategory, $columns, $onlySum=0, | |
* @access public | ||
* @return void | ||
*/ | ||
function getSubPages($page_uid=0) {/* {{{ */ | ||
function getSubPages($page_uid=0) { | ||
if ($page_uid) { | ||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . intval($page_uid)); | ||
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { | ||
|
@@ -469,8 +461,6 @@ function getSubPages($page_uid=0) {/* {{{ */ | |
} | ||
} | ||
|
||
/* }}} */ | ||
|
||
/** | ||
* getDateArray | ||
* | ||
|
@@ -484,7 +474,7 @@ function getSubPages($page_uid=0) {/* {{{ */ | |
* @return array | ||
* @author Christoph Bl�mer <[email protected]> | ||
*/ | ||
function getDateArray($from_year, $from_month, $to_year, $to_month) {/* {{{ */ | ||
function getDateArray($from_year, $from_month, $to_year, $to_month) { | ||
$fromToArray = array(); | ||
$fromToArray['from_year'] = $from_year; | ||
$fromToArray['to_year'] = $to_year; | ||
|
@@ -523,8 +513,6 @@ function getDateArray($from_year, $from_month, $to_year, $to_month) {/* {{{ */ | |
return $dayPerMonth; | ||
} | ||
|
||
/* }}} */ | ||
|
||
/** | ||
* Increases a statistics counter. | ||
* If no counter exists that matches all fields the $compareFieldList, a new one is created. | ||
|
@@ -625,7 +613,7 @@ function updateStatisticsTable($category, $compareFieldList, $element_title='', | |
* @param string $additionalData Additional data, must be processed by a custom hook. | ||
* @return void | ||
*/ | ||
function getStatEntry($category, $compareFieldList, $element_uid, $element_pid, $element_title, $element_language, $element_type, $stat_type, $parent_uid, $additionalData) {/* {{{ */ | ||
function getStatEntry($category, $compareFieldList, $element_uid, $element_pid, $element_title, $element_language, $element_type, $stat_type, $parent_uid, $additionalData) { | ||
$statEntry = array(); | ||
$compareData = $this->statData; | ||
$compareData['element_uid'] = $element_uid; | ||
|
@@ -673,16 +661,14 @@ function getStatEntry($category, $compareFieldList, $element_uid, $element_pid, | |
return $statEntry; | ||
} | ||
|
||
/* }}} */ | ||
|
||
/** | ||
* getOldestQueueEntry | ||
* find and return the oldest entry in the queue table | ||
* | ||
* @access public | ||
* @return array or false | ||
*/ | ||
function getOldestQueueEntry() {/* {{{ */ | ||
function getOldestQueueEntry() { | ||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_kestats_queue', '1=1', '', 'uid ASC', '1'); | ||
if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0) { | ||
$result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); | ||
|
@@ -692,8 +678,6 @@ function getOldestQueueEntry() {/* {{{ */ | |
return $result; | ||
} | ||
|
||
/* }}} */ | ||
|
||
/** | ||
* debugMail | ||
* | ||
|
@@ -705,7 +689,7 @@ function getOldestQueueEntry() {/* {{{ */ | |
* @access public | ||
* @return void | ||
*/ | ||
function debugMail($email='', $content='', $subject = 'TYPO3 tx_kestats_lib DEBUG') {/* {{{ */ | ||
function debugMail($email='', $content='', $subject = 'TYPO3 tx_kestats_lib DEBUG') { | ||
if (is_array($content)) { | ||
$content = t3lib_div::view_array($content); | ||
} | ||
|
@@ -716,8 +700,6 @@ function debugMail($email='', $content='', $subject = 'TYPO3 tx_kestats_lib DEBU | |
|
||
mail($email, $subject, $content, $header); | ||
} | ||
|
||
/* }}} */ | ||
} | ||
|
||
?> |
Oops, something went wrong.