[FEATURE] The devlog reloaded 72/35172/2
authorFrancois Suter <francois@typo3.org>
Mon, 8 Dec 2014 22:03:50 +0000 (23:03 +0100)
committerFrancois Suter <francois@typo3.org>
Mon, 8 Dec 2014 22:16:16 +0000 (23:16 +0100)
All old files removed
New database structure
New logging utility
Database and file log writers

Resolves: #63689, #31414
Change-Id: Id3466bd31b0770464b19803601c2f99c9f578836
Reviewed-on: http://review.typo3.org/35172
Reviewed-by: Francois Suter <francois@typo3.org>
Tested-by: Francois Suter <francois@typo3.org>
75 files changed:
ChangeLog
Classes/Domain/Model/Entry.php [new file with mode: 0644]
Classes/Domain/Repository/EntryRepository.php [new file with mode: 0644]
Classes/Utility/Logger.php [new file with mode: 0644]
Classes/Utility/TceForms.php [new file with mode: 0644]
Classes/Writer/AbstractWriter.php [new file with mode: 0644]
Classes/Writer/DatabaseWriter.php [new file with mode: 0644]
Classes/Writer/FileWriter.php [new file with mode: 0644]
Classes/Writer/WriterInterface.php [new file with mode: 0644]
Configuration/TCA/tx_devlog_domain_model_entry.php [new file with mode: 0644]
Resources/Private/Language/locallang.xlf [new file with mode: 0644]
Resources/Private/Language/locallang.xml [deleted file]
Resources/Private/Language/locallang_configuration.xlf [new file with mode: 0644]
Resources/Private/Language/locallang_csh_txdevlog.xlf [new file with mode: 0644]
Resources/Private/Language/locallang_db.xlf [new file with mode: 0644]
Resources/Private/Templates/index.html [deleted file]
Resources/Public/Icons/Entry.png [new file with mode: 0644]
Resources/Public/images/icons/application_put.png [deleted file]
Resources/Public/images/icons/arrow_rotate_clockwise.png [deleted file]
Resources/Public/images/icons/csh_severities.png [deleted file]
Resources/Public/images/icons/error.png [deleted file]
Resources/Public/images/icons/information.png [deleted file]
Resources/Public/images/icons/loading.gif [deleted file]
Resources/Public/images/icons/notification.png [deleted file]
Resources/Public/images/icons/ok.png [deleted file]
Resources/Public/images/icons/warning.png [deleted file]
Resources/Public/javascripts/Application.js [deleted file]
Resources/Public/javascripts/Application/AbstractBootstrap.js [deleted file]
Resources/Public/javascripts/Listing/Bootstrap.js [deleted file]
Resources/Public/javascripts/Listing/ExtensionList.js [deleted file]
Resources/Public/javascripts/Listing/LogGrid.js [deleted file]
Resources/Public/javascripts/Listing/PageList.js [deleted file]
Resources/Public/javascripts/Listing/SeverityList.js [deleted file]
Resources/Public/javascripts/Listing/TimeList.js [deleted file]
Resources/Public/javascripts/Override/GridPanel.js [deleted file]
Resources/Public/javascripts/Store/Bootstrap.js [deleted file]
Resources/Public/javascripts/Store/ExtensionListStore.js [deleted file]
Resources/Public/javascripts/Store/LogDirectStore.js [deleted file]
Resources/Public/javascripts/Store/LogJsonStore.js [deleted file]
Resources/Public/javascripts/Store/PageListStore.js [deleted file]
Resources/Public/javascripts/Store/SeverityListStore.js [deleted file]
Resources/Public/javascripts/Store/TimeListStore.js [deleted file]
Resources/Public/javascripts/UserInterface/AjaxRowExpander.js [deleted file]
Resources/Public/javascripts/UserInterface/Bootstrap.js [deleted file]
Resources/Public/javascripts/UserInterface/Iconcombo.js [deleted file]
Resources/Public/javascripts/UserInterface/Layout.js [deleted file]
Resources/Public/javascripts/UserInterface/RowExpander.js [deleted file]
Resources/Public/javascripts/Utils.js [deleted file]
Resources/Public/stylesheets/devlog.css [deleted file]
Tests/Unit/Domain/Model/EntryTest.php [new file with mode: 0644]
Tests/Unit/Utility/LoggerTest.php [new file with mode: 0644]
class.tx_devlog.php [deleted file]
class.tx_devlog_exception.php [deleted file]
class.tx_devlog_remote.php [deleted file]
class.tx_devlog_tceforms.php [deleted file]
ext_autoload.php [deleted file]
ext_conf_template.txt
ext_emconf.php
ext_icon.gif [deleted file]
ext_icon.png [new file with mode: 0644]
ext_localconf.php
ext_tables.php
ext_tables.sql
icon_tx_devlog.gif [deleted file]
interfaces/interface.tx_devlog_logwriter.php [deleted file]
locallang.xml [deleted file]
locallang_csh_txdevlog.xml [deleted file]
locallang_db.xml [deleted file]
mod1/clear.gif [deleted file]
mod1/conf.php [deleted file]
mod1/index.php [deleted file]
mod1/locallang_mod.xml [deleted file]
mod1/moduleicon.gif [deleted file]
tca.php [deleted file]
writers/class.tx_devlog_writers_database.php [deleted file]

index 7d46f7e..219c7fa 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+2014-12-08 Francois Suter <typo3@cobweb.ch>
+
+       * New table structure, new logging utility, database and file writer, resolves #63689
+       * Labels for severity levels in extension configuration, resolves #31414
+
+2014-05-21 Francois Suter <typo3@cobweb.ch>
+
+       * Improved page id detection in FE context, resolves #58536
+       * Released to TER as version 2.11.2
+
+2014-03-24 Francois Suter <typo3@cobweb.ch>
+
+       * Added check for empty BE user, resolves #57218
+       * Released to TER as version 2.11.1
+
+2014-03-22 Francois Suter <typo3@cobweb.ch>
+
+       * Dropped NOT NULL constraint from data_var field definition, resolves #54702
+       * Use dispatch mechanism for BE module
+       * Add CSRF protection to all BE module forms and links, resolves #57194
+       * Released to TER as version 2.11.0
+
+2013-07-07 Francois Suter <typo3@cobweb.ch>
+
+       * Removed old required files, resolves #49751 (thanks to Loek Hilgersom)
+
+2013-05-28 Francois Suter <typo3@cobweb.ch>
+
+       * Changed compatibility range to TYPO3 4.5-6.1
+       * Fixed test of TYPO3_DB member variable
+       * Fixed clearing of search and filter
+       * Fixed filtering on namespaced keys
+       * Fixed display of page icons, resolves #48605
+       * Released to TER as version 2.10.0
+
+2012-05-10 Francois Suter <typo3@cobweb.ch>
+
+       * Fixed one forgotten compatibility issue, resolves #36957
+       * Released to TER as version 2.9.4
+       * Updated for compatibility with TYPO3 4.7, resolves #36957
+       * Released to TER as version 2.9.3
+
 2009-12-21 Francois Suter <typo3@cobweb.ch>
 
        * Added protection against possible XSS attacks
 
 2005-01-02
 
-       * Last version of cc_devlog by Rene Fritz
+       * Last version of cc_devlog by Rene Fritz
\ No newline at end of file
diff --git a/Classes/Domain/Model/Entry.php b/Classes/Domain/Model/Entry.php
new file mode 100644 (file)
index 0000000..c200197
--- /dev/null
@@ -0,0 +1,297 @@
+<?php
+namespace Devlog\Devlog\Domain\Model;
+
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+/**
+ * Entry model class.
+ *
+ * @author Francois Suter <typo3@cobweb.ch>
+ */
+class Entry extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
+
+       /**
+        * Unique ID of the run this entry belongs to.
+        *
+        * @var string
+        */
+       protected $runId = '';
+
+       /**
+        * Timestamp of the log run.
+        *
+        * @var integer
+        */
+       protected $crdate = 0;
+
+       /**
+        * Severity.
+        *
+        * @var integer
+        */
+       protected $severity = 0;
+
+       /**
+        * Extension key or some other identification key.
+        *
+        * @var string
+        */
+       protected $extkey = '';
+
+       /**
+        * Message.
+        *
+        * @var string
+        */
+       protected $message = '';
+
+       /**
+        * Call location (file).
+        *
+        * @var string
+        */
+       protected $location = '';
+
+       /**
+        * Call line.
+        *
+        * @var integer
+        */
+       protected $line = 0;
+
+       /**
+        * Referring IP address.
+        *
+        * @var string
+        */
+       protected $ip = '';
+
+       /**
+        * Logged in BE user at the creation of the log entry (if any).
+        *
+        * @var int
+        */
+       protected $cruserId = 0;
+
+       /**
+        * Page where the data was logged (if applicable).
+        *
+        * @var int
+        */
+       protected $pid = 0;
+
+       /**
+        * extraData
+        *
+        * @var mixed
+        */
+       protected $extraData = NULL;
+
+       /**
+        * Gets the run ID.
+        *
+        * @return string
+        */
+       public function getRunId() {
+               return $this->runId;
+       }
+
+       /**
+        * Sets the run ID.
+        *
+        * @param string $runId
+        */
+       public function setRunId($runId) {
+               $this->runId = $runId;
+       }
+
+       /**
+        * Returns the creation date.
+        *
+        * @return int
+        */
+       public function getCrdate() {
+               return $this->crdate;
+       }
+
+       /**
+        * Sets the creation date.
+        *
+        * @param int $crDate
+        */
+       public function setCrdate($crDate) {
+               $this->crdate = $crDate;
+       }
+
+       /**
+        * Returns the severity
+        *
+        * @return integer $severity
+        */
+       public function getSeverity() {
+               return $this->severity;
+       }
+
+       /**
+        * Sets the severity
+        *
+        * @param integer $severity
+        * @return void
+        */
+       public function setSeverity($severity) {
+               $this->severity = $severity;
+       }
+
+       /**
+        * Returns the extkey
+        *
+        * @return string $extkey
+        */
+       public function getExtkey() {
+               return $this->extkey;
+       }
+
+       /**
+        * Sets the extkey
+        *
+        * @param string $extkey
+        * @return void
+        */
+       public function setExtkey($extkey) {
+               $this->extkey = $extkey;
+       }
+
+       /**
+        * Returns the message
+        *
+        * @return string $message
+        */
+       public function getMessage() {
+               return $this->message;
+       }
+
+       /**
+        * Sets the message
+        *
+        * @param string $message
+        * @return void
+        */
+       public function setMessage($message) {
+               $this->message = $message;
+       }
+
+       /**
+        * Returns the location
+        *
+        * @return string $location
+        */
+       public function getLocation() {
+               return $this->location;
+       }
+
+       /**
+        * Sets the location
+        *
+        * @param string $location
+        * @return void
+        */
+       public function setLocation($location) {
+               $this->location = $location;
+       }
+
+       /**
+        * Returns the line
+        *
+        * @return integer $line
+        */
+       public function getLine() {
+               return $this->line;
+       }
+
+       /**
+        * Sets the line
+        *
+        * @param integer $line
+        * @return void
+        */
+       public function setLine($line) {
+               $this->line = $line;
+       }
+
+       /**
+        * Returns the ip
+        *
+        * @return string $ip
+        */
+       public function getIp() {
+               return $this->ip;
+       }
+
+       /**
+        * Sets the ip
+        *
+        * @param string $ip
+        * @return void
+        */
+       public function setIp($ip) {
+               $this->ip = $ip;
+       }
+
+       /**
+        * @return int
+        */
+       public function getCruserId() {
+               return $this->cruserId;
+       }
+
+       /**
+        * @param int $cruserId
+        */
+       public function setCruserId($cruserId) {
+               $this->cruserId = $cruserId;
+       }
+
+       /**
+        * @return int
+        */
+       public function getPid() {
+               return $this->pid;
+       }
+
+       /**
+        * @param int $pid
+        */
+       public function setPid($pid) {
+               $this->pid = $pid;
+       }
+
+       /**
+        * Returns the extraData
+        *
+        * @return mixed $extraData
+        */
+       public function getExtraData() {
+               return $this->extraData;
+       }
+
+       /**
+        * Sets the extraData
+        *
+        * @param mixed $extraData
+        * @return void
+        */
+       public function setExtraData($extraData) {
+               $this->extraData = $extraData;
+       }
+
+}
\ No newline at end of file
diff --git a/Classes/Domain/Repository/EntryRepository.php b/Classes/Domain/Repository/EntryRepository.php
new file mode 100644 (file)
index 0000000..19e9606
--- /dev/null
@@ -0,0 +1,157 @@
+<?php
+namespace Devlog\Devlog\Domain\Repository;
+
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+/**
+ * The repository for DevLog Entries.
+ *
+ * NOTE: this is not an Extbase repository as we don't need all the
+ * sophistication here. We might as well avoid the overhead.
+ *
+ * @author Francois Suter <typo3@cobweb.ch>
+ */
+class EntryRepository implements \TYPO3\CMS\Core\SingletonInterface {
+       /**
+        * @var string Name of the database table used for logging
+        */
+       protected $databaseTable = 'tx_devlog_domain_model_entry';
+
+       /**
+        * @var array Extension configuration
+        */
+       protected $extensionConfiguration;
+
+       /**
+        * @var integer Number of rows in the database (cached to avoid querying too often)
+        */
+       protected $numberOfRows = NULL;
+
+       /**
+        * Returns all available records in the log table.
+        *
+        * @return array|NULL
+        */
+       public function findAll() {
+               $entries = $this->getDatabaseConnection()->exec_SELECTgetRows(
+                       '*',
+                       $this->databaseTable,
+                       ''
+               );
+               $numEntries = count($entries);
+               for ($i = 0; $i < $numEntries; $i++) {
+                       $entries[$i]['extra_data'] = gzuncompress($entries[$i]['extra_data']);
+               }
+       }
+
+       /**
+        * Adds a log entry to the database table.
+        *
+        * @param \Devlog\Devlog\Domain\Model\Entry $entry
+        * @return boolean
+        */
+       public function add($entry) {
+               $fields = array(
+                       'run_id' => $entry->getRunId(),
+                       'severity' => $entry->getSeverity(),
+                       'extkey' => $entry->getExtkey(),
+                       'message' => $entry->getMessage(),
+                       'location' => $entry->getLocation(),
+                       'line' => $entry->getLine(),
+                       'ip' => $entry->getIp(),
+                       'cruser_id' => $entry->getCruserId(),
+                       'crdate' => $entry->getCrdate(),
+                       'pid' => $entry->getPid(),
+               );
+               // Handle extra data
+               $fields['extra_data'] = gzcompress(serialize($entry->getExtraData()));
+               $extraDataSize = strlen($fields['extra_data']);
+               $maximumExtraDataSize = $this->extensionConfiguration['maximumExtraDataSize'];
+               // If the entry's extra data is above the limit, replace it with a warning
+               if (!empty($maximumExtraDataSize) && $extraDataSize > $maximumExtraDataSize) {
+                       $fields['extra_data'] = gzcompress(serialize('Extra data too large, not saved.'));
+               }
+               return $this->getDatabaseConnection()->exec_INSERTquery(
+                       $this->databaseTable,
+                       $fields
+               );
+       }
+
+       /**
+        * Enforces the limits set in the extension configuration to avoid that the DB tables gets out of hand.
+        *
+        * @param array $configuration Extension configuration
+        * @return void
+        */
+       public function cleanUp() {
+               // Get the total number of rows, if not already defined
+               if ($this->numberOfRows === NULL) {
+                       $this->numberOfRows = $this->getDatabaseConnection()->exec_SELECTcountRows(
+                               'uid',
+                               'tx_devlog_domain_model_entry'
+                       );
+               }
+               // Check if number of rows is above the limit and clean up if necessary
+               if ($this->numberOfRows > $this->extensionConfiguration['maximumRows']) {
+                       // Select the row from which to start cleaning up
+                       // To achieve this, order by creation date (so oldest come first)
+                       // then offset by 10% of maximumRows and get the next record
+                       // This will return a timestamp that is used as a cut-off date
+                       $numberOfRowsToRemove = round(0.1 * $this->extensionConfiguration['maximumRows']);
+                       $cutOffRow = $this->getDatabaseConnection()->exec_SELECTgetRows(
+                               'crdate',
+                               'tx_devlog_domain_model_entry',
+                               '',
+                               '',
+                               'crdate',
+                               $numberOfRowsToRemove . ',1'
+                       );
+                       $cutOffDate = $cutOffRow[0]['crdate'];
+                       // Delete all rows older or same age as previously found timestamp
+                       // This will probably delete a bit more than 10% of maximumRows, but will at least
+                       // delete complete log runs
+                       $this->getDatabaseConnection()->exec_DELETEquery(
+                               'tx_devlog_domain_model_entry',
+                               'crdate <= \'' . $cutOffDate . '\''
+                       );
+                       $numberOfRemovedRows = $this->getDatabaseConnection()->sql_affected_rows();
+                       // Update (cached) number of rows
+                       $this->numberOfRows -= $numberOfRemovedRows;
+                       // Optimize the table (if option is active)
+                       if ($this->extensionConfiguration['optimize']) {
+                               $this->getDatabaseConnection()->sql_query('OPTIMIZE table tx_devlog_domain_model_entry');
+                       }
+               }
+
+       }
+
+       /**
+        * Sets the extension configuration.
+        *
+        * Used to pass the "devlog" configuration down to the entry repository.
+        *
+        * @param array $configuration
+        */
+       public function setExtensionConfiguration($configuration) {
+               $this->extensionConfiguration = $configuration;
+       }
+
+       /**
+        * Wrapper around the global database object.
+        *
+        * @return \TYPO3\CMS\Core\Database\DatabaseConnection
+        */
+       protected function getDatabaseConnection() {
+               return $GLOBALS['TYPO3_DB'];
+       }
+}
\ No newline at end of file
diff --git a/Classes/Utility/Logger.php b/Classes/Utility/Logger.php
new file mode 100644 (file)
index 0000000..426a21c
--- /dev/null
@@ -0,0 +1,231 @@
+<?php
+namespace Devlog\Devlog\Utility;
+
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use Devlog\Devlog\Writer\WriterInterface;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * The main logging class.
+ *
+ * Calls the various writers to actually store the log entries somewhere.
+ *
+ * @author Francois Suter <typo3@cobweb.ch>
+ */
+class Logger implements \TYPO3\CMS\Core\SingletonInterface {
+       /**
+        * @var array Devlog extension configuration
+        */
+       protected $extensionConfiguration = array();
+
+       /**
+        * @var array List of instances of each available log writer
+        */
+       protected $logWriters = array();
+
+       /**
+        * @var bool Flag used to turn logging off
+        */
+       protected $isLoggingEnabled = TRUE;
+
+       /**
+        * @var string Unique ID of the current run
+        */
+       protected $runId;
+
+       public function __construct() {
+               // Read the extension configuration
+               $this->extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['devlog']);
+
+               // Use microtime as unique ID (in format "sec.msec")
+               $microtimeParts = explode(' ', microtime());
+               $this->runId = $microtimeParts[1] . $microtimeParts[0];
+
+               // Create a list of instances of each available log writer
+               foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['devlog']['writers'] as $logWriterClass) {
+                       try {
+                               $logWriter = GeneralUtility::makeInstance(
+                                       $logWriterClass,
+                                       $this
+                               );
+                               if ($logWriter instanceof WriterInterface) {
+                                       $this->logWriters[] = $logWriter;
+                               }
+                       }
+                       catch (\Exception $e) {
+                               // TODO: report somewhere that writer could not be instantiated (sys_log?)
+                       }
+               }
+       }
+
+       /**
+        * Logs calls passed to \TYPO3\CMS\Core\Utility\GeneralUtility::devLog().
+        *
+        * $logData = array('msg'=>$msg, 'extKey'=>$extKey, 'severity'=>$severity, 'dataVar'=>$dataVar);
+        *              'msg'           string          Message (in english).
+        *              'extKey'        string          Extension key (from which extension you are calling the log)
+        *              'severity'      integer         Severity: 0 is info, 1 is notice, 2 is warning, 3 is fatal error, -1 is "OK" message
+        *              'dataVar'       array           Additional data you want to pass to the logger.
+        *
+        * @param array $logData Log data
+        * @return void
+        */
+       public function log($logData) {
+               // If logging is disabled, abort immediately
+               if (!$this->isLoggingEnabled) {
+                       return;
+               }
+               // If the log entry doesn't pass the basic filters, exit early doing nothing
+               if (!$this->isEntryAccepted($logData)) {
+                       return;
+               }
+               // Disable logging while inside the devlog, to avoid recursive calls
+               $this->isLoggingEnabled = FALSE;
+
+               // Create an entry and fill it with data
+               /** @var \Devlog\Devlog\Domain\Model\Entry $entry */
+               $entry = GeneralUtility::makeInstance('Devlog\\Devlog\\Domain\\Model\\Entry');
+               $entry->setRunId(
+                       $this->runId
+               );
+               $entry->setCrdate($GLOBALS['EXEC_TIME']);
+               $entry->setMessage(
+                       GeneralUtility::removeXSS($logData['msg'])
+               );
+               $entry->setExtkey(
+                       strip_tags($logData['extKey'])
+               );
+               $entry->setSeverity(
+                       intval($logData['severity'])
+               );
+               $entry->setExtraData($logData['dataVar']);
+
+               // Try to get a page id that makes sense
+               $pid = 0;
+               // In the FE context, this is obviously the current page
+               if (TYPO3_MODE == 'FE') {
+                       $pid = $GLOBALS['TSFE']->id;
+
+               // In other contexts, a global variable may be set with a relevant pid
+               } elseif (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['debugData']['pid'])) {
+                       $pid = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['debugData']['pid'];
+               }
+               $entry->setPid($pid);
+
+               $entry->setCruserId(
+                       (isset($GLOBALS['BE_USER']->user['uid'])) ? $GLOBALS['BE_USER']->user['uid'] : 0
+               );
+               $entry->setIp(
+                       GeneralUtility::getIndpEnv('REMOTE_ADDR')
+               );
+
+               // Get information about the place where this method was called from
+               try {
+                       $callPlaceInfo = $this->getCallPlaceInfo(debug_backtrace());
+                       $entry->setLocation($callPlaceInfo['basename']);
+                       $entry->setLine($callPlaceInfo['line']);
+               }
+               catch (\OutOfBoundsException $e) {
+                       // Do nothing
+               }
+
+               // Loop on all writers to output the log entry to some backend
+               /** @var \Devlog\Devlog\Writer\WriterInterface $logWriter */
+               foreach ($this->logWriters as $logWriter) {
+                       $logWriter->write($entry);
+               }
+               $this->isLoggingEnabled = TRUE;
+       }
+
+       /**
+        * Checks whether the given log data passes the filters or not.
+        *
+        * @param array $logData Log information
+        * @return bool
+        */
+       public function isEntryAccepted($logData) {
+               $accepted = TRUE;
+               // Skip entry if severity is below minimum level
+               if ($logData['severity'] < $this->extensionConfiguration['minimumLogLevel']) {
+                       $accepted = FALSE;
+               }
+               // Skip entry if key is in excluded list
+               if (GeneralUtility::inList($this->extensionConfiguration['excludeKeys'], $logData['extKey'])) {
+                       $accepted = FALSE;
+               }
+               return $accepted;
+       }
+
+       /**
+        * Given a backtrace, this method tries to find the place where a "devLog" function was called
+        * and returns info about that place.
+        *
+        * @return      array   information about the call place
+        */
+       protected function getCallPlaceInfo() {
+               $backTrace = debug_backtrace();
+               foreach ($backTrace as $entry) {
+                       if ($entry['function'] === 'devLog') {
+                               $pathInfo = pathinfo($entry['file']);
+                               $pathInfo['line'] = $entry['line'];
+                               return $pathInfo;
+                       }
+               }
+               throw new \OutOfBoundsException(
+                       'No devLog() call found withing debug stack.',
+                       1414338781
+               );
+       }
+
+       /**
+        * Returns the extension's configuration.
+        *
+        * @return array
+        */
+       public function getExtensionConfiguration() {
+               return $this->extensionConfiguration;
+       }
+
+       /**
+        * Sets the extension configuration.
+        *
+        * This should normally not be used. It is designed for unit testing.
+        *
+        * @param array $extensionConfiguration
+        * @return void
+        */
+       public function setExtensionConfiguration($extensionConfiguration) {
+               $this->extensionConfiguration = $extensionConfiguration;
+       }
+
+       /**
+        * Returns the logging enabled flag.
+        *
+        * @return bool
+        */
+       public function isLoggingEnabled() {
+               return $this->isLoggingEnabled;
+       }
+
+       /**
+        * Sets the logging enabled flag.
+        *
+        * @param bool $flag
+        * @return void
+        */
+       public function setIsLoggingEnabled($flag) {
+               $this->isLoggingEnabled = (bool)$flag;
+       }
+}
\ No newline at end of file
diff --git a/Classes/Utility/TceForms.php b/Classes/Utility/TceForms.php
new file mode 100644 (file)
index 0000000..550a86f
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+namespace Devlog\Devlog\Utility;
+
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Backend\Utility\IconUtility;
+
+/**
+ * TCEforms custom field for devlog table.
+ */
+class TceForms {
+
+       protected $extKey = 'devlog';
+
+       /**
+        * Returns the severity of the entry using TYPO3's icon and labels
+        *
+        * @param array $PA Information related to the field
+        * @param \TYPO3\CMS\Backend\Form\FormEngine $formObject Reference to calling TCEforms object
+        *
+        * @return string The HTML for the form field
+        */
+       public function displaySeverity($PA, $formObject) {
+               // Translate severity to icon "name"
+               $severity = $PA['row']['severity'];
+               switch ($severity) {
+                       case -1:
+                               $severityName = 'ok';
+                               break;
+                       case 1:
+                               $severityName = 'notification';
+                               break;
+                       case 2:
+                               $severityName = 'warning';
+                               break;
+                       case 3:
+                               $severityName = 'error';
+                               break;
+                       default:
+                               $severityName = 'information';
+               }
+
+               $html = IconUtility::getSpriteIcon(
+                       'status-dialog-' . $severityName,
+                       array(
+                               'title' => $this->getLanguageObject()->sL('LLL:EXT:devlog/Resources/Private/Language/locallang.xlf:severity_' . $severityName)
+                       )
+               );
+               return $html;
+       }
+
+       /**
+        * Returns the extra data as a nice HTML dump.
+        *
+        * @param array $PA Information related to the field
+        * @param \TYPO3\CMS\Backend\Form\FormEngine $formObject Reference to calling TCEforms object
+        *
+        * @return string The HTML for the form field
+        */
+       public function displayExtraData($PA, $formObject) {
+               if (empty($PA['row']['extra_data'])) {
+                       $html = $this->getLanguageObject()->sL('LLL:EXT:devlog/Resources/Private/Language/locallang.xlf:no_extra_data');
+               } else {
+                       $data = unserialize(gzuncompress($PA['row']['extra_data']));
+                       $html = \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
+                               $data,
+                               NULL,
+                               10,
+                               FALSE,
+                               TRUE,
+                               TRUE
+                       );
+               }
+               return $html;
+       }
+
+       /**
+        * Wrapper around the global language object.
+        *
+        * @return \TYPO3\CMS\Lang\LanguageService
+        */
+       protected function getLanguageObject() {
+               return $GLOBALS['LANG'];
+       }
+}
diff --git a/Classes/Writer/AbstractWriter.php b/Classes/Writer/AbstractWriter.php
new file mode 100644 (file)
index 0000000..4982984
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+namespace Devlog\Devlog\Writer;
+
+
+/***************************************************************
+ *
+ *  Copyright notice
+ *
+ *  (c) 2014 François Suter <typo3@cobweb.ch>, Cobweb Development Sarl
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Abstract base class for all Writers.
+ */
+abstract class AbstractWriter implements WriterInterface {
+       /**
+        * @var \Devlog\Devlog\Utility\Logger Back-reference to the logger class
+        */
+       protected $logger;
+
+       /**
+        * Base constructor sets the Logger reference.
+        *
+        * @param \Devlog\Devlog\Utility\Logger $logger
+        */
+       public function __construct($logger) {
+               $this->logger = $logger;
+       }
+}
\ No newline at end of file
diff --git a/Classes/Writer/DatabaseWriter.php b/Classes/Writer/DatabaseWriter.php
new file mode 100644 (file)
index 0000000..e900354
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+namespace Devlog\Devlog\Writer;
+
+
+/***************************************************************
+ *
+ *  Copyright notice
+ *
+ *  (c) 2014 François Suter <typo3@cobweb.ch>, Cobweb Development Sarl
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Writes log entries to a database table.
+ */
+class DatabaseWriter extends AbstractWriter {
+       /**
+        * @var \Devlog\Devlog\Domain\Repository\EntryRepository
+        */
+       protected $entryRepository;
+
+       public function __construct($logger) {
+               parent::__construct($logger);
+               $this->entryRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Devlog\\Devlog\\Domain\\Repository\\EntryRepository');
+               $this->entryRepository->setExtensionConfiguration(
+                       $this->logger->getExtensionConfiguration()
+               );
+       }
+
+       /**
+        * Writes the entry to the DB storage.
+        *
+        * @param \Devlog\Devlog\Domain\Model\Entry $entry
+        * @return void
+        */
+       public function write($entry) {
+               $this->entryRepository->add($entry);
+               $this->entryRepository->cleanUp();
+       }
+}
\ No newline at end of file
diff --git a/Classes/Writer/FileWriter.php b/Classes/Writer/FileWriter.php
new file mode 100644 (file)
index 0000000..6696ed5
--- /dev/null
@@ -0,0 +1,113 @@
+<?php
+namespace Devlog\Devlog\Writer;
+
+
+/***************************************************************
+ *
+ *  Copyright notice
+ *
+ *  (c) 2014 François Suter <typo3@cobweb.ch>, Cobweb Development Sarl
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * Writes log entries to a given file
+ */
+class FileWriter extends AbstractWriter {
+       /**
+        * Handle to the log file.
+        *
+        * @var resource
+        */
+       protected $fileHandle;
+
+       public function __construct($logger) {
+               parent::__construct($logger);
+               $configuration = $this->logger->getExtensionConfiguration();
+               $absoluteFilePath = GeneralUtility::getFileAbsFileName(
+                       $configuration['logFilePath']
+               );
+               // If the file path is not valid, throw an exception
+               if (empty($absoluteFilePath)) {
+                       throw new \Exception(
+                               sprintf(
+                                       'Path to log file %s is invalid.',
+                                       $configuration['logFilePath']
+                               ),
+                               1416486859
+                       );
+               }
+               // If the file path is valid, try opening the file
+               $this->fileHandle = @fopen(
+                       $absoluteFilePath,
+                       'a'
+               );
+               // Throw an exception if log file could not be opened properly
+               if (!$this->fileHandle) {
+                       throw new \Exception(
+                               sprintf(
+                                       'Log file %s could not be opened.',
+                                       $configuration['logFilePath']
+                               ),
+                               1416486470
+                       );
+               }
+       }
+
+       public function __destruct() {
+               @fclose($this->fileHandle);
+       }
+
+       /**
+        * Writes the entry to the log file.
+        *
+        * @param \Devlog\Devlog\Domain\Model\Entry $entry
+        * @return void
+        */
+       public function write($entry) {
+               $logLine = '';
+               $logLine .= date('c', $entry->getCrdate());
+               switch ($entry->getSeverity()) {
+                       case 0:
+                               $severity = 'INFO';
+                               break;
+                       case 1:
+                               $severity = 'NOTICE';
+                               break;
+                       case 2:
+                               $severity = 'WARNING';
+                               break;
+                       case 3:
+                               $severity = 'ERROR';
+                               break;
+                       default:
+                               $severity = 'OK';
+               }
+               $logLine .= ' [' . $severity . ']';
+               $logLine .= ' ' . $entry->getMessage();
+               $logLine .= ' (' . $entry->getLocation() . ' ' . $entry->getLine() . ')';
+               $logLine .= "\n";
+               @fwrite(
+                       $this->fileHandle,
+                       $logLine
+               );
+       }
+}
\ No newline at end of file
diff --git a/Classes/Writer/WriterInterface.php b/Classes/Writer/WriterInterface.php
new file mode 100644 (file)
index 0000000..ddc45b6
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+namespace Devlog\Devlog\Writer;
+
+
+/***************************************************************
+ *
+ *  Copyright notice
+ *
+ *  (c) 2014 François Suter <typo3@cobweb.ch>, Cobweb Development Sarl
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * API definition for log writers
+ */
+interface WriterInterface {
+       /**
+        * Writes the entry to the relevant storage.
+        *
+        * @param \Devlog\Devlog\Domain\Model\Entry $entry
+        * @return mixed
+        */
+       public function write($entry);
+}
\ No newline at end of file
diff --git a/Configuration/TCA/tx_devlog_domain_model_entry.php b/Configuration/TCA/tx_devlog_domain_model_entry.php
new file mode 100644 (file)
index 0000000..d9320ec
--- /dev/null
@@ -0,0 +1,123 @@
+<?php
+if (!defined ('TYPO3_MODE')) {
+       die ('Access denied.');
+}
+
+return array(
+       'ctrl' => array(
+               'title' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry',
+               'label' => 'message',
+               'tstamp' => 'tstamp',
+               'crdate' => 'crdate',
+               'cruser_id' => 'cruser_id',
+               'default_sortby' => 'ORDER BY crdate DESC',
+               'dividers2tabs' => TRUE,
+               'searchFields' => 'severity,extkey,message,location,ip,line,extra_data',
+               'typeicon_column' => 'severity',
+               'typeicon_classes' => array(
+                       'default' => 'extensions-devlog-entry',
+                       '-1' => 'status-dialog-ok',
+                       '0' => 'status-dialog-information',
+                       '1' => 'status-dialog-notification',
+                       '2' => 'status-dialog-warning',
+                       '3' => 'status-dialog-error'
+               ),
+       ),
+       'interface' => array(
+               'showRecordFieldList' => 'severity, extkey, message, location, line, ip, extra_data',
+       ),
+       'types' => array(
+               '1' => array('showitem' => 'crdate, cruser_id, severity, extkey, message, location, line, ip, extra_data'),
+       ),
+       'columns' => array(
+               'crdate' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.crdate',
+                       'config' => array(
+                               'type' => 'input',
+                               'readOnly' => TRUE,
+                               'eval' => 'datetime'
+                       )
+               ),
+               'cruser_id' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.cruser_id',
+                       'config' => array(
+                               'type' => 'select',
+                               'readOnly' => TRUE,
+                               'items' => array(
+                                       array()
+                               ),
+                               'foreign_table' => 'be_users',
+                               'size' => 1
+                       )
+               ),
+               'severity' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.severity',
+                       'config' => array(
+                               'type' => 'user',
+                               'userFunc' => 'Devlog\\Devlog\\Utility\\TceForms->displaySeverity',
+                       )
+               ),
+               'extkey' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.extkey',
+                       'config' => array(
+                               'type' => 'input',
+                               'readOnly' => TRUE,
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'message' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.message',
+                       'config' => array(
+                               'type' => 'text',
+                               'readOnly' => TRUE,
+                               'cols' => 50,
+                               'rows' => 5,
+                               'eval' => 'trim'
+                       )
+               ),
+               'location' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.location',
+                       'config' => array(
+                               'type' => 'input',
+                               'readOnly' => TRUE,
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'line' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.line',
+                       'config' => array(
+                               'type' => 'input',
+                               'readOnly' => TRUE,
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'ip' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.ip',
+                       'config' => array(
+                               'type' => 'input',
+                               'readOnly' => TRUE,
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'extra_data' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:devlog/Resources/Private/Language/locallang_db.xlf:tx_devlog_domain_model_entry.extra_data',
+                       'config' => array(
+                               'type' => 'user',
+                               'userFunc' => 'Devlog\\Devlog\\Utility\\TceForms->displayExtraData',
+                       )
+               ),
+       ),
+);
diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf
new file mode 100644 (file)
index 0000000..c6ab014
--- /dev/null
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2014-10-26T19:40:11Z" product-name="devlog">
+               <header/>
+               <body>
+                       <trans-unit id="title" xml:space="preserve">
+                               <source>Developer Log</source>
+                       </trans-unit>
+                       <trans-unit id="showlog" xml:space="preserve">
+                               <source>Show Log</source>
+                       </trans-unit>
+                       <trans-unit id="selectlog" xml:space="preserve">
+                               <source>Select Log:</source>
+                       </trans-unit>
+                       <trans-unit id="log_entries" xml:space="preserve">
+                               <source>Log entries</source>
+                       </trans-unit>
+                       <trans-unit id="entries" xml:space="preserve">
+                               <source>Entries</source>
+                       </trans-unit>
+                       <trans-unit id="cleanup" xml:space="preserve">
+                               <source>Clean up</source>
+                       </trans-unit>
+                       <trans-unit id="setup" xml:space="preserve">
+                               <source>Setup</source>
+                       </trans-unit>
+                       <trans-unit id="search" xml:space="preserve">
+                               <source>Search</source>
+                       </trans-unit>
+                       <trans-unit id="clear_search" xml:space="preserve">
+                               <source>Clear search</source>
+                       </trans-unit>
+                       <trans-unit id="clear_filters" xml:space="preserve">
+                               <source>Clear all filters</source>
+                       </trans-unit>
+                       <trans-unit id="search_data" xml:space="preserve">
+                               <source>Search log data</source>
+                       </trans-unit>
+                       <trans-unit id="latest_run" xml:space="preserve">
+                               <source>latest log run</source>
+                       </trans-unit>
+                       <trans-unit id="latest_25" xml:space="preserve">
+                               <source>latest 25 entries</source>
+                       </trans-unit>
+                       <trans-unit id="latest_50" xml:space="preserve">
+                               <source>latest 50 entries</source>
+                       </trans-unit>
+                       <trans-unit id="latest_100" xml:space="preserve">
+                               <source>latest 100 entries</source>
+                       </trans-unit>
+                       <trans-unit id="all_entries" xml:space="preserve">
+                               <source>all entries</source>
+                       </trans-unit>
+                       <trans-unit id="auto_refresh" xml:space="preserve">
+                               <source>Auto reload when new data</source>
+                       </trans-unit>
+                       <trans-unit id="log_time" xml:space="preserve">
+                               <source>Log time</source>
+                       </trans-unit>
+                       <trans-unit id="log_period" xml:space="preserve">
+                               <source>Log period</source>
+                       </trans-unit>
+                       <trans-unit id="refresh" xml:space="preserve">
+                               <source>Refresh</source>
+                       </trans-unit>
+                       <trans-unit id="crdate" xml:space="preserve">
+                               <source>Date</source>
+                       </trans-unit>
+                       <trans-unit id="severity" xml:space="preserve">
+                               <source>Severity</source>
+                       </trans-unit>
+                       <trans-unit id="extkey" xml:space="preserve">
+                               <source>Extension</source>
+                       </trans-unit>
+                       <trans-unit id="msg" xml:space="preserve">
+                               <source>Message</source>
+                       </trans-unit>
+                       <trans-unit id="location" xml:space="preserve">
+                               <source>Called from</source>
+                       </trans-unit>
+                       <trans-unit id="pid" xml:space="preserve">
+                               <source>Page</source>
+                       </trans-unit>
+                       <trans-unit id="cruser_id" xml:space="preserve">
+                               <source>User</source>
+                       </trans-unit>
+                       <trans-unit id="data_var" xml:space="preserve">
+                               <source>Extra data</source>
+                       </trans-unit>
+                       <trans-unit id="no_entries_found" xml:space="preserve">
+                               <source>No entries found. Try to relax your filter and search criteria.</source>
+                       </trans-unit>
+                       <trans-unit id="open_view" xml:space="preserve">
+                               <source>Open new window</source>
+                       </trans-unit>
+                       <trans-unit id="line_call" xml:space="preserve">
+                               <source>%s, line %d</source>
+                       </trans-unit>
+                       <trans-unit id="line" xml:space="preserve">
+                               <source>line</source>
+                       </trans-unit>
+                       <trans-unit id="extra_data_error" xml:space="preserve">
+                               <source>Error reading extra data</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_error.toolong" xml:space="preserve">
+                               <source>The extra data exceeded the maximum size. It was not stored.</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_error.invalid" xml:space="preserve">
+                               <source>The extra data was not an array. It was not stored.</source>
+                       </trans-unit>
+                       <trans-unit id="no_extra_data" xml:space="preserve">
+                               <source>No extra data</source>
+                       </trans-unit>
+                       <trans-unit id="show_extra_data" xml:space="preserve">
+                               <source>Show extra data</source>
+                       </trans-unit>
+                       <trans-unit id="hide_extra_data" xml:space="preserve">
+                               <source>Hide extra data</source>
+                       </trans-unit>
+                       <trans-unit id="severity_ok" xml:space="preserve">
+                               <source>OK</source>
+                       </trans-unit>
+                       <trans-unit id="severity_info" xml:space="preserve">
+                               <source>Info</source>
+                       </trans-unit>
+                       <trans-unit id="severity_notification" xml:space="preserve">
+                               <source>Notice</source>
+                       </trans-unit>
+                       <trans-unit id="severity_warning" xml:space="preserve">
+                               <source>Warning</source>
+                       </trans-unit>
+                       <trans-unit id="severity_error" xml:space="preserve">
+                               <source>Error</source>
+                       </trans-unit>
+                       <trans-unit id="latest" xml:space="preserve">
+                               <source>latest &gt;&gt;</source>
+                       </trans-unit>
+                       <trans-unit id="next" xml:space="preserve">
+                               <source>next &gt;</source>
+                       </trans-unit>
+                       <trans-unit id="previous" xml:space="preserve">
+                               <source>&lt; previous</source>
+                       </trans-unit>
+                       <trans-unit id="oldest" xml:space="preserve">
+                               <source>&lt;&lt; oldest</source>
+                       </trans-unit>
+                       <trans-unit id="expand_all_extra_data" xml:space="preserve">
+                               <source>Expand all extra data</source>
+                       </trans-unit>
+                       <trans-unit id="info_excluded_key" xml:space="preserve">
+                               <source>The following keys are currently not logged</source>
+                       </trans-unit>
+                       <trans-unit id="clearlog" xml:space="preserve">
+                               <source>Clear Log</source>
+                       </trans-unit>
+                       <trans-unit id="clearlog_intro" xml:space="preserve">
+                               <source>Use any of the clean up options below to clear your developer log.</source>
+                       </trans-unit>
+                       <trans-unit id="clearalllog" xml:space="preserve">
+                               <source>Clear All Entries!</source>
+                       </trans-unit>
+                       <trans-unit id="cleared_log" xml:space="preserve">
+                               <source>%d log entries were deleted.</source>
+                       </trans-unit>
+                       <trans-unit id="cleanup_for_period" xml:space="preserve">
+                               <source>Delete all log entries that are older than:</source>
+                       </trans-unit>
+                       <trans-unit id="cleanup_for_extension" xml:space="preserve">
+                               <source>Delete all log entries for extension:</source>
+                       </trans-unit>
+                       <trans-unit id="cleanup_all" xml:space="preserve">
+                               <source>Pressing the button below will actually delete ALL log entries. Make sure that this is really what you want to do!</source>
+                       </trans-unit>
+                       <trans-unit id="1hour" xml:space="preserve">
+                               <source>1 hour</source>
+                       </trans-unit>
+                       <trans-unit id="1week" xml:space="preserve">
+                               <source>1 week</source>
+                       </trans-unit>
+                       <trans-unit id="1month" xml:space="preserve">
+                               <source>1 month</source>
+                       </trans-unit>
+                       <trans-unit id="3months" xml:space="preserve">
+                               <source>3 months</source>
+                       </trans-unit>
+                       <trans-unit id="6months" xml:space="preserve">
+                               <source>6 months</source>
+                       </trans-unit>
+                       <trans-unit id="1year" xml:space="preserve">
+                               <source>1 year</source>
+                       </trans-unit>
+                       <trans-unit id="no_entries" xml:space="preserve">
+                               <source>There are currently no log entries in the Developer Log.</source>
+                       </trans-unit>
+                       <trans-unit id="xx_entries" xml:space="preserve">
+                               <source>There are currently %d log entries in the Developer Log.</source>
+                       </trans-unit>
+                       <trans-unit id="loading" xml:space="preserve">
+                               <source>Loading...</source>
+                       </trans-unit>
+                       <trans-unit id="selectextentionkey" xml:space="preserve">
+                               <source>Select an extension key</source>
+                       </trans-unit>
+                       <trans-unit id="selectseverity" xml:space="preserve">
+                               <source>Select severity</source>
+                       </trans-unit>
+                       <trans-unit id="selectpage" xml:space="preserve">
+                               <source>Select page</source>
+                       </trans-unit>
+                       <trans-unit id="status_ok">
+                               <source>OK</source>
+                       </trans-unit>
+                       <trans-unit id="status_information">
+                               <source>Information</source>
+                       </trans-unit>
+                       <trans-unit id="status_notice">
+                               <source>Notice</source>
+                       </trans-unit>
+                       <trans-unit id="status_warning">
+                               <source>Warning</source>
+                       </trans-unit>
+                       <trans-unit id="status_error">
+                               <source>Error</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang.xml b/Resources/Private/Language/locallang.xml
deleted file mode 100644 (file)
index c7b87d9..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3locallang>
-    <meta type="array">
-        <description>Labels for mod1 backend module</description>
-        <type>module</type>
-        <csh_table></csh_table>
-        <labelContext type="array">
-        </labelContext>
-    </meta>
-    <data type="array">
-        <languageKey index="default" type="array">
-            <label index="title">Developer Log</label>
-            <label index="showlog">Show Log</label>
-            <label index="selectlog">Select Log:</label>
-            <label index="log_entries">Log entries</label>
-            <label index="entries">Entries</label>
-            <label index="cleanup">Clean up</label>
-            <label index="setup">Setup</label>
-            <label index="search">Search</label>
-            <label index="clear_search">Clear search</label>
-            <label index="clear_filters">Clear all filters</label>
-            <label index="search_data">Search log data</label>
-            <label index="latest_run">latest log run</label>
-            <label index="latest_25">latest 25 entries</label>
-            <label index="latest_50">latest 50 entries</label>
-            <label index="latest_100">latest 100 entries</label>
-            <label index="all_entries">all entries</label>
-            <label index="auto_refresh">Auto reload when new data</label>
-            <label index="log_time">Log time</label>
-            <label index="log_period">Log period</label>
-            <label index="refresh">Refresh</label>
-            <label index="crdate">Date</label>
-            <label index="severity">Severity</label>
-            <label index="extkey">Extension</label>
-            <label index="msg">Message</label>
-            <label index="location">Called from</label>
-            <label index="pid">Page</label>
-            <label index="cruser_id">User</label>
-            <label index="data_var">Extra data</label>
-            <label index="no_entries_found">No entries found. Try to relax your filter and search criteria.</label>
-            <label index="open_view">Open new window</label>
-            <label index="line_call">%s, line %d</label>
-            <label index="line">line</label>
-            <label index="extra_data_error">Error reading extra data</label>
-            <label index="tx_devlog_error.toolong">The extra data exceeded the maximum size. It was not stored.</label>
-            <label index="tx_devlog_error.invalid">The extra data was not an array. It was not stored.</label>
-            <label index="show_extra_data">Show extra data</label>
-            <label index="hide_extra_data">Hide extra data</label>
-            <label index="severity_ok">OK</label>
-            <label index="severity_info">Info</label>
-            <label index="severity_notice">Notice</label>
-            <label index="severity_warning">Warning</label>
-            <label index="severity_error">Error</label>
-            <label index="latest">latest &gt;&gt;</label>
-            <label index="next">next &gt;</label>
-            <label index="previous">&lt; previous</label>
-            <label index="oldest">&lt;&lt; oldest</label>
-                       <label index="expand_all_extra_data">Expand all extra data</label>
-                       <label index="info_excluded_key">The following keys are currently not logged</label>
-            <label index="clearlog">Clear Log</label>
-            <label index="clearlog_intro">Use any of the clean up options below to clear your developer log.</label>
-            <label index="clearalllog">Clear All Entries!</label>
-            <label index="cleared_log">%d log entries were deleted.</label>
-                       <label index="cleanup_for_period">Delete all log entries that are older than:</label>
-                       <label index="cleanup_for_extension">Delete all log entries for extension:</label>
-            <label index="cleanup_all">Pressing the button below will actually delete ALL log entries. Make sure that this is really what you want to do!</label>
-                       <label index="1hour">1 hour</label>
-                       <label index="1week">1 week</label>
-                       <label index="1month">1 month</label>
-                       <label index="3months">3 months</label>
-                       <label index="6months">6 months</label>
-                       <label index="1year">1 year</label>
-                       <label index="no_entries">There are currently no log entries in the Developer Log.</label>
-                       <label index="xx_entries">There are currently %d log entries in the Developer Log.</label>
-                       <label index="loading">Loading...</label>
-                       <label index="selectextentionkey">Select an extension key</label>
-                       <label index="selectseverity">Select severity</label>
-                       <label index="selectpage">Select page</label>
-        </languageKey>
-    </data>
-</T3locallang>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang_configuration.xlf b/Resources/Private/Language/locallang_configuration.xlf
new file mode 100644 (file)
index 0000000..80284f6
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2014-10-15T16:49:33Z" product-name="devlog">
+               <header/>
+               <body>
+                       <trans-unit id="general">
+                               <source>General</source>
+                       </trans-unit>
+                       <trans-unit id="db_writer">
+                               <source>Database Writer</source>
+                       </trans-unit>
+                       <trans-unit id="file_writer">
+                               <source>File Writer</source>
+                       </trans-unit>
+                       <trans-unit id="limits">
+                               <source>Limits</source>
+                       </trans-unit>
+                       <trans-unit id="filtering">
+                               <source>Filtering</source>
+                       </trans-unit>
+                       <trans-unit id="display">
+                               <source>Display</source>
+                       </trans-unit>
+                       <trans-unit id="minimum_level">
+                               <source>Minimum level for logging: Minimum message level required for actually writing to the logs.</source>
+                       </trans-unit>
+                       <trans-unit id="excluded_keys">
+                               <source>Excluded keys: Comma-separated list of (extension) keys whose entries should not be written to the logs.</source>
+                       </trans-unit>
+                       <trans-unit id="log_file_path">
+                               <source>Path: Full path to the log file (may be relative to the web root, or use the EXT: syntax).</source>
+                       </trans-unit>
+                       <trans-unit id="maximum_rows">
+                               <source>Maximum number of rows: Maximum number of rows that should be stored in the log table</source>
+                       </trans-unit>
+                       <trans-unit id="optimize">
+                               <source>Optimize devlog table: Run OPTIMIZE on the tx_devlog_domain_model_entry table after records are purged to reduce the overhead. Note that this will work only with MySQL databases.</source>
+                       </trans-unit>
+                       <trans-unit id="maximum_extra_data_size">
+                               <source>Maximum size of extra data: The extra data field accepts an array containing any number of data. However when that array becomes too large, writing it to the database may actually crash you server. It is recommended to set a limit (in number of bytes).</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang_csh_txdevlog.xlf b/Resources/Private/Language/locallang_csh_txdevlog.xlf
new file mode 100644 (file)
index 0000000..6f78789
--- /dev/null
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2014-11-12T18:04:07Z" product-name="devlog-old">
+               <header/>
+               <body>
+                       <trans-unit id=".alttitle" xml:space="preserve">
+                               <source>Developer Log</source>
+                       </trans-unit>
+                       <trans-unit id=".description" xml:space="preserve">
+                               <source>The Developer's Log extension (devlog) provides logging functionality. It hooks into \TYPO3\CMS\Core\Utility\GeneralUtility::devlog() to catch devlog events. A BE module gives an overview of the logged events. For more information read the extension manual, which can be found on docs.typo3.org.</source>
+                       </trans-unit>
+                       <trans-unit id=".syntax" xml:space="preserve">
+                               <source>
+                                       If you want to make use of the devlog in your extension, simply call the following helper function with the appropriate parameters:
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devlog($msg, $extKey, $severity = 0, $dataVar = FALSE);
+
+                                       The parameters are:
+                                       $msg: Main log message (string)
+                                       $extKey: Extension key (from which extension you are calling the log) (string)
+                                       $severity: Severity: 0 is info, 1 is notice, 2 is warning, 3 is fatal error, -1 is &quot;OK&quot; message (integer)
+                                       $dataVar: Additional data you want to pass to the logger (array)
+                               </source>
+                       </trans-unit>
+                       <trans-unit id="cruser_id.alttitle" xml:space="preserve">
+                               <source>Relevant BE user</source>
+                       </trans-unit>
+                       <trans-unit id="cruser_id.description" xml:space="preserve">
+                               <source>Indicates which backend user was logged in when the entry was logged. May be undefined.</source>
+                       </trans-unit>
+                       <trans-unit id="crdate.alttitle" xml:space="preserve">
+                               <source>Log run time</source>
+                       </trans-unit>
+                       <trans-unit id="crdate.description" xml:space="preserve">
+                               <source>This is the date and time at which the log entry was created.</source>
+                       </trans-unit>
+                       <trans-unit id="crdate.details" xml:space="preserve">
+                               <source>
+                                       All entries corresponding to a single log run are marked with the same date and time.
+                               </source>
+                       </trans-unit>
+                       <trans-unit id="message.alttitle" xml:space="preserve">
+                               <source>Log message</source>
+                       </trans-unit>
+                       <trans-unit id="message.description" xml:space="preserve">
+                               <source>The main message of the log entry.</source>
+                       </trans-unit>
+                       <trans-unit id="severity.alttitle" xml:space="preserve">
+                               <source>Severity</source>
+                       </trans-unit>
+                       <trans-unit id="severity.description" xml:space="preserve">
+                               <source>The severity gives you an impression of how serious the logged event is.</source>
+                       </trans-unit>
+                       <trans-unit id="severity.details" xml:space="preserve">
+                               <source>
+                                       There are five levels of severity, the higher the number, the more serious the event:
+                                       Ok: These events indicate that everything went fine, no error occurred (at least up to that point where the event was created). No action needs to be taken.
+                                       Info: These events are purely informational. They are normally used for debugging purposes only and require no special action.
+                                       Notice: Abnormal condition, but not blocking. Notices are meant to raise attention. Processes have been completed, but things are not running as smoothly as they could and the condition should be investigated.
+                                       Warning: These events are used to notify significant problems. Processes have been completed, but parts of them may be missing, wrong or corrupted. Warnings should not be ignored and action should definitely be taken.
+                                       Error: These events signal that something went fatally wrong. Processes were not completed and action is definitely needed. Alternately this level may be used to point to a failed event, but in a process where failure can be expected, e.g. a login attempt with the wrong password.
+                               </source>
+                       </trans-unit>
+                       <trans-unit id="extkey.alttitle" xml:space="preserve">
+                               <source>Extension</source>
+                       </trans-unit>
+                       <trans-unit id="extkey.description" xml:space="preserve">
+                               <source>The component which triggered the event</source>
+                       </trans-unit>
+                       <trans-unit id="extkey.details" xml:space="preserve">
+                                       <source>
+                                       The value is either an extension key or a reference to the core itself or some part of it. It depends on the logging implementation of the component which has triggered the event.
+                                       One hint about excluded keys: There's an option in the extension manager to exclude some keys from being logged. Notice that if there were events registered with that key before you excluded it, those events will still be visible in the list.
+                               </source>
+                       </trans-unit>
+                       <trans-unit id="location.alttitle" xml:space="preserve">
+                               <source>Call location (class)</source>
+                       </trans-unit>
+                       <trans-unit id="location.description" xml:space="preserve">
+                               <source>The class from which the devLog() call was made.</source>
+                       </trans-unit>
+                       <trans-unit id="line.alttitle" xml:space="preserve">
+                               <source>Call location (line)</source>
+                       </trans-unit>
+                       <trans-unit id="line.description" xml:space="preserve">
+                               <source>The line at which devLog() call was made (in the class indicated in the "location" field).</source>
+                       </trans-unit>
+                       <trans-unit id="ip.alttitle" xml:space="preserve">
+                               <source>Referrer</source>
+                       </trans-unit>
+                       <trans-unit id="ip.description" xml:space="preserve">
+                               <source>IP address of the referring request.</source>
+                       </trans-unit>
+                       <trans-unit id="cruser_id.alttitle" xml:space="preserve">
+                               <source>User</source>
+                       </trans-unit>
+                       <trans-unit id="cruser_id.description" xml:space="preserve">
+                               <source>The BE user which was logged in the backend and triggered the event (if any).</source>
+                       </trans-unit>
+                       <trans-unit id="cruser_id.details" xml:space="preserve">
+                               <source>This field is useful, if multiple BE users are triggering events at the same time, on the same pages or with the same components.</source>
+                       </trans-unit>
+                       <trans-unit id="extra_data.alttitle" xml:space="preserve">
+                               <source>Extra data</source>
+                       </trans-unit>
+                       <trans-unit id="extra_data.description" xml:space="preserve">
+                               <source>Extra data can provide an array with detailed information about the circumstances of the event.</source>
+                       </trans-unit>
+                       <trans-unit id="extra_data.details" xml:space="preserve">
+                               <source>
+                                       There are almost no boundaries for this field, except that it is an array. In many cases, this field can contain the processed data, when the event has been triggered. For example, you could get the full stack debug trace when there is an SQL error. Another showcase would be to deliver be the relevant TS setup parts or any other configuration array.
+                                       The value depends on the logging implementation of the component which has triggered the event.
+                               </source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf
new file mode 100644 (file)
index 0000000..bb80867
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2014-10-15T16:49:33Z" product-name="devlog">
+               <header/>
+               <body>
+                       <trans-unit id="tx_devlog_domain_model_entry">
+                               <source>Developer's Log Entry</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.crdate">
+                               <source>Log date</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.cruser_id">
+                               <source>BE User</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.severity">
+                               <source>Severity</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.extkey">
+                               <source>Extkey</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.message">
+                               <source>Message</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.location">
+                               <source>Location</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.ip">
+                               <source>Ip</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.line">
+                               <source>Line</source>
+                       </trans-unit>
+                       <trans-unit id="tx_devlog_domain_model_entry.extra_data">
+                               <source>Extra data</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
\ No newline at end of file
diff --git a/Resources/Private/Templates/index.html b/Resources/Private/Templates/index.html
deleted file mode 100644 (file)
index 38b6766..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<div id="typo3-docheader">
-       <div id="typo3-docheader-row1">
-               <div class="buttonsleft"></div>
-               <div class="buttonsright">
-                       <div class="buttongroup">
-                               ###SHORTCUT###
-                       </div>
-               </div>
-       </div>
-       <div id="typo3-docheader-row2">
-               <div class="docheader-row2-left">
-                       <div class="buttongroup">
-<!--                           <form name="options" action="" method="post">
-                                       ###MENUBAR###
-                               </form>-->
-                       </div>
-               </div>
-               <div class="docheader-row2-right">
-                       <!-- clear log menu -->
-                       <form method="post" action="" name="cleanPeriod">
-                               <!-- cleanPeriod cleanExt cleanAll-->
-                               ###CLEARMENU###
-                               ###OPEN_NEW_VIEW###
-                       </form>
-               </div>
-       </div>
-</div>
-<div id="typo3-docbody">
-       <div id="typo3-inner-docbody">
-
-               <!-- MAIN Header in page top -->
-               ###HEADER###
-               ###MESSAGE###
-               <br />
-               <div id="t3-log-grid"></div>
-<!--###CONTENT###-->
-       </div>
-       <!-- Fields required for history management -->
-       <form id="history-form" class="x-hidden">
-               <input type="hidden" id="x-history-field" />
-
-               <iframe id="x-history-frame"></iframe>
-       </form>
-
-</div>
\ No newline at end of file
diff --git a/Resources/Public/Icons/Entry.png b/Resources/Public/Icons/Entry.png
new file mode 100644 (file)
index 0000000..7dfe426
Binary files /dev/null and b/Resources/Public/Icons/Entry.png differ
diff --git a/Resources/Public/images/icons/application_put.png b/Resources/Public/images/icons/application_put.png
deleted file mode 100755 (executable)
index c30cf59..0000000
Binary files a/Resources/Public/images/icons/application_put.png and /dev/null differ
diff --git a/Resources/Public/images/icons/arrow_rotate_clockwise.png b/Resources/Public/images/icons/arrow_rotate_clockwise.png
deleted file mode 100755 (executable)
index aa65210..0000000
Binary files a/Resources/Public/images/icons/arrow_rotate_clockwise.png and /dev/null differ
diff --git a/Resources/Public/images/icons/csh_severities.png b/Resources/Public/images/icons/csh_severities.png
deleted file mode 100644 (file)
index 3ed7dc0..0000000
Binary files a/Resources/Public/images/icons/csh_severities.png and /dev/null differ
diff --git a/Resources/Public/images/icons/error.png b/Resources/Public/images/icons/error.png
deleted file mode 100755 (executable)
index c7f6f96..0000000
Binary files a/Resources/Public/images/icons/error.png and /dev/null differ
diff --git a/Resources/Public/images/icons/information.png b/Resources/Public/images/icons/information.png
deleted file mode 100755 (executable)
index 157fe4f..0000000
Binary files a/Resources/Public/images/icons/information.png and /dev/null differ
diff --git a/Resources/Public/images/icons/loading.gif b/Resources/Public/images/icons/loading.gif
deleted file mode 100755 (executable)
index 529e72f..0000000
Binary files a/Resources/Public/images/icons/loading.gif and /dev/null differ
diff --git a/Resources/Public/images/icons/notification.png b/Resources/Public/images/icons/notification.png
deleted file mode 100755 (executable)
index 1bcc1f4..0000000
Binary files a/Resources/Public/images/icons/notification.png and /dev/null differ
diff --git a/Resources/Public/images/icons/ok.png b/Resources/Public/images/icons/ok.png
deleted file mode 100755 (executable)
index 1d652c4..0000000
Binary files a/Resources/Public/images/icons/ok.png and /dev/null differ
diff --git a/Resources/Public/images/icons/warning.png b/Resources/Public/images/icons/warning.png
deleted file mode 100755 (executable)
index 61d827e..0000000
Binary files a/Resources/Public/images/icons/warning.png and /dev/null differ
diff --git a/Resources/Public/javascripts/Application.js b/Resources/Public/javascripts/Application.js
deleted file mode 100644 (file)
index 0cfb252..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-Ext.ns("TYPO3.Devlog");
-
-/**
- * @class TYPO3.Devlog.Application
- * @namespace TYPO3.Devlog
- * @extends Ext.util.Observable
- *
- * The main entry point which controls the lifecycle of the application.
- *
- * This is the main event handler of the application.
- *
- * First, it calls all registered bootstrappers, thus other modules can register event listeners.
- * Afterwards, the bootstrap procedure is started. During bootstrap, it will initialize:
- * <ul><li>QuickTips</li>
- * <li>History Manager</li></ul>
- *
- * @singleton
- */
-TYPO3.Devlog.Application = Ext.apply(new Ext.util.Observable, {
-       /**
-        * @event TYPO3.Devlog.Application.afterBootstrap
-        * After bootstrap event. Should be used for main initialization.
-        */
-
-       bootstrappers: [],
-
-       /**
-        * Main bootstrap. This is called by Ext.onReady and calls all registered bootstraps.
-        *
-        * This method is called automatically.
-        */
-       bootstrap: function() {
-               this._configureExtJs();
-//             this._initializeExtDirect();
-               this._registerEventDebugging();
-               this._invokeBootstrappers();
-
-               Ext.QuickTips.init();
-
-               this.fireEvent('TYPO3.Devlog.Application.afterBootstrap');
-               
-               this._initializeHistoryManager();
-       },
-
-       /**
-        * Registers a new bootstrap class.
-        *
-        * Every bootstrap class needs to extend TYPO3.Devlog.Application.AbstractBootstrap.
-        * @param {TYPO3.Devlog.Application.AbstractBootstrap} bootstrap The bootstrap class to be registered.
-        * @api
-        */
-       registerBootstrap: function(bootstrap) {
-               this.bootstrappers.push(bootstrap);
-       },
-
-
-       // pirvate
-       /**
-        * Initialize Ext.Direct Provider
-        */
-//     _initializeExtDirect: function() {
-//             Ext.app.ExtDirectAPI.enableBuffer = 100;
-//             Ext.Direct.addProvider(Ext.app.ExtDirectAPI);
-//     },
-
-       // private
-       /**
-        * Sets the blank image URL
-        */
-       _configureExtJs: function() {
-//             Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';
-       },
-
-       /**
-        * Invoke the registered bootstrappers.
-        */
-       _invokeBootstrappers: function() {
-               Ext.each(this.bootstrappers, function(bootstrapper) {
-                       bootstrapper.initialize();
-               });
-       },
-
-       _initializeHistoryManager: function() {
-               Ext.History.on('change', function(token) {
-                       this.fireEvent('TYPO3.Devlog.Application.navigate', token);
-               }, this);
-               // Handle initial token (on page load)
-               Ext.History.init(function(history) {
-                       history.fireEvent('change', history.getToken());
-               }, this);
-       },
-
-       _registerEventDebugging: function() {
-               Ext.util.Observable.capture(
-                       this,
-                       function(e) {
-                               if (window.console && window.console.log) {
-                                       console.log(e, arguments);
-                               }
-                       }
-               );
-       }
-
-});
-
-Ext.onReady(TYPO3.Devlog.Application.bootstrap, TYPO3.Devlog.Application);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Application/AbstractBootstrap.js b/Resources/Public/javascripts/Application/AbstractBootstrap.js
deleted file mode 100644 (file)
index b9cb5c4..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-Ext.ns("TYPO3.Devlog.Application");
-
-/**
- * @class TYPO3.Devlog.Application.AbstractBootstrap
- * @namespace TYPO3.Devlog.Application
- * @extends Ext.util.Observable
- *
- * Base class for all bootstrappers. This class provides convenience methods for extending the user interface.
- */
-TYPO3.Devlog.Application.AbstractBootstrap = Ext.extend(Ext.util.Observable, {
-
-       /**
-        * This method is called by the main application, and inside, you should
-        * register event listeners as needed.
-        *
-        * Example:
-        * <pre>TYPO3.Devlog.Application.on([name of event], [callback], [scope]);</pre>
-        *
-        * @method initialize
-        */
-
-       /**
-        * Add items to a menu.
-        *
-        * TODO: Examples
-        * @param {Array} path The path where the menu items should be added. The first element is the menu-ID, the other elements are the itemIDs of the menu items.
-        * @param {Array} The items to add
-        */
-       addToMenu: function(path, items) {
-               TYPO3.Devlog.Application.MenuRegistry.addMenuItems(path, items);
-       },
-
-       /**
-        * Add a module dialog to a menu. A module dialog will be displayed in the header, and pushes the content area down.
-        *
-        * TODO: parameters
-        */
-       addModuleDialog: function(path, moduleDialogConfig, contentDialogConfig) {
-               this.handleButtonPress(path, function(button) {
-                       var moduleDialog;
-                       moduleDialog = button.findParentByType(TYPO3.Devlog.UserInterface.ModuleMenu).showModuleDialog(moduleDialogConfig, contentDialogConfig);
-                       // Untoggle button on module dialog destroy
-                       moduleDialog.on('destroy', function() {
-                               button.toggle(false);
-                       });
-               });
-               this.handleButtonUnpress(path, function(button) {
-                       button.findParentByType(TYPO3.Devlog.UserInterface.ModuleMenu).removeModuleDialog();
-               });
-       },
-
-       /**
-        * Handle generic button press of a menu button.
-        *
-        * @param {Array} path The path to the button
-        * @param {Function} callback the callback
-        * @param {Object} scope
-        */
-       handleButtonPress: function(path, callback, scope) {
-               var joinedPath = path.join('-');
-               TYPO3.Devlog.Application.MenuRegistry.on('TYPO3.Devlog.UserInterface.RootlineMenu.buttonPressed', function(button) {
-                       if (button.getFullPath() === joinedPath) {
-                               callback.call(scope, button);
-                       }
-               });
-       },
-
-       /**
-        * Handle generic button unpress of a menu button.
-        *
-        * @param {Array} path The path to the button
-        * @param {Function} callback the callback
-        * @param {Object} scope
-        */
-       handleButtonUnpress: function(path, callback, scope) {
-               var joinedPath = path.join('-');
-               TYPO3.Devlog.Application.MenuRegistry.on('TYPO3.Devlog.UserInterface.RootlineMenu.buttonUnpressed', function(button) {
-                       if (button.getFullPath() === joinedPath) {
-                               callback.call(scope, button);
-                       }
-               });
-       },
-
-       /**
-        * Add an element to the content area.
-        *
-        * TODO: parameters
-        */
-       addContentArea: function(sectionId, itemId, config) {
-               TYPO3.Devlog.Application.on('TYPO3.Devlog.UserInterface.ContentArea.afterInit', function(contentArea) {
-                       if (sectionId + '-contentArea' === contentArea.itemId) {
-                               contentArea.add(Ext.apply(config, {
-                                       itemId: itemId
-                               }));
-                       }
-               });
-       },
-
-       /**
-        * Handle a navigation token for the history manager.
-        *
-        * @param {RegExp} regexp the callback is called if the regexp matches
-        * @param {function} callback Callback to be called
-        * @param scope
-        */
-       handleNavigationToken: function(regexp, callback, scope) {
-               scope = scope || this;
-               TYPO3.Devlog.Application.on('TYPO3.Devlog.Application.navigate', function(token) {
-                       var matches = token && token.match(regexp);
-                       if (matches) {
-                               callback.createDelegate(this, matches).call();
-                       }
-               }, scope);
-       }
-});
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Listing/Bootstrap.js b/Resources/Public/javascripts/Listing/Bootstrap.js
deleted file mode 100644 (file)
index db12130..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Ext.ns("TYPO3.Devlog.Listing");
-
-/**
- * @class TYPO3.Devlog.Listing.Bootstrap
- * @namespace TYPO3.Devlog.Listing
- * @extends TYPO3.Newsletter.Application.AbstractBootstrap
- *
- * Bootrap module statistics
- *
- * $Id$
- */
-TYPO3.Devlog.Listing.Bootstrap = Ext.apply(new TYPO3.Devlog.Application.AbstractBootstrap, {
-       initialize: function() {
-
-       }
-});
-
-TYPO3.Devlog.Application.registerBootstrap(TYPO3.Devlog.Listing.Bootstrap);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Listing/ExtensionList.js b/Resources/Public/javascripts/Listing/ExtensionList.js
deleted file mode 100644 (file)
index da02c01..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-Ext.ns("TYPO3.Devlog.Listing");
-
-/**
- * Button of the rootline menu
- * @class TYPO3.Devlog.Listing.ExtensionList
- * @extends Ext.ExtensionList
- */
-TYPO3.Devlog.Listing.ExtensionList = Ext.extend(Ext.form.ComboBox, {
-       
-       /**
-        * Event triggered after initialization of the main area.
-        *
-        * @event TYPO3.Devlog.Listing.ExtensionList.afterInit
-        *
-        */
-       initComponent: function() {
-               var config = {
-                       store: TYPO3.Devlog.Store.initExtensionListStore(),
-                       typeAhead: false,
-                       forceSelection: true,
-                       triggerAction: 'all',
-                       editable: false,
-                       selectOnFocus: true,
-                       listClass: 'x-combo-list-small',
-                       plugins: new TYPO3.Devlog.UserInterface.IconCombo(),
-                       width: 'auto',
-                       mode: 'local',
-                       valueField: 'key',
-                       displayField: 'value',
-                       iconClsField: 'className'
-               };
-               
-               Ext.apply(this, config);
-               TYPO3.Devlog.Listing.ExtensionList.superclass.initComponent.call(this);
-               TYPO3.Devlog.Application.fireEvent('TYPO3.Devlog.Listing.afterInit', this);
-
-               this.on(
-                       'afterrender',
-                       this.onafterrender,
-                       this
-               );
-
-               this.on(
-                       'select',
-                       this.onselect,
-                       this
-               );
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onafterrender: function() {
-               this.setValue('');
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onselect: function() {
-               TYPO3.Devlog.Store.LogStore.baseParams.extKey = this.value
-               if (this.value == '') {
-                       delete TYPO3.Devlog.Store.LogStore.baseParams.extKey;
-               }
-               TYPO3.Devlog.Store.LogStore.load();
-       }
-
-});
-
-Ext.reg('TYPO3.Devlog.Listing.ExtensionList', TYPO3.Devlog.Listing.ExtensionList);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Listing/LogGrid.js b/Resources/Public/javascripts/Listing/LogGrid.js
deleted file mode 100644 (file)
index 7768702..0000000
+++ /dev/null
@@ -1,389 +0,0 @@
-Ext.ns("TYPO3.Devlog.Listing");
-
-/**
- * Button of the rootline menu
- * @class TYPO3.Devlog.Listing.LogGrid
- * @extends Ext.LogGrid
- */
-TYPO3.Devlog.Listing.LogGrid = Ext.extend(Ext.grid.GridPanel, {
-       
-       /**
-        * Event triggered after initialization of the main area.
-        *
-        * @event TYPO3.Devlog.Listing.LogGrid.afterInit
-        *
-        */
-       initComponent: function() {
-
-               // Init the row expander plugin
-               this._initRowExpander();
-
-               var config = {
-                       store: TYPO3.Devlog.Store.LogStore,
-                       columns: this._getColumns(),
-                       stripeRows: true,
-                       columnLines: true,
-                       autoExpandColumn: 'msg',
-                       height: 350,
-                       width: 'auto',
-                       plugins: TYPO3.Devlog.UserInterface.expander,
-
-                       // loading mask configuration
-                       loadMask: {
-                               msg: TYPO3.Devlog.Language.loading
-                       },
-
-                       // custom  view configuration
-                       viewConfig: {
-//                             enableRowBody: true,
-//                             showPreview: true,
-//                             getRowClass : function(record, rowIndex, p, store){
-//                                     if(this.showPreview){
-//                                             p.body = '<p>' + record.data.data_var + '</p>';
-//                                             return 'x-grid3-row-expanded';
-//                                     }
-//                                     return 'x-grid3-row-collapsed';
-//                             }
-                       },
-
-                       // Top Bar
-                       tbar: [
-                               {
-                                       xtype: 'TYPO3.Devlog.Listing.TimeList',
-                                       ref: '../timeList'
-                               }, {
-                                       xtype: 'tbspacer'
-                               }, {
-                                       xtype: 'TYPO3.Devlog.Listing.SeverityList',
-                                       ref: '../severityList'
-                               }, {
-                                       xtype: 'tbspacer'
-                               }, {
-                                       xtype: 'TYPO3.Devlog.Listing.ExtensionList',
-                                       ref: '../extensionList'
-                               }, {
-                                       xtype: 'tbspacer'
-                               }, {
-                                       xtype: 'TYPO3.Devlog.Listing.PageList',
-                                       ref: '../pageList'
-                               }, {
-                                       xtype: 'tbfill'
-                               }, {
-                                       pressed: false,
-                                       enableToggle: true,
-                                       xtype: 'button',
-                                       text: TYPO3.Devlog.Language.expand_all_extra_data,
-                                       cls: 'x-btn-text-icon expandall',
-                                       toggleHandler: this.ontoggleexpand
-                               }, {
-                                       xtype: 'tbspacer'
-                               }, {
-                                       pressed: false,
-                                       enableToggle: true,
-                                       text: TYPO3.Devlog.Language.auto_refresh,
-                                       cls: 'x-btn-text-icon reload',
-                                       toggleHandler: this.ontoggleautorefresh
-                               }
-
-                       ],
-
-                       // Button Bar
-                       bbar: [
-                               new Ext.PagingToolbar({
-                                       store: TYPO3.Devlog.Store.LogStore,        // grid and PagingToolbar using same store
-                                       displayInfo: true,
-                                       pageSize: TYPO3.Devlog.Preferences.pageSize,
-                                       prependButtons: true,
-                                       ref: '../pagebrowser'
-                               }),
-                               '->',
-                               TYPO3.Devlog.Data.LogPeriod
-                       ]
-               };
-               
-               Ext.apply(this, config);
-               TYPO3.Devlog.Listing.LogGrid.superclass.initComponent.call(this);
-               TYPO3.Devlog.Application.fireEvent('TYPO3.Devlog.Listing.afterInit', this);
-
-               // Adds behaviour when grid is refreshed.
-               this.getView().on(
-                       'refresh',
-                       this.onrefresh,
-                       this.getView()
-               );
-
-               this.on(
-                       'afterrender',
-                       this.onafterrender,
-                       this
-               );
-       },
-
-       /**
-        * Hides the "collapse / expand" "+"when no data_var is defined
-        *
-        * @access public
-        * @method onrefresh
-        * @return void
-        */
-       onrefresh: function() {
-               var numberOfRows = TYPO3.Devlog.Store.LogStore.getCount();
-
-               for (index = 0; index < numberOfRows; index++) {
-
-                       var row = this.getRow(index);
-                       var record = TYPO3.Devlog.Store.LogStore.getAt(index);
-
-                       // if no data is found, hides the "+"
-                       if (!record.data['has_data_var']) {
-                               // Fetches DOM element
-                               var expanderButton = Ext.query('div.x-grid3-row-expander', row)[0];
-                               Ext.get(expanderButton).removeClass('x-grid3-row-expander')
-                       }
-               }
-
-               // Fix a visual bug.
-               // If the "+" has already been hit, it will never come back to "+" again by click on the refreh button
-               Ext.each(Ext.select('.x-grid3-row-expanded').elements, function(element) {
-                       Ext.get(element).removeClass('x-grid3-row-expanded').addClass('x-grid3-row-collapse');
-               });
-
-
-               // Binding an event on crdate link to filter log run at the same time
-               Ext.select('.devlog-link-crdate').on('click', function() {
-                       var uid = this.id.replace('devlog-link-generated-', '');
-                       var record = TYPO3.Devlog.Store.LogStore.getById(uid);
-                       TYPO3.Devlog.Store.LogStore.baseParams.limit = record.data['crmsec'];
-                       TYPO3.Devlog.UserInterface.container.logGrid.pagebrowser.pageSize = record.data['crmsec'];
-                       TYPO3.Devlog.Store.LogStore.load();
-                       TYPO3.Devlog.UserInterface.container.logGrid.timeList.fireEvent('onclickoncrdatecell');
-               });
-       },
-
-       /**
-        * Collapse / expand data_var
-        *
-        * @access public
-        * @method ontoggleexpand
-        * @param {Object} button
-        * @param {bool} pressed
-        * @return void
-        */
-       ontoggleexpand: function(button, pressed){
-               var expander, row, view, numberOfRows, isCollapsed;
-
-               view = TYPO3.Devlog.UserInterface.container.logGrid.getView();
-               numberOfRows = TYPO3.Devlog.Store.LogStore.getCount();
-
-               for (index = 0; index < numberOfRows; index++) {
-                       row = view.getRow(index);
-                       expander = Ext.query('div.x-grid3-row-expander', row)[0];
-                       isCollapsed = Ext.get(row).hasClass('x-grid3-row-collapsed');
-                       
-                       // expander may be null if there is no extra data on the GUI => no arrow
-                       if (expander) {
-                               if ((pressed && isCollapsed) || (!pressed && !isCollapsed)) {
-                                       TYPO3.Devlog.Utils.fireEvent('mousedown', expander);
-                               }
-                               
-                       }
-               }
-       },
-
-       /**
-        * Auto refresh data
-        *
-        * @access public
-        * @method ontoggleexpand
-        * @param {Object} button
-        * @param {bool} pressed
-        * @return void
-        */
-       ontoggleautorefresh: function(button, pressed){
-               var task = {
-                       run: function(){
-                               // Basic request in Ext
-                               Ext.Ajax.request({
-                                  url: '/typo3/ajax.php',
-                                  params: {
-                                          ajaxID: 'LogController::getLastLogTime'
-                                  },
-                                  success: function(response){
-                                          if (TYPO3.Devlog.Data.LastLogTime != response.responseText) {
-                                                       TYPO3.Devlog.Data.LastLogTime = response.responseText;
-                                                       TYPO3.Devlog.Store.LogStore.load();
-                                          }
-                                  }
-                               });
-                       },
-                       interval: 1500
-               }
-               if (pressed) {
-                       Ext.TaskMgr.start(task);
-               }
-               else {
-                       Ext.TaskMgr.stopAll();
-               }
-
-       },
-
-       /**
-        * Renders the severity column
-        *
-        * @access private
-        * @method _renderSeverity
-        * @param {int} value: -1 OK, 0 Info, 1 Notice, 2 Warning, 3 Error
-        * @return string
-        */
-       _renderSeverity: function(value) {
-               var spriteName = 'extensions-devlog-';
-               switch (value) {
-                       case -1 : // OK
-                               spriteName += 'ok';
-                               break;
-                       case 0 : // Info
-                               spriteName += 'info';
-                               break;
-                       case 1 : // Notice
-                               spriteName += 'notification';
-                               break;
-                       case 2 : // Warning
-                               spriteName += 'warning';
-                               break;
-                       case 3 : // Error
-                               spriteName += 'error';
-                               break;
-               }
-               return String.format((spriteName) ? TYPO3.Devlog.Utils.getSpriteIcon(spriteName) : '');
-       },
-
-       /**
-        * Renders the "called from" column
-        *
-        * @access private
-        * @method _renderLocation
-        * @param {string} value
-        * @param {Object} parent
-        * @param {Object} record
-        * @return string
-        */
-       _renderLocation: function(value, parent, record) {
-               return String.format('{0}<br/>' + TYPO3.Devlog.Language.line + ' {1}', value, record.data['line']);
-       },
-
-       /**
-        * Renders the "crdate" column
-        *
-        * @access private
-        * @method _renderLocation
-        * @param {string} value
-        * @param {Object} parent
-        * @param {Object} record
-        * @return string
-        */
-       _renderCrdate: function(value, parent, record) {
-               var format = TYPO3.Devlog.Preferences.dateFormat + ' ' + TYPO3.Devlog.Preferences.timeFormat;
-               var result = Ext.util.Format.date(record.data['crdate'], format);
-               return '<a href="#" class="devlog-link-crdate" id="devlog-link-generated-' + record.id + '" onclick="return false">' + result + '</a>';
-       },
-
-       /**
-        * Returns the configuration array
-        *
-        * @access private
-        * @method _getColumns
-        * @return array
-        */
-       _getColumns: function() {
-               var columns = [
-                       TYPO3.Devlog.UserInterface.expander,
-                       {
-                               id: 'uid',
-                               dataIndex: 'uid',
-                               header: 'UID',
-                               width: 50,
-                               align: 'center',
-                               sortable: true
-                       }, {
-                               id: 'crdate',
-                               dataIndex: 'crdate',
-                               header: TYPO3.Devlog.Language.crdate,
-                               sortable: true,
-                               renderer: this._renderCrdate
-                       }, {
-                               id: 'severity',
-                               dataIndex: 'severity',
-                               header: TYPO3.Devlog.Language.severity,
-                               renderer: this._renderSeverity,
-                               width: 80,
-                               align: 'center',
-                               sortable: true
-                       }, {
-                               id: 'extkey',
-                               dataIndex: 'extkey_formatted',
-                               header: TYPO3.Devlog.Language.extkey,
-                               sortable: true
-                       }, {
-                               id: 'msg',
-                               dataIndex: 'msg',
-                               header: TYPO3.Devlog.Language.msg,
-                               renderer: this._renderMessage
-                       }, {
-                               id: 'location',
-                               dataIndex: 'location',
-                               header: TYPO3.Devlog.Language.location,
-                               width: 200,
-                               renderer: this._renderLocation
-                       }, {
-                               id: 'page',
-                               dataIndex: 'pid_formatted',
-                               header: TYPO3.Devlog.Language.pid,
-//                             width: 50,
-                               sortable: true
-                       }, {
-                               id: 'user',
-                               dataIndex: 'cruser_formatted',
-                               header: TYPO3.Devlog.Language.cruser_id,
-                               width: 50,
-                               sortable: true
-                       }, {
-                               id: 'line',
-                               dataIndex: 'line',
-                               header: TYPO3.Devlog.Language.line,
-                               hidden: true
-                       },
-               ];
-               return columns;
-       },
-
-       /**
-        * Initialize the row expander
-        *
-        * @method _initRowExpander
-        * @return void
-        */
-       _initRowExpander: function() {
-               TYPO3.Devlog.UserInterface.expander = new TYPO3.Devlog.UserInterface.AjaxRowExpander();
-
-               // Row expander without ajax
-               //TYPO3.Devlog.UserInterface.expander = new TYPO3.Devlog.UserInterface.RowExpander({
-               //              tpl : new Ext.Template(
-               //                      '{data_var}'
-               //              )
-               //});
-       },
-
-       /**
-        * Resizes the grid to fit the window
-        *
-        * @method onafterrender
-        * @return void
-        */
-       onafterrender: function() {
-               // 120 is an empiric value... maybe a better way to implement that ;)
-               this.setHeight(window.innerHeight - 120);
-       }
-
-});
-
-Ext.reg('TYPO3.Devlog.Listing.LogGrid', TYPO3.Devlog.Listing.LogGrid);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Listing/PageList.js b/Resources/Public/javascripts/Listing/PageList.js
deleted file mode 100644 (file)
index f1fa15c..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-Ext.ns("TYPO3.Devlog.Listing");
-
-/**
- * Button of the rootline menu
- * @class TYPO3.Devlog.Listing.PageList
- * @extends Ext.PageList
- */
-TYPO3.Devlog.Listing.PageList = Ext.extend(Ext.form.ComboBox, {
-       
-       /**
-        * Event triggered after initialization of the main area.
-        *
-        * @event TYPO3.Devlog.Listing.PageList.afterInit
-        *
-        */
-       initComponent: function() {
-               var config = {
-                       store: TYPO3.Devlog.Store.initPageListStore(),
-                       typeAhead: false,
-                       forceSelection: true,
-                       triggerAction: 'all',
-                       editable: false,
-                       selectOnFocus: true,
-                       listClass: 'x-combo-list-small',
-                       plugins: new TYPO3.Devlog.UserInterface.IconCombo(),
-                       width: 'auto',
-                       mode: 'local',
-                       valueField: 'key',
-                       displayField: 'value',
-                       iconClsField: 'className'
-               };
-               
-               Ext.apply(this, config);
-               TYPO3.Devlog.Listing.PageList.superclass.initComponent.call(this);
-               TYPO3.Devlog.Application.fireEvent('TYPO3.Devlog.Listing.afterInit', this);
-
-               this.on(
-                       'afterrender',
-                       this.onafterrender,
-                       this
-               );
-
-               this.on(
-                       'select',
-                       this.onselect,
-                       this
-               );
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onafterrender: function() {
-               this.setValue('');
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onselect: function() {
-               TYPO3.Devlog.Store.LogStore.baseParams.pid = this.value
-               if (this.value == '') {
-                       delete TYPO3.Devlog.Store.LogStore.baseParams.pid;
-               }
-               TYPO3.Devlog.Store.LogStore.load();
-       }
-
-});
-
-Ext.reg('TYPO3.Devlog.Listing.PageList', TYPO3.Devlog.Listing.PageList);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Listing/SeverityList.js b/Resources/Public/javascripts/Listing/SeverityList.js
deleted file mode 100644 (file)
index f17966e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-Ext.ns("TYPO3.Devlog.Listing");
-
-/**
- * Button of the rootline menu
- * @class TYPO3.Devlog.Listing.SeverityList
- * @extends Ext.SeverityList
- */
-TYPO3.Devlog.Listing.SeverityList = Ext.extend(Ext.form.ComboBox, {
-       
-       /**
-        * Event triggered after initialization of the main area.
-        *
-        * @event TYPO3.Devlog.Listing.SeverityList.afterInit
-        *
-        */
-       initComponent: function() {
-               var config = {
-                       store: TYPO3.Devlog.Store.initSeverityListStore(),
-                       typeAhead: false,
-                       forceSelection: true,
-                       triggerAction: 'all',
-                       editable: false,
-                       selectOnFocus: true,
-                       listClass: 'x-combo-list-small',
-                       plugins: new TYPO3.Devlog.UserInterface.IconCombo(),
-                       mode: 'local',
-                       valueField: 'key',
-                       displayField: 'value',
-                       iconClsField: 'className'
-               };
-               
-               Ext.apply(this, config);
-               TYPO3.Devlog.Listing.SeverityList.superclass.initComponent.call(this);
-               TYPO3.Devlog.Application.fireEvent('TYPO3.Devlog.Listing.afterInit', this);
-
-               this.on(
-                       'afterrender',
-                       this.onafterrender,
-                       this
-               );
-
-               this.on(
-                       'select',
-                       this.onselect,
-                       this
-               );
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onafterrender: function() {
-               this.setValue('');
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onselect: function() {
-               TYPO3.Devlog.Store.LogStore.baseParams.severity = this.value
-               if (this.value == '') {
-                       delete TYPO3.Devlog.Store.LogStore.baseParams.severity;
-               }
-               TYPO3.Devlog.Store.LogStore.load();
-       }
-
-});
-
-Ext.reg('TYPO3.Devlog.Listing.SeverityList', TYPO3.Devlog.Listing.SeverityList);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Listing/TimeList.js b/Resources/Public/javascripts/Listing/TimeList.js
deleted file mode 100644 (file)
index 7677e6d..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-Ext.ns("TYPO3.Devlog.Listing");
-
-/**
- * Button of the rootline menu
- * @class TYPO3.Devlog.Listing.TimeList
- * @extends Ext.TimeList
- */
-TYPO3.Devlog.Listing.TimeList = Ext.extend(Ext.form.ComboBox, {
-       
-       /**
-        * Event triggered after initialization of the main area.
-        *
-        * @event TYPO3.Devlog.Listing.TimeList.afterInit
-        *
-        */
-       initComponent: function() {
-               var config = {
-                       store: TYPO3.Devlog.Store.initTimeListStore(),
-                       typeAhead: false,
-                       forceSelection: true,
-                       triggerAction: 'all',
-                       editable: false,
-                       selectOnFocus: true,
-                       listClass: 'x-combo-list-small',
-                       mode: 'local',
-                       valueField: 'key',
-                       displayField: 'value'
-               };
-               
-               Ext.apply(this, config);
-               TYPO3.Devlog.Listing.TimeList.superclass.initComponent.call(this);
-               TYPO3.Devlog.Application.fireEvent('TYPO3.Devlog.Listing.afterInit', this);
-
-               this.on(
-                       'afterrender',
-                       this.onafterrender,
-                       this
-               );
-
-               this.on(
-                       'select',
-                       this.onselect,
-                       this
-               );
-
-               this.on(
-                       'onclickoncrdatecell',
-                       this.onclickoncrdatecell,
-                       this
-               );
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onafterrender: function() {
-               this.setValue(25);
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onselect: function() {
-               var value = this.value - 0; // makes sure it is a number
-               TYPO3.Devlog.Store.LogStore.baseParams.limit = value;
-               TYPO3.Devlog.UserInterface.container.logGrid.pagebrowser.pageSize = value
-               TYPO3.Devlog.Store.LogStore.load();
-       },
-
-       /**
-        * Defines default value
-        *
-        * @access public
-        * @method onafterrender
-        * @return void
-        */
-       onclickoncrdatecell: function() {
-               this.setValue(-1);
-       }
-
-});
-
-Ext.reg('TYPO3.Devlog.Listing.TimeList', TYPO3.Devlog.Listing.TimeList);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Override/GridPanel.js b/Resources/Public/javascripts/Override/GridPanel.js
deleted file mode 100644 (file)
index 11309bf..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * How to select text in the grid (with the mouse) so that it can be copied to the clipboard
- * http://www.extjs.com/learn/Ext_FAQ_Grid#How_to_select_text_in_the_grid_.28with_the_mouse.29_so_that_it_can_be_copied_to_the_clipboard
- *
- */
-if (!Ext.grid.GridView.prototype.templates) {
-   Ext.grid.GridView.prototype.templates = {};
-}
-Ext.grid.GridView.prototype.templates.cell = new Ext.Template(
-   '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} x-selectable {css}" style="{style}; cursor: text" tabIndex="0" {cellAttr}>',
-               '<div class="x-grid3-cell-inner x-grid3-col-{id}" {attr}>{value}</div>',
-   '</td>'
-);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Store/Bootstrap.js b/Resources/Public/javascripts/Store/Bootstrap.js
deleted file mode 100644 (file)
index 9585c00..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Ext.ns("TYPO3.Devlog.Store");
-
-// TODO: DOKU FOR TYPO3.Devlog.Store;
-
-TYPO3.Devlog.Store.Bootstrap = Ext.apply(new TYPO3.Devlog.Application.AbstractBootstrap, {
-       initialize: function() {
-               TYPO3.Devlog.Application.on('TYPO3.Devlog.Application.afterBootstrap', this.initStore, this);
-       },
-       initStore: function() {
-               // Ext Direct integration
-//             for (var api in Ext.app.ExtDirectAPI) {
-//                     Ext.Direct.addProvider(Ext.app.ExtDirectAPI[api]);
-//             }
-//             TYPO3.Devlog.Store.LogStore = TYPO3.Devlog.initLogDirectStore()
-               TYPO3.Devlog.Store.LogStore = TYPO3.Devlog.Store.initLogJsonStore()
-       }
-});
-
-TYPO3.Devlog.Application.registerBootstrap(TYPO3.Devlog.Store.Bootstrap);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Store/ExtensionListStore.js b/Resources/Public/javascripts/Store/ExtensionListStore.js
deleted file mode 100644 (file)
index bf90e37..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Ext.ns("TYPO3.Devlog.Store");
-
-TYPO3.Devlog.Store.initExtensionListStore = function() {
-       return new Ext.data.ArrayStore({
-               fields: ['key', 'value', 'className'],
-               data : TYPO3.Devlog.Data.ExtensionList
-       });
-}
diff --git a/Resources/Public/javascripts/Store/LogDirectStore.js b/Resources/Public/javascripts/Store/LogDirectStore.js
deleted file mode 100644 (file)
index d8bc4b5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-Ext.ns("TYPO3.Devlog.Store");
-
-TYPO3.Devlog.initLogDirectStore = function() {
-       return new Ext.data.DirectStore({
-               paramsAsHash: true,
-               autoLoad: true,
-               directFn: TYPO3.Devlog.Remote.indexAction
-               // @todo check why it does not work with metaData attribute
-//             idProperty: 'uid',
-//             root: 'records',
-//             totalProperty: 'total',
-//             fields: [
-//                     {name: 'uid', type:'int'},
-//                     {name: 'pid', type:'int'},
-//                     {name: 'crdate', type:'date', dateFormat:'timestamp'},
-//                     {name: 'crmsec', type:'date', dateFormat:'timestamp'},
-//                     {name: 'cruser_id', type:'int'},
-//                     {name: 'severity', type:'int'},
-//                     {name: 'extkey', type:'string'},
-//                     {name: 'msg', type:'string'},
-//                     {name: 'location', type:'string'},
-//                     {name: 'line', type:'string'},
-//                     {name: 'data_var', type:'string'}
-//             ]
-       });
-}
diff --git a/Resources/Public/javascripts/Store/LogJsonStore.js b/Resources/Public/javascripts/Store/LogJsonStore.js
deleted file mode 100644 (file)
index 0f0ff5c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Ext.ns("TYPO3.Devlog.Store");
-
-TYPO3.Devlog.Store.initLogJsonStore = function() {
-       return new Ext.data.JsonStore({
-               storeId: 'logStore',
-               autoLoad: true,
-               remoteSort: true,
-               baseParams: {
-                       ajaxID: 'LogController::indexAction',
-                       limit: TYPO3.Devlog.Preferences.pageSize
-               },
-               proxy: new Ext.data.HttpProxy({
-                       method: 'GET',
-                       url: '/typo3/ajax.php'
-               }),
-
-               listeners : {
-                       load: function (element, data) {
-                               // Decides whether to sort server side or client side
-//                             if (element.reader.jsonData.total > element.getCount()) {
-//                                     element.remoteSort = true;
-//                             }
-//                             else {
-//                                     element.remoteSort = false;
-//                             }
-
-                               // @debug like a double click on the first row
-//                             var sm = Contact.grid.getSelectionModel();
-//                             sm.selectFirstRow();
-//                             Contact.window.edit('single');
-                       }
-               }
-       });
-}
diff --git a/Resources/Public/javascripts/Store/PageListStore.js b/Resources/Public/javascripts/Store/PageListStore.js
deleted file mode 100644 (file)
index a3ca48e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Ext.ns("TYPO3.Devlog.Store");
-
-TYPO3.Devlog.Store.initPageListStore = function() {
-       return new Ext.data.ArrayStore({
-               fields: ['key', 'value', 'className'],
-               data : TYPO3.Devlog.Data.PageList
-       });
-}
diff --git a/Resources/Public/javascripts/Store/SeverityListStore.js b/Resources/Public/javascripts/Store/SeverityListStore.js
deleted file mode 100644 (file)
index f1d7080..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Ext.ns("TYPO3.Devlog.Store");
-
-TYPO3.Devlog.Store.initSeverityListStore = function() {
-       return new Ext.data.ArrayStore({
-               fields: ['key', 'value', 'className'],
-               data : TYPO3.Devlog.Data.SeverityList
-       });
-}
diff --git a/Resources/Public/javascripts/Store/TimeListStore.js b/Resources/Public/javascripts/Store/TimeListStore.js
deleted file mode 100644 (file)
index a11ae67..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Ext.ns("TYPO3.Devlog.Store");
-
-TYPO3.Devlog.Store.initTimeListStore = function() {
-       return new Ext.data.ArrayStore({
-               fields: ['key', 'value'],
-               data : TYPO3.Devlog.Data.TimeList
-       });
-}
diff --git a/Resources/Public/javascripts/UserInterface/AjaxRowExpander.js b/Resources/Public/javascripts/UserInterface/AjaxRowExpander.js
deleted file mode 100644 (file)
index 4e428f4..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-Ext.ns('TYPO3.Devlog.UserInterface');
-
-TYPO3.Devlog.UserInterface.AjaxRowExpander = Ext.extend(TYPO3.Devlog.UserInterface.RowExpander, {
-
-       constructor: function(config){
-               TYPO3.Devlog.UserInterface.AjaxRowExpander.superclass.constructor.call(this, config);
-       },
-
-    getBodyContent : function(record, index){
-               var body = record.data.data_var;
-               
-               // result is stored, so that next time it is not necessary to query the database per Ajax
-               if (record.data.has_data_var && record.data.data_var == '') {
-                       body = '<div class="loading" id="tmp' + record.id + '">&nbsp;</div>';
-                       Ext.Ajax.request({
-                          url: '/typo3/ajax.php',
-                          params: {
-                                  ajaxID: 'LogController::getDataVar',
-                                  uid: record.id
-                          },
-                          disableCaching: true,
-                          success: function(response, options) {
-                                  Ext.get("tmp" + options.objId).removeClass('loading');
-                                  Ext.getDom("tmp" + options.objId).innerHTML = response.responseText;
-                                  record.data.data_var = response.responseText;
-                          },
-                          failure: function(error) {
-                                  //alert(error)
-                          },
-                          objId: record.id
-                       });
-
-                       return body;
-
-               }
-               return body;
-    },
-       
-    beforeExpand : function(record, body, rowIndex){
-        if(this.fireEvent('beforeexpand', this, record, body, rowIndex) !== false){
-            body.innerHTML = this.getBodyContent(record, rowIndex);
-            return true;
-        } else{
-            return false;
-        }
-    }
-});
-
-
-Ext.preg('ajaxrowexpander', TYPO3.Devlog.UserInterface.RowExpander);
diff --git a/Resources/Public/javascripts/UserInterface/Bootstrap.js b/Resources/Public/javascripts/UserInterface/Bootstrap.js
deleted file mode 100644 (file)
index 255c687..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Ext.ns("TYPO3.Devlog.UserInterface");
-
-TYPO3.Devlog.UserInterface.Bootstrap = Ext.apply(new TYPO3.Devlog.Application.AbstractBootstrap, {
-       initialize: function() {
-               TYPO3.Devlog.Application.on('TYPO3.Devlog.Application.afterBootstrap', this.initContainer, this);
-       },
-       initContainer: function() {
-               TYPO3.Devlog.UserInterface.container = new TYPO3.Devlog.UserInterface.Layout();
-       }
-});
-
-TYPO3.Devlog.Application.registerBootstrap(TYPO3.Devlog.UserInterface.Bootstrap);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/UserInterface/Iconcombo.js b/Resources/Public/javascripts/UserInterface/Iconcombo.js
deleted file mode 100644 (file)
index 6f7f51f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-Ext.namespace('TYPO3.Devlog.UserInterface');
-/**
- * TYPO3.Devlog.UserInterface.IconCombo plugin for Ext.form.Combobox
- *
- * @author  Ing. Jozef Sakalos
- * @date    January 7, 2008
- *
- * @class TYPO3.Devlog.UserInterface.IconCombo
- * @extends Ext.util.Observable
- */
-TYPO3.Devlog.UserInterface.IconCombo = function(config) {
-    Ext.apply(this, config);
-};
-// plugin code
-Ext.extend(TYPO3.Devlog.UserInterface.IconCombo, Ext.util.Observable, {
-    init:function(combo) {
-        Ext.apply(combo, {
-            tpl:  '<tpl for=".">'
-                + '<div class="x-combo-list-item ux-icon-combo-item '
-                + '{' + combo.iconClsField + '}">'
-                + '{' + combo.displayField + '}'
-                + '</div></tpl>',
-            onRender: combo.onRender.createSequence(function(ct, position) {
-                // adjust styles
-                this.wrap.applyStyles({position:'relative'});
-                this.el.addClass('ux-icon-combo-input');
-                // add div for icon
-                this.icon = Ext.DomHelper.append(this.el.up('div.x-form-field-wrap'), {
-                    tag: 'div', style:'position:absolute'
-                });
-            }), // end of function onRender
-            setIconCls: function() {
-                var rec = this.store.query(this.valueField, this.getValue()).itemAt(0);
-                if(rec) {
-                    this.icon.className = 'ux-icon-combo-icon ' + rec.get(this.iconClsField);
-                }
-            }, // end of function setIconCls
-            setValue: combo.setValue.createSequence(function(value) {
-                this.setIconCls();
-            })
-        });
-    } // end of function init
-}); // end of extend
diff --git a/Resources/Public/javascripts/UserInterface/Layout.js b/Resources/Public/javascripts/UserInterface/Layout.js
deleted file mode 100644 (file)
index 66eb098..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Ext.ns("TYPO3.Devlog.UserInterface");
-
-TYPO3.Devlog.UserInterface.Layout = Ext.extend(Ext.Container, {
-
-       initComponent: function() {
-               var config = {
-                       renderTo: 't3-log-grid',
-                       items: [
-                       {
-                               xtype: 'TYPO3.Devlog.Listing.LogGrid',
-                               ref: 'logGrid',
-                               flex: 0
-                       }
-                       ]
-               };
-               Ext.apply(this, config);
-               TYPO3.Devlog.UserInterface.Layout.superclass.initComponent.call(this);
-       }
-});
\ No newline at end of file
diff --git a/Resources/Public/javascripts/UserInterface/RowExpander.js b/Resources/Public/javascripts/UserInterface/RowExpander.js
deleted file mode 100644 (file)
index 5c6b434..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-Ext.ns('TYPO3.Devlog.UserInterface');
-
-/**
- * @class TYPO3.Devlog.UserInterface.RowExpander
- * @extends Ext.util.Observable
- * Plugin (ptype = 'rowexpander') that adds the ability to have a Column in a grid which enables
- * a second row body which expands/contracts.  The expand/contract behavior is configurable to react
- * on clicking of the column, double click of the row, and/or hitting enter while a row is selected.
- *
- * @ptype rowexpander
- */
-TYPO3.Devlog.UserInterface.RowExpander = Ext.extend(Ext.util.Observable, {
-    /**
-     * @cfg {Boolean} expandOnEnter
-     * <tt>true</tt> to toggle selected row(s) between expanded/collapsed when the enter
-     * key is pressed (defaults to <tt>true</tt>).
-     */
-    expandOnEnter : true,
-    /**
-     * @cfg {Boolean} expandOnDblClick
-     * <tt>true</tt> to toggle a row between expanded/collapsed when double clicked
-     * (defaults to <tt>true</tt>).
-     */
-    expandOnDblClick : true,
-
-    header : '',
-    width : 20,
-    sortable : false,
-    fixed : true,
-    hideable: false,
-    menuDisabled : true,
-    dataIndex : '',
-    id : 'expander',
-    lazyRender : true,
-    enableCaching : true,
-
-    constructor: function(config){
-        Ext.apply(this, config);
-
-        this.addEvents({
-            /**
-             * @event beforeexpand
-             * Fires before the row expands. Have the listener return false to prevent the row from expanding.
-             * @param {Object} this RowExpander object.
-             * @param {Object} Ext.data.Record Record for the selected row.
-             * @param {Object} body body element for the secondary row.
-             * @param {Number} rowIndex The current row index.
-             */
-            beforeexpand: true,
-            /**
-             * @event expand
-             * Fires after the row expands.
-             * @param {Object} this RowExpander object.
-             * @param {Object} Ext.data.Record Record for the selected row.
-             * @param {Object} body body element for the secondary row.
-             * @param {Number} rowIndex The current row index.
-             */
-            expand: true,
-            /**
-             * @event beforecollapse
-             * Fires before the row collapses. Have the listener return false to prevent the row from collapsing.
-             * @param {Object} this RowExpander object.
-             * @param {Object} Ext.data.Record Record for the selected row.
-             * @param {Object} body body element for the secondary row.
-             * @param {Number} rowIndex The current row index.
-             */
-            beforecollapse: true,
-            /**
-             * @event collapse
-             * Fires after the row collapses.
-             * @param {Object} this RowExpander object.
-             * @param {Object} Ext.data.Record Record for the selected row.
-             * @param {Object} body body element for the secondary row.
-             * @param {Number} rowIndex The current row index.
-             */
-            collapse: true
-        });
-
-        TYPO3.Devlog.UserInterface.RowExpander.superclass.constructor.call(this);
-
-        if(this.tpl){
-            if(typeof this.tpl == 'string'){
-                this.tpl = new Ext.Template(this.tpl);
-            }
-            this.tpl.compile();
-        }
-
-        this.state = {};
-        this.bodyContent = {};
-    },
-
-    getRowClass : function(record, rowIndex, p, ds){
-        p.cols = p.cols-1;
-        var content = this.bodyContent[record.id];
-        if(!content && !this.lazyRender){
-            content = this.getBodyContent(record, rowIndex);
-        }
-        if(content){
-            p.body = content;
-        }
-        return this.state[record.id] ? 'x-grid3-row-expanded' : 'x-grid3-row-collapsed';
-    },
-
-    init : function(grid){
-        this.grid = grid;
-
-        var view = grid.getView();
-        view.getRowClass = this.getRowClass.createDelegate(this);
-
-        view.enableRowBody = true;
-
-
-        grid.on('render', this.onRender, this);
-        grid.on('destroy', this.onDestroy, this);
-    },
-
-    // @private
-    onRender: function() {
-        var grid = this.grid;
-        var mainBody = grid.getView().mainBody;
-        mainBody.on('mousedown', this.onMouseDown, this, {delegate: '.x-grid3-row-expander'});
-        if (this.expandOnEnter) {
-            this.keyNav = new Ext.KeyNav(this.grid.getGridEl(), {
-                'enter' : this.onEnter,
-                scope: this
-            });
-        }
-        if (this.expandOnDblClick) {
-            grid.on('rowdblclick', this.onRowDblClick, this);
-        }
-    },
-    
-    // @private    
-    onDestroy: function() {
-        if(this.keyNav){
-            this.keyNav.disable();
-            delete this.keyNav;
-        }
-        /*
-         * A majority of the time, the plugin will be destroyed along with the grid,
-         * which means the mainBody won't be available. On the off chance that the plugin
-         * isn't destroyed with the grid, take care of removing the listener.
-         */
-        var mainBody = this.grid.getView().mainBody;
-        if(mainBody){
-            mainBody.un('mousedown', this.onMouseDown, this);
-        }
-    },
-    // @private
-    onRowDblClick: function(grid, rowIdx, e) {
-        this.toggleRow(rowIdx);
-    },
-
-    onEnter: function(e) {
-        var g = this.grid;
-        var sm = g.getSelectionModel();
-        var sels = sm.getSelections();
-        for (var i = 0, len = sels.length; i < len; i++) {
-            var rowIdx = g.getStore().indexOf(sels[i]);
-            this.toggleRow(rowIdx);
-        }
-    },
-
-    getBodyContent : function(record, index){
-        if(!this.enableCaching){
-            return this.tpl.apply(record.data);
-        }
-        var content = this.bodyContent[record.id];
-        if(!content){
-            content = this.tpl.apply(record.data);
-            this.bodyContent[record.id] = content;
-        }
-        return content;
-    },
-
-    onMouseDown : function(e, t){
-        e.stopEvent();
-        var row = e.getTarget('.x-grid3-row');
-        this.toggleRow(row);
-    },
-
-    renderer : function(v, p, record){
-        p.cellAttr = 'rowspan="2"';
-        return '<div class="x-grid3-row-expander">&#160;</div>';
-    },
-
-    beforeExpand : function(record, body, rowIndex){
-        if(this.fireEvent('beforeexpand', this, record, body, rowIndex) !== false){
-            if(this.tpl && this.lazyRender){
-                body.innerHTML = this.getBodyContent(record, rowIndex);
-            }
-            return true;
-        }else{
-            return false;
-        }
-    },
-
-    toggleRow : function(row){
-        if(typeof row == 'number'){
-            row = this.grid.view.getRow(row);
-        }
-        this[Ext.fly(row).hasClass('x-grid3-row-collapsed') ? 'expandRow' : 'collapseRow'](row);
-    },
-
-    expandRow : function(row){
-        if(typeof row == 'number'){
-            row = this.grid.view.getRow(row);
-        }
-        var record = this.grid.store.getAt(row.rowIndex);
-        var body = Ext.DomQuery.selectNode('tr:nth(2) div.x-grid3-row-body', row);
-        if(this.beforeExpand(record, body, row.rowIndex)){
-            this.state[record.id] = true;
-            Ext.fly(row).replaceClass('x-grid3-row-collapsed', 'x-grid3-row-expanded');
-            this.fireEvent('expand', this, record, body, row.rowIndex);
-        }
-    },
-
-    collapseRow : function(row){
-        if(typeof row == 'number'){
-            row = this.grid.view.getRow(row);
-        }
-        var record = this.grid.store.getAt(row.rowIndex);
-        var body = Ext.fly(row).child('tr:nth(1) div.x-grid3-row-body', true);
-        if(this.fireEvent('beforecollapse', this, record, body, row.rowIndex) !== false){
-            this.state[record.id] = false;
-            Ext.fly(row).replaceClass('x-grid3-row-expanded', 'x-grid3-row-collapsed');
-            this.fireEvent('collapse', this, record, body, row.rowIndex);
-        }
-    }
-});
-
-Ext.preg('rowexpander', TYPO3.Devlog.UserInterface.RowExpander);
\ No newline at end of file
diff --git a/Resources/Public/javascripts/Utils.js b/Resources/Public/javascripts/Utils.js
deleted file mode 100644 (file)
index 59f84d7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-Ext.ns('TYPO3.Devlog');
-
-TYPO3.Devlog.Utils = {};
-
-/**
- * Clone Function
- *
- * @param {Object/Array} o Object or array to clone
- * @return {Object/Array} Deep clone of an object or an array
- * @author Ing. Jozef Sakáloš
- */
-TYPO3.Devlog.Utils.clone = function(o) {
-       if (!o || 'object' !== typeof o) {
-               return o;
-       }
-       if ('function' === typeof o.clone) {
-               return o.clone();
-       }
-       var c = '[object Array]' === Object.prototype.toString.call(o) ? [] : {};
-       var p, v;
-       for (p in o) {
-               if (o.hasOwnProperty(p)) {
-                       v = o[p];
-                       if (v && 'object' === typeof v) {
-                               c[p] = TYPO3.Devlog.Utils.clone(v);
-                       } else {
-                               c[p] = v;
-                       }
-               }
-       }
-       return c;
-};
-
-/**
- * Generates a sprite icon according to TYPO3 convention
- *
- * @param {String} spriteName
- * @return {String}
- */
-TYPO3.Devlog.Utils.getSpriteIcon = function(spriteName) {
-       var elements = spriteName.split('-');
-       var category = elements[0];
-       var baseClass = category + '-' + elements[1];
-       var className = spriteName.replace(category + '-', '');
-       return '<span class="t3-icon t3-icon-' + category + ' t3-icon-' + baseClass + ' t3-icon-' + className + '"></span>';
-}
-
-
-/**
- * Simulate a mouse event on the GUI
- *
- * @param {String} eventName
- * @param {Object} element
- * @return void
- */
-TYPO3.Devlog.Utils.fireEvent = function(eventName, element) {
-       if( document.createEvent ) {
-               var evObj = document.createEvent('MouseEvents');
-               evObj.initEvent( eventName, true, false );
-               element.dispatchEvent(evObj);
-       } else if( document.createEventObject ) {
-               element.fireEvent(eventName);
-       }
-}
\ No newline at end of file
diff --git a/Resources/Public/stylesheets/devlog.css b/Resources/Public/stylesheets/devlog.css
deleted file mode 100644 (file)
index 16908ea..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-.x-grid3-row td,
-.x-grid3-summary-row td,
-.x-selectable {
-       -moz-user-select: text!important;
-       -khtml-user-select: text!important;
-       cursor: text;
-}
-
-.x-grid3-row-expander {
-       cursor: pointer;
-}
-
-.x-selectable * {
-       -moz-user-select: text!important;
-       -khtml-user-select: text!important;
-}
-
-/* Makes column msg beeing wrapped */
-td.x-grid3-td-msg {
-       overflow: hidden;
-}
-td.x-grid3-td-msg div.x-grid3-cell-inner {
-       white-space: normal;
-}
-
-td.x-grid3-td-location {
-       overflow: hidden;
-}
-td.x-grid3-td-location div.x-grid3-cell-inner {
-       white-space: normal;
-}
-
-.x-grid3-cell-inner,
-.x-grid3-hd-inner {
-       white-space:normal !important;
-}
-
-/* Icon combobox: styling for the list */
-.ux-icon-combo-item {
-       background-position:3px 50% !important;
-       background-repeat:no-repeat !important;
-       padding-left:24px !important;
-}
-
-/* Icon combobox: styling for the input field */
-.ux-icon-combo-input {
-       padding-left:25px;
-}
-
-.ux-icon-combo-icon {
-       left:5px;
-       top:3px;
-       background-position:0 50%;
-       background-repeat:no-repeat;
-       height:14px;
-       width:18px;
-}
-
-.ok {
-       background-image:url(../images/icons/ok.png) !important;
-}
-
-.info {
-       background-image:url(../images/icons/information.png) !important;
-}
-
-.notice {
-       background-image:url(../images/icons/notice.png) !important;
-}
-
-.warning {
-       background-image:url(../images/icons/warning.png) !important;
-}
-
-.error {
-       background-image:url(../images/icons/error.png) !important;
-}
-
-.expandall {
-       background-image:url(../images/icons/application_put.png) !important;
-}
-
-.reload {
-       background-image:url(../images/icons/arrow_rotate_clockwise.png) !important;
-}
-
-.page {
-       background-image:url(../../../../../../typo3/sysext/t3skin/images/icons/apps/pagetree-page-default.png) !important;
-}
-
-.missing {
-       background-image:url(../../../../../../typo3/sysext/t3skin/images/icons/status/status-icon-missing.png) !important;
-}
-
-.x-btn-text-icon {
-       background-repeat: no-repeat;
-       background-position:3px 50%;
-}
-
-.loading {
-       background-image: url(../images/icons/loading.gif);
-       background-repeat: no-repeat;
-       height:18px;
-}
diff --git a/Tests/Unit/Domain/Model/EntryTest.php b/Tests/Unit/Domain/Model/EntryTest.php
new file mode 100644 (file)
index 0000000..af976e9
--- /dev/null
@@ -0,0 +1,312 @@
+<?php
+
+namespace Devlog\Devlog\Tests\Unit\Domain\Model;
+
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use Devlog\Devlog\Domain\Model\Entry;
+
+/**
+ * Test case for class \Devlog\Devlog\Domain\Model\Entry.
+ *
+ * @author François Suter <typo3@cobweb.ch>
+ */
+class EntryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
+       /**
+        * @var Entry
+        */
+       protected $subject = NULL;
+
+       protected function setUp() {
+               $this->subject = new Entry();
+       }
+
+       protected function tearDown() {
+               unset($this->subject);
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getRunId
+        */
+       public function getRunIdReturnsInitialValueForString() {
+               $this->assertSame(
+                       '',
+                       $this->subject->getRunId()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setRunId
+        */
+       public function setRunIdForStringSetsExtkey() {
+               $this->subject->setRunId('12345678987.65432100');
+
+               $this->assertAttributeEquals(
+                       '12345678987.65432100',
+                       'runId',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getCrdate
+        */
+       public function getCrdateReturnsInitialValueForInteger() {
+               $this->assertSame(
+                       0,
+                       $this->subject->getCrdate()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setCrdate
+        */
+       public function setCrdateForIntegerSetsSeverity() {
+               $this->subject->setCrdate(1417705263);
+
+               $this->assertAttributeEquals(
+                       1417705263,
+                       'crdate',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getSeverity
+        */
+       public function getSeverityReturnsInitialValueForInteger() {
+               $this->assertSame(
+                       0,
+                       $this->subject->getSeverity()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setSeverity
+        */
+       public function setSeverityForIntegerSetsSeverity() {
+               $this->subject->setSeverity(2);
+
+               $this->assertAttributeEquals(
+                       2,
+                       'severity',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getExtkey
+        */
+       public function getExtkeyReturnsInitialValueForString() {
+               $this->assertSame(
+                       '',
+                       $this->subject->getExtkey()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setExtkey
+        */
+       public function setExtkeyForStringSetsExtkey() {
+               $this->subject->setExtkey('devlog');
+
+               $this->assertAttributeEquals(
+                       'devlog',
+                       'extkey',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getMessage
+        */
+       public function getMessageReturnsInitialValueForString() {
+               $this->assertSame(
+                       '',
+                       $this->subject->getMessage()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setMessage
+        */
+       public function setMessageForStringSetsMessage() {
+               $this->subject->setMessage('This is a message');
+
+               $this->assertAttributeEquals(
+                       'This is a message',
+                       'message',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getLocation
+        */
+       public function getLocationReturnsInitialValueForString() {
+               $this->assertSame(
+                       '',
+                       $this->subject->getLocation()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setLocation
+        */
+       public function setLocationForStringSetsLocation() {
+               $this->subject->setLocation('Entry.php');
+
+               $this->assertAttributeEquals(
+                       'Entry.php',
+                       'location',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getLine
+        */
+       public function getLineReturnsInitialValueForInteger() {
+               $this->assertSame(
+                       0,
+                       $this->subject->getLine()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setLine
+        */
+       public function setLineForIntegerSetsLine() {
+               $this->subject->setLine(42);
+
+               $this->assertAttributeEquals(
+                       42,
+                       'line',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getIp
+        */
+       public function getIpReturnsInitialValueForString() {
+               $this->assertSame(
+                       '',
+                       $this->subject->getIp()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setIp
+        */
+       public function setIpForStringSetsIp() {
+               $this->subject->setIp('127.0.0.1');
+
+               $this->assertAttributeEquals(
+                       '127.0.0.1',
+                       'ip',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getCruserId
+        */
+       public function getCruserIdReturnsInitialValueForInteger() {
+               $this->assertSame(
+                       0,
+                       $this->subject->getCruserId()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setCruserId
+        */
+       public function setCruserIdForIntegerSetsSeverity() {
+               $this->subject->setCruserId(5);
+
+               $this->assertAttributeEquals(
+                       5,
+                       'cruserId',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getPid
+        */
+       public function getPidReturnsInitialValueForInteger() {
+               $this->assertSame(
+                       0,
+                       $this->subject->getPid()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setPid
+        */
+       public function setPidForIntegerSetsSeverity() {
+               $this->subject->setPid(17);
+
+               $this->assertAttributeEquals(
+                       17,
+                       'pid',
+                       $this->subject
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::getExtraData
+        */
+       public function getExtraDataReturnsInitialValueForString() {
+               $this->assertNull(
+                       $this->subject->getExtraData()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Domain\Model\Entry::setExtraData
+        */
+       public function setExtraDataForStringSetsExtraData() {
+               $this->subject->setExtraData('SomeBlob');
+
+               $this->assertAttributeEquals(
+                       'SomeBlob',
+                       'extraData',
+                       $this->subject
+               );
+       }
+}
diff --git a/Tests/Unit/Utility/LoggerTest.php b/Tests/Unit/Utility/LoggerTest.php
new file mode 100644 (file)
index 0000000..0aa8a8f
--- /dev/null
@@ -0,0 +1,130 @@
+<?php
+
+namespace Devlog\Devlog\Tests\Unit\Utility;
+
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+use Devlog\Devlog\Utility\Logger;
+
+/**
+ * Test case for class \Devlog\Devlog\Logger.
+ *
+ * @author François Suter <typo3@cobweb.ch>
+ */
+class LoggerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
+       /**
+        * @var Logger
+        */
+       protected $subject = NULL;
+
+       /**
+        * @var array Test extension configuration
+        */
+       protected $testConfiguration = array(
+               'minimumLogLevel' => 1,
+               'excludeKeys' => 'foo,bar'
+       );
+
+       protected function setUp() {
+               $this->subject = new Logger();
+               $this->subject->setExtensionConfiguration(
+                       $this->testConfiguration
+               );
+       }
+
+       protected function tearDown() {
+               unset($this->subject);
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Utility\Logger::isEntryAccepted
+        */
+       public function entryIsAccepted() {
+               $this->assertTrue(
+                       $this->subject->isEntryAccepted(
+                               array(
+                                       'severity' => 2,
+                                       'extKey' => 'whatever'
+                               )
+                       )
+               );
+       }
+
+       public function wrongEntriesProvider() {
+               return array(
+                       'Severity too low' => array(
+                               array(
+                                       'severity' => 0,
+                                       'extKey' => 'whatever'
+                               )
+                       ),
+                       'Excluded extension key' => array(
+                               array(
+                                       'severity' => 3,
+                                       'extKey' => 'foo'
+                               )
+                       )
+               );
+       }
+
+       /**
+        * @test
+        * @dataProvider wrongEntriesProvider
+        * @covers \Devlog\Devlog\Utility\Logger::isEntryAccepted
+        */
+       public function entryIsRefused($entry) {
+               $this->assertFalse(
+                       $this->subject->isEntryAccepted(
+                               $entry
+                       )
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Utility\Logger::getExtensionConfiguration
+        * @covers \Devlog\Devlog\Utility\Logger::setExtensionConfiguration
+        */
+       public function getConfigurationReturnsTestValue() {
+               $this->assertSame(
+                       $this->subject->getExtensionConfiguration(),
+                       $this->testConfiguration
+               );
+       }
+
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Utility\Logger::isLoggingEnabled
+        */
+       public function getIsLoggingEnabledReturnsInitialValueForBoolean() {
+               $this->assertTrue(
+                       $this->subject->isLoggingEnabled()
+               );
+       }
+
+       /**
+        * @test
+        * @covers \Devlog\Devlog\Utility\Logger::setIsLoggingEnabled
+        */
+       public function setIsLoggingEnabledForBooleanSetsIsLoggingEnabled() {
+               $this->subject->setIsLoggingEnabled(FALSE);
+
+               $this->assertAttributeEquals(
+                       FALSE,
+                       'isLoggingEnabled',
+                       $this->subject
+               );
+       }
+}
diff --git a/class.tx_devlog.php b/class.tx_devlog.php
deleted file mode 100644 (file)
index 7eaa8d7..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2004 Rene Fritz (r.fritz@colorcube.de)
-*  (c) 2010 Francois Suter (typo3@cobweb.ch)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-
-/**
- * devlog function for the 'devlog' extension.
- *
- * @author             Rene Fritz <r.fritz@colorcube.de>
- * @author             Francois Suter <typo3@cobweb.ch>
- * @package            TYPO3
- * @subpackage tx_devlog
- *
- *  $Id$
- */
-class tx_devlog {
-       public $extKey = 'devlog';      // The extension key
-       public $extConf = array(); // The extension configuration
-       protected $rowCount; // The number of rows in the devlog table
-
-       /**
-        * Constructor
-        * The constructor just reads the extension configuration and stores it in a member variable
-        */
-       public function __construct() {
-               $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);
-       }
-
-       /**
-        * Developer log
-        *
-        * $logArr = array('msg'=>$msg, 'extKey'=>$extKey, 'severity'=>$severity, 'dataVar'=>$dataVar);
-        * 'msg'                string          Message (in english).
-        * 'extKey'             string          Extension key (from which extension you are calling the log)
-        * 'severity'   integer         Severity: 0 is info, 1 is notice, 2 is warning, 3 is fatal error, -1 is "OK" message
-        * 'dataVar'    array           Additional data you want to pass to the logger.
-        *
-        * @param       array           $logArr: log data array
-        * @return      void
-        */
-       public function devLog($logArr) {
-                       // If the DB object is not yet instantiated or not connected to the DB, abort writing to the log
-               if (!isset($GLOBALS['TYPO3_DB']) || !is_object($GLOBALS['TYPO3_DB']) || !$GLOBALS['TYPO3_DB']->link) {
-                       return;
-               }
-
-               if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['nolog']) {
-                       return;
-               }
-                       // this is a hack to prevent logging while initialization - $TYPO3_CONF_VARS will be reset while init
-               if ($GLOBALS['EXTCONF'][$this->extKey]['nolog']) {
-                       return;
-               }
-
-                       // If the severity is below the minimum logging level, don't log the entry
-               if ($logArr['severity'] < $this->extConf['minLogLevel']) {
-                       return;
-               }
-
-                       // If the key is in the list of keys to exclude, don't log the entry
-               if (t3lib_div::inList($this->extConf['excludeKeys'], $logArr['extKey'])) {
-                       return;
-               }
-
-                       // Check if the maximum number of rows has been exceeded
-               if (!empty($this->extConf['maxRows'])) {
-                       $this->checkRowLimit();
-               }
-
-               $logEntry = array();
-                       // Try to get a page id that makes sense
-               $pid = 0;
-                       // In the FE context, this is obviously the current page
-               if (TYPO3_MODE == 'FE') {
-                       $pid = $GLOBALS['TSFE']->id;
-
-                       // In other contexts, a global variable may be set with a relevant pid
-               } elseif (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['debugData']['pid'])) {
-                       $pid = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['debugData']['pid'];
-               }
-               $logEntry['pid'] = $pid;
-//             $logEntry['crdate'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['tstamp'];
-               $logEntry['microtime'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['mstamp'];
-               $logEntry['user'] = $GLOBALS['BE_USER']->user['uid'];
-               $logEntry['ip'] = t3lib_div::getIndpEnv('REMOTE_ADDR');
-
-                       // Clean up the message
-               $logEntry['message'] = t3lib_div::removeXSS($logArr['msg']);
-                       // There's no reason to have any markup in the extension key
-               $logEntry['key'] = strip_tags($logArr['extKey']);
-                       // Severity can only be a number
-               $logEntry['severity'] = intval($logArr['severity']);
-
-                       // Get information about the place where this method was called from
-               $callPlaceInfo = $this->getCallPlaceInfo(debug_backtrace());
-               $logEntry['location'] = $callPlaceInfo['basename'];
-               $logEntry['line'] = $callPlaceInfo['line'];
-
-               if (!empty($logArr['dataVar'])) {
-                       $extraData = $logArr['dataVar'];
-                       if (is_array($logArr['dataVar'])) {
-                               $extraData = array($logArr['dataVar']);
-                       }
-                       $serializedData = serialize($extraData);
-                       if (!isset($this->extConf['dumpSize']) || strlen($serializedData) <= $this->extConf['dumpSize']) {
-                               $logEntry['data'] = $serializedData;
-                       } else {
-                               $logEntry['data'] = serialize(array('tx_devlog_error' => 'toolong'));
-                       }
-               }
-
-               foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['writers'] as $class) {
-                       /** @var $writerObject tx_devlog_LogWriter */
-                       $writerObject = t3lib_div::makeInstance($class);
-                       if ($writerObject instanceof tx_devlog_LogWriter) {
-                               $writerObject->writeEntry($logEntry);
-                       }
-               }
-
-                       // Increase the (cached) number of rows
-               $this->numRows++;
-       }
-
-       /**
-        * Given a backtrace, this method tries to find the place where a "devLog" function was called
-        * and return info about the place
-        *
-        * @param       array   $backTrace: function call backtrace, as provided by debug_backtrace()
-        *
-        * @return      array   information about the call place
-        */
-       protected function getCallPlaceInfo($backTrace) {
-               foreach ($backTrace as $entry) {
-                       if ($entry['class'] !== 'tx_devlog' && $entry['function'] === 'devLog') {
-                               $pathInfo = pathinfo($entry['file']);
-                               $pathInfo['line'] = $entry['line'];
-                               return $pathInfo;
-                       }
-               }
-               return null;
-       }
-
-       /**
-        * This method checks whether the number of rows in the devlog table exceeds the limit
-        * If yes, 10% of that amount is deleted, with older records going first
-        *
-        * @return      void
-        */
-       protected function checkRowLimit() {
-                       // Get the total number of rows, if not already defined
-               if (!isset($this->numRows)) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('COUNT(uid)', 'tx_devlog', '');
-                       $result = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
-                       $this->numRows = $result[0];
-                       $GLOBALS['TYPO3_DB']->sql_free_result($res);
-               }
-                       // Check if number of rows is above the limit and clean up if necessary
-               if ($this->numRows > $this->extConf['maxRows']) {
-                               // Select the row from which to start cleaning up
-                               // To achieve this, order by creation date (so oldest come first)
-                               // then offset by 10% of maxRows and get the next record
-                               // This will return a timestamp that is used as a cut-off date
-                       $numRowsToRemove = round(0.1 * $this->extConf['maxRows']);
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('crdate', 'tx_devlog', '', '', 'crdate', $numRowsToRemove.',1');
-                       $result = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
-                       $crdate = $result[0];
-                       $GLOBALS['TYPO3_DB']->sql_free_result($res);
-                               // Delete all rows older or same age as previously found timestamp
-                               // This will problably delete a bit more than 10% of maxRows, but will at least
-                               // delete complete log runs
-                       $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_devlog', "crdate <= '".$crdate."'");
-                       $numRemovedRows = $GLOBALS['TYPO3_DB']->sql_affected_rows();
-                               // Update (cached) number of rows
-                       $this->numRows -= $numRemovedRows;
-                               // Optimize the table (if option is active)
-                       if ($this->extConf['optimize']) {
-                               $GLOBALS['TYPO3_DB']->sql_query('OPTIMIZE table tx_devlog');
-                       }
-               }
-       }
-}
-?>
\ No newline at end of file
diff --git a/class.tx_devlog_exception.php b/class.tx_devlog_exception.php
deleted file mode 100644 (file)
index 4118065..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Fabien Udriot <fabien.udriot@ecodev.ch>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-/**
- * Exception that is thrown when something went wrong with the Devlog
- *
- * @package     TYPO3
- * @subpackage  tx_devlog
- * @author      Fabien Udriot <fabien.udriot@ecodev.ch>
- * @license     http://www.gnu.org/copyleft/gpl.html
- * @version     SVN: $Id$
- */
-class tx_devlog_exception extends Exception {
-
-}
-
-?>
\ No newline at end of file
diff --git a/class.tx_devlog_remote.php b/class.tx_devlog_remote.php
deleted file mode 100644 (file)
index 080bf25..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2009 Fabien Udriot <fabien.udriot@ecodev.ch>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-*
-* $Id$
-***************************************************************/
-
-/**
- * Classes used as ExtDirect's router
- *
- * @author     Fabien Udriot <fabien.udriot@ecodev.ch>
- * @package    TYPO3
- * @subpackage tx_devlog
- */
-class tx_devlog_remote {
-
-       /**
-        * Get / Post parameters
-        * 
-        * @var array
-        */
-       var $parameters = array();
-
-       /**
-        * Extension configuration
-        *
-        * @var array
-        */
-       var $configurations = array();
-
-       /**
-        * Constructor
-        *
-        * @global Language $LANG;
-        */
-       public function __construct() {
-               global $LANG;
-               $this->parameters = array_merge(t3lib_div::_GET(), t3lib_div::_POST());
-               
-               // Load language
-               $LANG->includeLLFile('EXT:devlog/Resources/Private/Language/locallang.xml');
-
-               // Get extension configuration
-               $this->configurations = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['devlog']);
-       }
-
-       /**
-        * Fetches log depending on parameters
-        * 
-        * @global t3lib_DB $TYPO3_DB
-        * @return void
-        */
-       public function indexAction() {
-               global $TYPO3_DB;
-
-               // Defines list of fields
-               $fields = array('uid', 'pid', 'crdate', 'crmsec', 'cruser_id', 'severity', 'extkey', 'msg', 'location', 'line', 'data_var');
-               
-               $records = $TYPO3_DB->exec_SELECTgetRows(implode(',', $fields), 'tx_devlog', $this->getClause(), $groupBy = '', $this->getOrder(), $this->getLimit());
-               
-//             $request = $TYPO3_DB->SELECTquery(implode(',', $fields), 'tx_devlog', $this->getClause(), $groupBy = '', $this->getOrder(), $this->getLimit());
-//             t3lib_div::debug($request, '$datasource');
-               
-               foreach ($records as &$record) {
-                       $record['cruser_formatted'] = $this->formatCruser($record['cruser_id']);
-                       $record['pid_formatted'] = $this->formatPid($record['pid']);
-                       $record['extkey_formatted'] = $this->formatExtKey($record['extkey']);
-                       $record['has_data_var'] = $record['data_var'] != '' ? TRUE : FALSE;
-                       $record['data_var'] = ''; //will be fetched by Ajax later on
-               }
-
-               $datasource['metaData'] = $this->getMetaData($fields);
-               $datasource['total'] = $TYPO3_DB->exec_SELECTcountRows('uid', 'tx_devlog', $this->getClause());
-               $datasource['records'] = $records;
-               $datasource['success'] = TRUE;
-               
-               // For ExtDirect (when it will be working with metadata)
-               //return $datasource;
-
-//             t3lib_div::debug($datasource, '$datasource');
-               // For JsonReader
-               echo json_encode($datasource);
-       }
-
-       /**
-        * Get clause SQL order
-        *
-        * @global t3lib_DB $TYPO3_DB
-        * @return array $metaData
-        */
-       protected function getClause() {
-               global $TYPO3_DB;
-
-               $clauses = array();
-               $severity = filter_input(INPUT_GET, 'severity', FILTER_VALIDATE_INT, array('options'=>array('min_range'=>-1, 'max_range'=>3)));
-               if ($severity !== FALSE && $severity !== NULL) {
-                       $clauses[] = 'severity = ' . $severity;
-               }
-
-               $pid = filter_input(INPUT_GET, 'pid', FILTER_VALIDATE_INT, array('options'=>array('min_range'=> 0)));
-               if ($pid !== FALSE && $pid !== NULL) {
-                       $clauses[] = 'pid = ' . $pid;
-               }
-
-               $extKey = filter_input(INPUT_GET, 'extKey', FILTER_SANITIZE_STRING);
-               if ($extKey) {
-                       $clauses[] = 'extKey = "' . $extKey . '"';
-               }
-               
-               // Add other parameter
-               if (isset($this->parameters['limit']) && $this->parameters['limit'] == '1000') {
-                       $records = $TYPO3_DB->exec_SELECTgetRows('MAX(crmsec) AS maximum, MIN(crmsec) AS minimum', 'tx_devlog', '');
-                       if (!empty($records)) {
-                               $clauses[] = 'crmsec = ' . $records[0]['maximum'];
-                       }
-               }
-               elseif (isset($this->parameters['limit']) && (int) $this->parameters['limit'] > 1000) {
-                       $clauses[] = 'crmsec = ' . $this->parameters['limit'];
-               }
-               return implode(' AND ', $clauses);
-       }
-
-       /**
-        * Get SQL order
-        *
-        * @return array $metaData
-        */
-       protected function getOrder() {
-               $order = 'uid DESC';
-               if (isset($this->parameters['sort']) && isset($this->parameters['dir'])) {
-                       // check wheter the field is formatted or not
-                       // if yes removed the "_formatted" suffix to query the database properly
-                       if (strpos($this->parameters['sort'], '_formatted') > 1) {
-                               $this->parameters['sort'] = str_replace('_formatted', '', $this->parameters['sort']);
-                       }
-
-                       if ($this->parameters['dir'] == 'ASC' || $this->parameters['dir'] == 'DESC') {
-                               $order = $this->parameters['sort'] . ' ' . $this->parameters['dir'];
-                       }
-               }
-               return $order;
-       }
-
-       /**
-        * Get datasource's meta data
-        *
-        * @param array $fields: list of field
-        * @return array $metaData
-        */
-       protected function getMetaData($fields) {
-
-               // ExtJS api: http://www.extjs.com/deploy/dev/docs/?class=Ext.data.JsonReader
-//             metaData: {
-//        // used by store to set its sortInfo
-//        "sortInfo":{
-//           "field": "name",
-//           "direction": "ASC"
-//        },
-//        // paging data (if applicable)
-//        "start": 0,
-//        "limit": 2,
-//        // custom property
-//        "foo": "bar"
-//    },
-               $metaData['idProperty'] = 'uid';
-               $metaData['root'] = 'records';
-               $metaData['totalProperty'] = 'total';
-               $metaData['successProperty'] = 'success';
-               $metaData['fields'] = array(
-                       // Additional fields
-                       array('name' => 'cruser_formatted', 'type' => 'string'),
-                       array('name' => 'pid_formatted', 'type' => 'string'),
-                       array('name' => 'extkey_formatted', 'type' => 'string'),
-                       array('name' => 'has_data_var', 'type' => 'boolean'),
-               );
-
-               // merges additiionnal fields with "regular" fields
-               $metaData['fields'] = array_merge($this->getFieldMetaData($fields), $metaData['fields']);
-               return $metaData;
-       }
-
-       /**
-        * Get MetaData for fields
-        *
-        * @global t3lib_DB $TYPO3_DB
-        * @param array $fields: list of field
-        * @return array $fieldsMetaData: list of metadata for the given $fields
-        */
-       protected function getFieldMetaData($fields) {
-               global $TYPO3_DB;
-               $fieldsInTable = $TYPO3_DB->admin_get_fields('tx_devlog');
-
-               foreach ($fields as $fieldName) {
-                       if ($fieldName == 'crdate') { //  || $fieldName == 'crmsec'
-                               $fieldsMetaData[] = array('name' => $fieldName, 'type' => 'date', 'dateFormat' => 'timestamp');
-                       }
-                       elseif (isset($fieldsInTable[$fieldName])) {
-                               $fieldType = $fieldsInTable[$fieldName]['Type'];
-                               if (strpos($fieldType, 'int') !== FALSE) {
-                                       $fieldsMetaData[] = array('name' => $fieldName, 'type' => 'int');
-                               }
-                               else { // means this is a string
-                                       $fieldsMetaData[] = array('name' => $fieldName, 'type' => 'string');
-                               }
-                       }
-               }
-               return $fieldsMetaData;
-       }
-
-       /**
-     * Returns a formatted extkey
-     *
-        * @global $TYPO3_LOADED_EXT
-     * @param  string          data var to be formatted
-     * @return  string         foramted data var
-     */
-    function formatExtKey($extKey) {
-               global $TYPO3_LOADED_EXT;
-               $result = '';
-               if (isset($TYPO3_LOADED_EXT[$extKey]['typo3RelPath'])) {
-                       $iconPath = $TYPO3_LOADED_EXT[$extKey]['typo3RelPath'] . 'ext_icon.gif';
-                       $result = '<img src="' . $iconPath . '" alt="" />';
-               }
-               return $result . ' ' . $extKey;
-       }
-
-       /**
-     * Returns a linked icon with title from a record
-     * NOTE: currently this is only called for the pages table, as table names are not stored in the devlog (but a pid may be)
-     *
-     * @param  integer         ID of the record to link to
-     * @return  string         HTML for icon, title and link
-     */
-    function formatPid($uid) {
-                       // Retrieve the stored page information
-                       // (pages were already fetched in getLogFilters)
-               $page = t3lib_BEfunc::getRecord('pages', $uid);
-               $elementTitle = t3lib_BEfunc::getRecordTitle('pages', $page, 1);
-
-                       // Create icon for record
-               $elementIcon = t3lib_iconWorks::getSpriteIconForRecord('pages', array());
-
-                       // Return item with edit link
-               $editOnClick = 'top.loadEditId(' . $uid . ')';
-               $string = '<a href="#" onclick="' . htmlspecialchars($editOnClick) . '">' . $elementIcon . $elementTitle . '</a>';
-               return $string;
-    }
-
-       /**
-        * This method gets the title and the icon for a given record of a given table
-        * It returns these as a HTML string
-        *
-        * @param       integer         $uid: primary key of the record
-        * @return      string          HTML to display
-        */
-       protected function formatCruser($uid = 0) {
-               global $TCA;
-               $row = t3lib_BEfunc::getRecord('be_users', $uid);
-               $elementTitle = t3lib_BEfunc::getRecordTitle('be_users', $row, 1);
-               $spriteName = $TCA['be_users']['ctrl']['typeicon_classes'][$row['admin']];
-               $elementIcon = t3lib_iconWorks::getSpriteIcon($spriteName);
-               return $elementIcon . $elementTitle;
-       }
-       
-       /**
-        * Returns LIMIT 3 OFFSET 0
-        *
-        * @return string
-        */
-       protected function getLimit() {
-               $request = '';
-               if (isset($this->parameters['limit']) && (int) $this->parameters['limit'] != -1) {
-                       $limit = filter_input(INPUT_GET, 'limit', FILTER_SANITIZE_NUMBER_INT);
-                       $start = 0;
-                       if (isset($this->parameters['start'])) {
-                               $start = filter_input(INPUT_GET, 'start', FILTER_SANITIZE_NUMBER_INT);
-                       }
-                       $request = $limit . ' OFFSET ' . $start;
-               }
-               return $request;
-       }
-
-       /**
-        * Ajax method. Returns formated data var.
-        *
-        * @return string
-        */
-       public function getDataVar() {
-               global $TYPO3_DB;
-               $result = '';
-               $uid = filter_input(INPUT_POST, 'uid', FILTER_VALIDATE_INT, array('options'=>array('min_range'=> 0)));
-               if ($uid) {
-                       $records = $TYPO3_DB->exec_SELECTgetRows('data_var', 'tx_devlog', 'uid = ' . $uid);
-                       if (isset($records[0]['data_var']) && $records[0]['data_var'] != '') {
-                               $dataVar = $records[0]['data_var'];
-                               $result = t3lib_div::view_array(@unserialize($dataVar));
-                       }
-               }
-               echo $result;
-       }
-
-       /**
-        * Ajax method. Returns the very last time stamp.
-        *
-        * @return string
-        */
-       public function getLastLogTime() {
-               global $TYPO3_DB;
-               $result = 0;
-               // Fetches interval of time
-               $records = $TYPO3_DB->exec_SELECTgetRows('MAX(crmsec) AS crmsec', 'tx_devlog', '');
-               if (isset($records[0]['crmsec'])) {
-                       $result = $records[0]['crmsec'];
-               }
-               echo $result;
-       }
-}
-
-?>
\ No newline at end of file
diff --git a/class.tx_devlog_tceforms.php b/class.tx_devlog_tceforms.php
deleted file mode 100644 (file)
index 216c51d..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2009 Fabien Udriot <fabien.udriot@ecodev.ch>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-*
-* $Id: class.tx_devlog_tceforms.php 13682 2008-11-03 13:33:42Z omic $
-***************************************************************/
-
-/**
- * TCEform custom field for devlog
- *
- * @author     Fabien Udriot <fabien.udriot@ecodev.ch>
- * @package    TYPO3
- * @subpackage tx_devlog
- */
-class tx_devlog_tceforms {
-
-       protected $extKey = 'devlog';
-
-       /**
-        * This method returns the message's content
-        * HTML should be display as is
-        *
-        * @param       array                   $PA: information related to the field
-        * @param       t3lib_tceform   $fobj: reference to calling TCEforms object
-        *
-        * @return      string  The HTML for the form field
-        */
-       public function displayMessage($PA, $fobj) {
-               return $PA['row']['msg'];
-       }
-
-       /**
-        * This method returns the severity of the entry using TYPO3's icon and labels
-        *
-        * @param       array                   $PA: information related to the field
-        * @param       t3lib_tceform   $fobj: reference to calling TCEforms object
-        *
-        * @return      string  The HTML for the form field
-        */
-       public function displaySeverity($PA, $fobj) {
-               $html = '';
-               $this->doc = t3lib_div::makeInstance('template');
-               $severity = $PA['row']['severity'];
-
-                       // Gets the image
-               if ($severity == 0) {
-                       $html .= '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/info.gif','width="18" height="16" alt="pictogram"').' alt="" />';
-               }
-               else {
-                       $html .= $this->doc->icons($severity);
-               }
-               
-                       // Change severity for the label
-               if ($severity == -1) {
-                       $severity = 4;
-               }
-
-               $html .= ' <span style="font-weight: bold; margin-left: 5px">';
-               $html .= $GLOBALS['LANG']->sL('LLL:EXT:devlog/locallang_db.xml:tx_devlog.severity.I.' . $severity);
-               $html .= '</span>';
-               return $html;
-       }
-
-       /**
-        * This method returns the additional data's content as HTML structure
-        *
-        * @param       array                   $PA: information related to the field
-        * @param       t3lib_tceform   $fobj: reference to calling TCEforms object
-        *
-        * @return      string  The HTML for the form field
-        */
-       public function displayAdditionalData($PA, $fobj) {
-               if (empty($PA['row']['data_var'])) {
-                       $html = $GLOBALS['LANG']->sL('LLL:EXT:devlog/locallang_db.xml:tx_devlog.no_extra_data');
-               }
-               else {
-                       $data = unserialize($PA['row']['data_var']);
-                       $html = t3lib_div::view_array($data);
-               }
-               return $html;
-       }
-
-
-}
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/devlog/class.tx_devlog_tceforms.php'])        {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/devlog/class.tx_devlog_tceforms.php']);
-}
-
-?>
\ No newline at end of file
diff --git a/ext_autoload.php b/ext_autoload.php
deleted file mode 100644 (file)
index e6399be..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-/*
- * Register necessary class names with autoloader
- *
- * $Id$
- */
-$extensionPath = t3lib_extMgm::extPath('devlog');
-return array(
-       'tx_devlog_logwriter' => $extensionPath . 'interfaces/interface.tx_devlog_logwriter.php',
-       'tx_devlog_writers_database' => $extensionPath . 'writers/class.tx_devlog_writers_database.php',
-);
-?>
index 01a4806..44a3d25 100644 (file)
@@ -1,43 +1,31 @@
-# customsubcategory=limits=LLL:EXT:devlog/locallang.xml:limits
-# customsubcategory=filtering=LLL:EXT:devlog/locallang.xml:filtering
-# customsubcategory=display=LLL:EXT:devlog/locallang.xml:display
-# customsubcategory=deprecated=LLL:EXT:devlog/locallang.xml:deprecated
+# customcategory=general=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:general
+# customcategory=dbwriter=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:db_writer
+# customcategory=filewriter=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:file_writer
 
-# cat=basic/limits/; type=integer; label=Maximum number of log runs: Set the maximum number of log runs you want to display in the menu of log runs
-maxLogRuns = 15
+# customsubcategory=limits=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:limits
+# customsubcategory=filtering=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:filtering
+# customsubcategory=display=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:display
 
-# cat=basic/limits/; type=integer; label=Number of entries per page: Set the number of log entries to display per page, when viewing all log entries
-entriesPerPage = 25
-
-# cat=basic/limits/; type=integer; label=Maximum number of rows: Maximum number of rows that should be stored in the log table
-maxRows = 1000
-
-# cat=basic/limits/; type=boolean; label=Optimize devlog table: Run OPTIMIZE on the tx_devlog table after records are purged to reduce the overhead. Note that this will work only with MySQL databases.
-optimize = 0
-
-# cat=basic/limits/; type=integer; label=Maximum size of extra data: The extra data field accepts an array containing any number of data. However when that array becomes too large, writing it to the database may actually crash you server. It is recommended to set a limit (in number of characters).
-dumpSize = 1000000
-
-# cat=basic/filtering/; type=options[-1,0,1,2,3]; label=Minimum level for logging: Minimum message level required for actually writing to the log table
-minLogLevel = -1
+# cat=general/filtering/; type=options[LLL:EXT:devlog/Resources/Private/Language/locallang.xlf:status_ok=-1,LLL:EXT:devlog/Resources/Private/Language/locallang.xlf:status_information=0,LLL:EXT:devlog/Resources/Private/Language/locallang.xlf:status_notice=1,LLL:EXT:devlog/Resources/Private/Language/locallang.xlf:status_warning=2,LLL:EXT:devlog/Resources/Private/Language/locallang.xlf:status_error=3]; label=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:minimum_level
+minimumLogLevel = -1
 
-# cat=basic/filtering/; type=string; label=Exclude keys: Comma-separated list of (extension) keys that should not be logged into the Developer Log
+# cat=general/filtering/; type=string; label=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:excluded_keys
 excludeKeys =
 
-# cat=basic/display/; type=string; label=Highlight style: Style used for highlighting search keywords. Use proper CSS properties as this goes into a style="" attribute
-highlightStyle = padding: 2px; background-color: #fc3; border: 1px solid #666
-
-# cat=basic/display/; type=integer; label=Autorefresh frequency: Set the number of seconds between each refresh, when using the autorefresh feature
+# cat=general/display/; type=integer; label=Autorefresh frequency: Set the number of seconds between each refresh, when using the autorefresh feature
 refreshFrequency = 2
 
-# cat=basic/xxx/; type=string; label=Path to Prototype: If you are using TYPO3 4.0 or less, download the Prototype JavaScript library, put it somewhere in fileadmin or inside some extension and indicate the path here
-prototypePath = 
+# cat=general/display/; type=integer; label=Number of entries per page: Set the number of log entries to display per page, when viewing all log entries
+entriesPerPage = 25
+
+# cat=dbwriter/limits/; type=integer; label=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:maximum_rows
+maximumRows = 1000
+
+# cat=dbwriter/limits/; type=boolean; label=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:optimize
+optimizeTable = 1
 
-# cat=basic/deprecated/; type=boolean; label=Automatic clean up: Check this box if you want to automatically clean up log runs in excess of maxLogRuns when entering the BE module (this setting may be dropped in the future, use maxRows instead)
-autoCleanup = 0
+# cat=dbwriter/limits/; type=integer; label=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:maximum_extra_data_size
+maximumExtraDataSize = 1000000
 
-TSConstantEditor.basic {
-  description = <span style="background:red; padding:1px 2px; color:#fff; font-weight:bold;">1</span> TYPO3 and its extensions may write a very large number of information in the log table. This may actually overload your database in a worst-case scenario. Using this feature you can limit the number of logs stored in the database. Every time this limit is passed, a number of the oldest records (10% of maxRows) will be deleted.<br />If you don't want this automatic clean up, set maxRows to 0.<br /><br /><span style="background:red; padding:1px 2px; color:#fff; font-weight:bold;">2</span> All messages come with a level. -1 = information, 0 = ok, 1 = notice, 2 = warning, 3 = error. Set this variable to the minimum level of logging that you want. Setting to -1 will log all messages. Setting to 2, for example, will only log warnings and errors, thus reducing the number of records stored in the database.
-  1=maxRows
-  2=minLogLevel
-}
+# cat=filewriter//; type=string; label=LLL:EXT:devlog/Resources/Private/Language/locallang_configuration.xlf:log_file_path
+logFilePath =
index 551a174..db8d056 100644 (file)
 ########################################################################
 
 $EM_CONF[$_EXTKEY] = array(
-       'title' => 'Developer Log',
+       'title' => 'Developer\'s Log',
        'description' => 'The Developer log extension provides development logging/debugging functionality for usage of t3lib_div::devlog() and a BE module to browse the logs.',
        'category' => 'misc',
-       'shy' => 0,
-       'dependencies' => 'cms',
+       'shy' => FALSE,
+       'dependencies' => '',
        'conflicts' => '',
        'priority' => '',
        'loadOrder' => '',
@@ -26,17 +26,15 @@ $EM_CONF[$_EXTKEY] = array(
        'modify_tables' => '',
        'clearCacheOnLoad' => 1,
        'lockType' => '',
-       'author' => 'Rene Fritz, Francois Suter',
+       'author' => 'Francois Suter',
        'author_email' => 'typo3@cobweb.ch',
        'author_company' => '',
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
-       'version' => '2.9.2',
+       'version' => '3.0-dev',
        'constraints' => array(
                'depends' => array(
-                       'typo3' => '3.5.0-0.0.0',
-                       'php' => '3.0.0-0.0.0',
-                       'cms' => '',
+                       'typo3' => '6.2.0-6.2.99',
                ),
                'conflicts' => array(
                ),
diff --git a/ext_icon.gif b/ext_icon.gif
deleted file mode 100755 (executable)
index 964e4d9..0000000
Binary files a/ext_icon.gif and /dev/null differ
diff --git a/ext_icon.png b/ext_icon.png
new file mode 100644 (file)
index 0000000..7dfe426
Binary files /dev/null and b/ext_icon.png differ
index 834949b..43c8cda 100644 (file)
@@ -3,31 +3,9 @@ if (!defined ('TYPO3_MODE')) {
        die ('Access denied.');
 }
 
-       // Load Devlog Classes
-require_once(t3lib_extMgm::extPath('devlog', 'class.tx_devlog_exception.php'));
+// Register the logging method with the appropriate hook
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'][$_EXTKEY] = 'Devlog\\Devlog\\Utility\\Logger->log';
 
-
-       // Define the timestamp for the current run
-       // TODO: move to tx_devlog constructor (as static variables)
-if (!$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['mstamp']) {
-       $parts = explode(' ', microtime());
-               // Timestamp with microseconds to make sure 2 log runs can always be distinguished
-               // even when happening very close to one another
-               // TODO: improve with microtime(true), but requires PHP > 5
-       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['mstamp'] = (string)$parts[1] . (string)intval((float)$parts[0] * 10000.0);
-               // Normal timestamp
-       $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['tstamp'] = $parts[1];
-}
-
-       // Register the logging method with the appropriate hook
-$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'][$_EXTKEY] = 'EXT:'.$_EXTKEY.'/class.tx_devlog.php:&tx_devlog->devLog';
-
-       // @todo: choose one technique for loading data
-       //$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect']['TYPO3.Devlog.Remote'] = 'EXT:devlog/class.tx_devlog_remote.php:tx_devlog_remote';
-$TYPO3_CONF_VARS['BE']['AJAX']['LogController::indexAction'] = 'EXT:devlog/class.tx_devlog_remote.php:tx_devlog_remote->indexAction';
-$TYPO3_CONF_VARS['BE']['AJAX']['LogController::getDataVar'] = 'EXT:devlog/class.tx_devlog_remote.php:tx_devlog_remote->getDataVar';
-$TYPO3_CONF_VARS['BE']['AJAX']['LogController::getLastLogTime'] = 'EXT:devlog/class.tx_devlog_remote.php:tx_devlog_remote->getLastLogTime';
-
-       // Register log writers
-$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['writers']['db'] = 'tx_devlog_writers_Database';
-?>
\ No newline at end of file
+// Register log writers
+$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['devlog']['writers']['db'] = 'Devlog\\Devlog\\Writer\\DatabaseWriter';
+$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['devlog']['writers']['file'] = 'Devlog\\Devlog\\Writer\\FileWriter';
index 6223a35..f230592 100644 (file)
@@ -3,44 +3,17 @@ if (!defined ('TYPO3_MODE')) {
        die ('Access denied.');
 }
 
-if (TYPO3_MODE=='BE') {
-       t3lib_extMgm::addModule('tools', 'txdevlogM1', '', t3lib_extMgm::extPath($_EXTKEY) . 'mod1/');
-}
-
-// Includes
-require_once(t3lib_extMgm::extPath('devlog', 'class.tx_devlog_tceforms.php'));
-
-t3lib_extMgm::allowTableOnStandardPages('tx_devlog');
-
-$TCA['tx_devlog'] = array(
-       'ctrl' => array(
-               'title' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog',         
-               'label' => 'msg',       
-               'crdate' => 'crdate',
-               'cruser_id' => 'cruser_id',
-               'default_sortby' => 'ORDER BY crdate DESC,uid',
-               'rootLevel' => -1,
-               'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
-               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_devlog.gif',
-       ),
-       'feInterface' => array(
-               'fe_admin_fieldList' => 'severity, extkey, msg, location, line, data_var',
-       )
-);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_devlog_domain_model_entry');
 
 // Add context sensitive help (csh) to the backend module and to the tx_devlog table
-t3lib_extMgm::addLLrefForTCAdescr('_MOD_tools_txdevlogM1', 'EXT:devlog/locallang_csh_txdevlog.xml');
-t3lib_extMgm::addLLrefForTCAdescr('tx_devlog', 'EXT:devlog/locallang_csh_txdevlog.xml');
-
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
+       'tx_devlog_domain_model_entry',
+       'EXT:devlog/Resources/Private/Language/locallang_csh_txdevlog.xlf'
+);
 
-$pathToExtension = t3lib_extMgm::extRelPath('devlog');
+$pathToExtension = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('devlog');
+// Register the extension's icons
 $icons = array(
-       'error' => $pathToExtension . 'Resources/Public/images/icons/error.png',
-       'info' => $pathToExtension . 'Resources/Public/images/icons/information.png',
-       'notification' => $pathToExtension . 'Resources/Public/images/icons/notification.png',
-       'ok' => $pathToExtension . 'Resources/Public/images/icons/ok.png',
-       'warning' => $pathToExtension . 'Resources/Public/images/icons/warning.png',
+       'entry' => $pathToExtension . 'Resources/Public/Icons/Entry.png',
 );
-
-t3lib_SpriteManager::addSingleIcons($icons, 'devlog');
-?>
+\TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons($icons, 'devlog');
index 23b1e9d..9262ebe 100644 (file)
@@ -1,22 +1,24 @@
 #
-# Table structure for table 'tx_devlog'
+# Table structure for table 'tx_devlog_domain_model_entry'
 #
-CREATE TABLE tx_devlog (
-       uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment,
-       pid int(11) unsigned DEFAULT '0' NOT NULL,
-       crdate int(11) unsigned DEFAULT '0' NOT NULL,
-       crmsec bigint(11) unsigned DEFAULT '0' NOT NULL,
-       cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
+CREATE TABLE tx_devlog_domain_model_entry (
+
+       uid int(11) NOT NULL auto_increment,
+       pid int(11) DEFAULT '0' NOT NULL,
+
+       run_id varchar(50) DEFAULT '' NOT NULL,
        severity int(11) DEFAULT '0' NOT NULL,
-       extkey varchar(40) DEFAULT '' NOT NULL,
-       msg text NOT NULL,
+       extkey varchar(255) DEFAULT '' NOT NULL,
+       message text NOT NULL,
        location varchar(255) DEFAULT '' NOT NULL,
-       ip varchar(50) DEFAULT '' NOT NULL,
+       ip varchar(255) DEFAULT '' NOT NULL,
        line int(11) DEFAULT '0' NOT NULL,
-       data_var mediumtext NOT NULL,
-       
+       extra_data blob,
+
+       crdate int(11) unsigned DEFAULT '0' NOT NULL,
+       cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
+
        PRIMARY KEY (uid),
-       KEY parent (pid),
-       KEY crdate (crdate),
-       KEY crmsec (crmsec)
-) ENGINE = InnoDB;
\ No newline at end of file
+       KEY parent (pid)
+
+);
diff --git a/icon_tx_devlog.gif b/icon_tx_devlog.gif
deleted file mode 100755 (executable)
index 964e4d9..0000000
Binary files a/icon_tx_devlog.gif and /dev/null differ
diff --git a/interfaces/interface.tx_devlog_logwriter.php b/interfaces/interface.tx_devlog_logwriter.php
deleted file mode 100644 (file)
index 72bce50..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Francois Suter (typo3@cobweb.ch)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-
-/**
- * Interface that must be implemented for all classes that want to write devLog entries to some output system
- *
- * @author             Francois Suter <typo3@cobweb.ch>
- * @package            TYPO3
- * @subpackage tx_devlog
- *
- *  $Id$
- */
-interface tx_devlog_LogWriter {
-       /**
-        * This method is used to write a devLog entry to some support (database, file, etc.) or output
-        * It receives an array with the following information:
-        *
-        * pid =>               page where the call happened (if relevant, may be empty)
-        * severity =>  severity of the log entry
-        * message =>   main message of the log entry
-        * key =>               some key to identify the origin of the log entry (e.g. an extension's key)
-        * microtime => the microtime at which the entry happened (microtime is used to make sure we have different times for near-concurrent entries)
-        * location =>  the file where the call was triggered
-        * line =>              the line at which the call was triggered
-        * user =>              the BE user who was logged in at the time where the entry was written (may be empty)
-        * date =>              the timestamp at which the entry happened (less precise, but more usable than the microtime)
-        * ip =>                the IP address of the client machine which was making the request that triggered the entry
-        * data =>              additional information related to the entry, as a PHP array
-        *
-        * @abstract
-        * @param       array   $logEntry: addition information related to the log entry
-        * @return void
-        */
-       public function writeEntry($logEntry);
-}
-?>
\ No newline at end of file
diff --git a/locallang.xml b/locallang.xml
deleted file mode 100644 (file)
index 5986a3d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3locallang>
-    <meta type="array">
-        <description>Labels for EM</description>
-        <type>module</type>
-        <csh_table></csh_table>
-        <labelContext type="array">
-        </labelContext>
-    </meta>
-    <data type="array">
-        <languageKey index="default" type="array">
-            <label index="deprecated">Deprecated</label>
-            <label index="limits">Limits</label>
-            <label index="filtering">Filtering</label>
-            <label index="display">Display</label>
-        </languageKey>
-    </data>
-</T3locallang>
\ No newline at end of file
diff --git a/locallang_csh_txdevlog.xml b/locallang_csh_txdevlog.xml
deleted file mode 100644 (file)
index 0f4cad4..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3locallang>
-       <meta type="array">
-               <description>Contents of devlog csh</description>
-               <type>CSH</type>
-               <csh_table>_MOD_tools_txdevlogM1</csh_table>
-               <fileId>EXT:devlog/locallang_csh_txdevlog.xml</fileId>
-               <labelContext type="array">
-               </labelContext>
-       </meta>
-       <data type="array">
-               <languageKey index="default" type="array">
-                       <label index=".alttitle">Developer Log</label>
-                       <label index=".description">The Developer Log extension (devlog) provides logging functionality. It hooks into t3lib_div::devlog() to catch devlog events. A BE module gives an overview of the logged events. For more information read the extension manual, which can be found on typo3.org.</label>
-                       <label index=".syntax">If you want to make use of the devlog in your extension, simply call the following helper function with the appropriate parameters:
-                               t3lib_div::devlog($msg, $extKey, $severity = 0, $dataVar = false);
-
-                               The parameters are:
-                               $msg: Main log message (string)
-                               $extKey: Extension key (from which extension you are calling the log) (string)
-                               $severity: Severity: 0 is info, 1 is notice, 2 is warning, 3 is fatal error, -1 is "OK" message (integer)
-                               $dataVar: Additional data you want to pass to the logger (array)
-                       </label>
-                       <label index="crdate.alttitle">Log run time</label>
-                       <label index="crdate.description">This is the date and time at which the log entry was created.</label>
-                       <label index="crdate.details">
-                               All entries corresponding to the code execution are marked with the same date and time. This makes it possible to view them as a consistent group in the BE module. Such a group is called a "log run"
-                       </label>
-                       <label index="msg.alttitle">Log message</label>
-                       <label index="msg.description">The main message of the log entry.</label>
-                       <label index="severity.alttitle">Severity</label>
-                       <label index="severity.description">The severity gives you an impression of how serious the logged event is.</label>
-                       <label index="severity.details">
-                               There are five levels of severity, the higher the number, the more serious the event:
-                               Ok: These events indicate that everything went fine, no error occurred (at least up to that point where the event was created). No action needs to be taken.
-                               Info: These events are purely informational. They are normally used for debugging purposes only and require no special action.
-                               Notice: Abnormal condition, but not blocking. Notices are meant to raise attention. Processes have been completed, but things are not running as smoothly as they could and the condition should be investigated.
-                               Warning: These events are used to notify significant problems. Processes have been completed, but parts of them may be missing, wrong or corrupted. Warnings should not be ignored and action should definitely be taken.
-                               Error: These events signal that something went fatally wrong. Processes were not completed and action is definitely needed. Alternately this level may be used to point to a failed event, but in a process where failure can be expected, e.g. a login attempt with the wrong password.
-                       </label>
-                       <label index="_severity.image">EXT:devlog/Resources/Public/images/icons/csh_severities.png</label>
-                       <label index="extkey.alttitle">Extension</label>
-                       <label index="extkey.description">The component which triggered the event</label>
-                       <label index="extkey.details">
-                               The value is either an extension key or a reference to the core itself or some part of it. It depends on the logging implementation of the component which has triggered the event.
-                               One hint about excluded keys: There's an option in the extension manager to exclude some keys from being logged. Notice that if there were events registered with that key before you excluded it, those events will still be visible in the list.
-                       </label>
-                       <label index="location.alttitle">Call location</label>
-                       <label index="location.description">The class from which the devLog() call was made, with the line number.</label>
-                       <label index="pid.alttitle">Page</label>
-                       <label index="pid.description">The title of the page which was being processed when the event happened (if any). It's also the page where the record is stored.</label>
-                       <label index="pid.details">Events can also be found as page records in the web->list module. Note that events not triggered within a page context are stored at the root of the page tree.</label>
-                       <label index="cruser_id.alttitle">User</label>
-                       <label index="cruser_id.description">The BE user which was logged in the backend and triggered the event (if any).</label>
-                       <label index="cruser_id.details">This field is useful, if multiple BE users are triggering events at the same time, on the same pages or with the same components.</label>
-                       <label index="data_var.alttitle">Extra data</label>
-                       <label index="data_var.description">Extra data can provide an array with detailed information about the circumstances of the event.</label>
-                       <label index="data_var.details">
-                               There are almost no boundaries for this field, except that it is an array. In many cases, this field can contain the processed data, when the event has been triggered. For example, you could get the full stack debug trace when there is an SQL error. Another showcase would be to deliver be the relevant TS setup parts or any other configuration array.
-                               The value depends on the logging implementation of the component which has triggered the event.
-                       </label>
-               </languageKey>
-       </data>
-</T3locallang>
diff --git a/locallang_db.xml b/locallang_db.xml
deleted file mode 100644 (file)
index dd1372d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3locallang>
-    <meta type="array">
-        <description>Labels for database fields and values</description>
-        <type>database</type>
-        <csh_table></csh_table>
-        <labelContext type="array">
-        </labelContext>
-    </meta>
-    <data type="array">
-        <languageKey index="default" type="array">
-            <label index="tx_devlog">Developer Log</label>
-            <label index="tx_devlog.crdate">Run date and time:</label>
-            <label index="tx_devlog.severity.I.0">Info</label>
-            <label index="tx_devlog.severity.I.1">Notice</label>
-            <label index="tx_devlog.severity.I.2">Warning</label>
-            <label index="tx_devlog.severity.I.3">Fatal error</label>
-            <label index="tx_devlog.severity.I.4">Ok</label>
-            <label index="tx_devlog.severity">Severity:</label>
-            <label index="tx_devlog.extkey">Extension:</label>
-            <label index="tx_devlog.msg">Message:</label>
-            <label index="tx_devlog.location">Called from:</label>
-            <label index="tx_devlog.line">Calling line:</label>
-            <label index="tx_devlog.data_var">Additional data:</label>
-            <label index="tx_devlog.no_extra_data">No additional data provided</label>
-            <label index="tx_devlog.run">run</label>
-        </languageKey>
-    </data>
-</T3locallang>
\ No newline at end of file
diff --git a/mod1/clear.gif b/mod1/clear.gif
deleted file mode 100644 (file)
index 9ed1269..0000000
Binary files a/mod1/clear.gif and /dev/null differ
diff --git a/mod1/conf.php b/mod1/conf.php
deleted file mode 100644 (file)
index b4c5612..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$MLANG['default']['tabs_images']['tab'] = 'moduleicon.gif';
-$MLANG['default']['ll_ref']='LLL:EXT:devlog/mod1/locallang_mod.php';
-
-$MCONF['access']='admin';
-$MCONF['script'] = '_DISPATCH';
-
-$MCONF['name']='tools_txdevlogM1';
-?>
\ No newline at end of file
diff --git a/mod1/index.php b/mod1/index.php
deleted file mode 100644 (file)
index 6a277c2..0000000
+++ /dev/null
@@ -1,737 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2004 Rene Fritz (r.fritz@colorcube.de)
-*  (c) 2009 Francois Suter (typo3@cobweb.ch)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-*
-*  $Id$
-***************************************************************/
-
-/**
- * BE module for the 'devlog' extension.
- *
- * @author     Rene Fritz <r.fritz@colorcube.de>
- * @author     Francois Suter <typo3@cobweb.ch>
- * @author     Fabien Udriot <fabien.udriot@ecodev.ch>
- */
-
-       // this is a hack to prevent logging while initialization inside of this module
-$EXTCONF['devlog']['nolog'] = TRUE;
-$TYPO3_CONF_VARS['EXTCONF']['devlog']['nolog'] = TRUE;
-
-$BE_USER->modAccess($MCONF, 1);        // This checks permissions and exits if the users has no permission for entry.
-
-class tx_devlog_module1 extends t3lib_SCbase {
-       protected $pageinfo;
-       protected $logRuns = array(); // List of all log runs
-       protected $recentRuns = array(); // List of recent log runs
-       protected $setVars = array(); // All variables passed when calling the script (GET and POST)
-       protected $selectedLog; // Flag for the number of logs to display
-       protected $totalLogEntries; // Total number of log entries in the database
-       protected $filters = array(); // List of possible values for the log filters
-       protected $records = array(); // List of records that are gotten from the database and that may be used several times
-       protected $selectedFilters = array(); // Selected filters and their values
-       protected $extConf = array(); // Extension configuration
-       protected $defaultEntriesPerPage = 25; // Default value for number of entries per page configuration parameter
-       protected $cshKey; // Key of the CSH file
-       protected $cleanupPeriods = array('1hour' => '-1 hour', '1week' => '-1 week', '1month' => '-1 month', '3months' => '-3 months', '6months' => '-6 months', '1year' => '-1 year'); // List of possible periods for cleaning up log entries
-       protected $extensionName = 'devlog';
-
-       /**
-        * API of $this->pageRendererObject can be found at
-        * http://ecodev.ch/api/typo3/html/classt3lib___page_renderer.html
-        *
-        * @var t3lib_PageRenderer
-        */
-       protected $pageRendererObject;
-
-       /**
-        * API of $this->doc can be found at
-        * http://ecodev.ch/api/typo3/html/classtemplate.html
-        *
-        * @var template
-        */
-       public $doc;
-
-       /**
-        * the relative javascript path
-        *
-        * @var string
-        */
-       public $javascriptPath;
-
-
-       /**
-        * Initialise the plugin
-        *
-        * @return      void
-        */
-       function initialize()   {
-               global $MCONF;
-               global $BACK_PATH;
-
-                       // Get extension configuration
-               $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['devlog']);
-               if (empty($this->extConf['entriesPerPage'])) $this->extConf['entriesPerPage'] = $this->defaultEntriesPerPage;
-
-                       // Load language
-               $GLOBALS['LANG']->includeLLFile('EXT:devlog/Resources/Private/Language/locallang.xml');
-               
-                       // Get log run list
-//             $this->getLogRuns();
-
-                       // Clean up excess logs (if activated)
-               if ($this->extConf['autoCleanup']) $this->logGC();
-
-                       // Get and store the GET and POST variables
-               $this->setVars = t3lib_div::_GP('SET');
-
-               parent::init();
-
-//             $this->selectLog();
-
-                       // Set key for CSH
-               $this->cshKey = '_MOD_'.$MCONF['name'];
-
-               
-                       // Initilize properties
-               $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->backPath = $BACK_PATH;
-               $this->pageRendererObject = $this->doc->getPageRenderer();
-
-                       // Defines javascript resource file
-               $this->javascriptPath = t3lib_extMgm::extRelPath('devlog') . 'Resources/Public/javascripts/';
-               
-       }
-
-       /**
-        * Main function of the module. Write the content to $this->content
-        *
-        * @return      void
-        */
-       function main() {
-               global $BACK_PATH;
-
-               // Access check! Allow only admin user to view this content
-               if ($GLOBALS['BE_USER']->user['admin']) {
-
-                               // Processes the parameters passed to tx_devlog
-                       $message = $this->processParameters();
-
-                               // Load Inline CSS
-                       $this->loadStylesheets();
-
-                               // Load javascript header
-                       $this->loadJavascript();
-
-                       $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
-
-                       $markers['###HEADER###'] = $this->doc->header($GLOBALS['LANG']->getLL('title'));
-//                     $markers['###MENUBAR###'] = $this->renderMenuBar();
-                       $markers['###CLEARMENU###'] = $this->renderClearMenu();
-                       $markers['###OPEN_NEW_VIEW###'] = $this->openNewView();
-                       $markers['###MESSAGE###'] = $message;
-                       #$markers['###CONTENT###'] = $this->moduleContent();
-                       $markers['###SHORTCUT###'] = '';
-                       if ($GLOBALS['BE_USER']->mayMakeShortcut())     {
-                               $markers['###SHORTCUT###'] = $this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']);
-                       }
-
-                               // Merges label coming from the template (e.g EXT:devlog/Resources/Private/Template/index.html)
-                       #$markers = array_merge($markers, $this->getLabelMarkers());
-
-                       $backendTemplateFile = t3lib_div::getFileAbsFileName('EXT:devlog/Resources/Private/Templates/index.html');
-                       $this->content .= t3lib_parsehtml::substituteMarkerArray(file_get_contents($backendTemplateFile), $markers);
-               }
-               else {
-                               // If no access
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
-                       $this->doc->backPath = $BACK_PATH;
-
-                       $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
-                       $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
-               }
-       }
-
-       /**
-        * Load CSS styles onto the BE Module
-        *
-        * @return void
-        */
-       protected function loadStylesheets() {
-               $path = t3lib_extMgm::extRelPath('devlog');
-               
-//             $inlineCSS[] .= <<< EOF
-//
-//EOF;
-//             $this->pageRendererObject->addCssInlineBlock('Devlog', PHP_EOL . implode("\n", $inlineCSS) . PHP_EOL);
-               $this->pageRendererObject->addCssFile($path . 'Resources/Public/stylesheets/devlog.css');
-       }
-
-       /**
-        * Load Javascript files onto the BE Module
-        *
-        * @return void
-        */
-       protected function loadJavascript() {
-
-                       // *********************************** //
-                       // Load ExtCore library
-               $this->pageRendererObject->loadExtJS();
-               $this->pageRendererObject->enableExtJsDebug();
-
-                       // *********************************** //
-                       // Defines what files should be loaded and loads them
-               $files = array();
-               $files[] = 'Override/GridPanel.js';
-               $files[] = 'Utils.js';
-               $files[] = 'Application.js';
-               $files[] = 'Application/AbstractBootstrap.js';
-
-               // Stores
-               $files[] = 'Store/Bootstrap.js';
-//             $files[] = 'Store/LogDirectStore.js';
-               $files[] = 'Store/LogJsonStore.js';
-               $files[] = 'Store/TimeListStore.js';
-               $files[] = 'Store/SeverityListStore.js';
-               $files[] = 'Store/ExtensionListStore.js';
-               $files[] = 'Store/PageListStore.js';
-
-               // UserInterface
-               $files[] = 'UserInterface/Bootstrap.js';
-               $files[] = 'UserInterface/Layout.js';
-               $files[] = 'UserInterface/RowExpander.js';
-               $files[] = 'UserInterface/AjaxRowExpander.js';
-               $files[] = 'UserInterface/Iconcombo.js';
-
-               // Listing
-               $files[] = 'Listing/Bootstrap.js';
-               $files[] = 'Listing/LogGrid.js';
-               $files[] = 'Listing/TimeList.js';
-               $files[] = 'Listing/SeverityList.js';
-               $files[] = 'Listing/ExtensionList.js';
-               $files[] = 'Listing/PageList.js';
-
-               foreach ($files as $file) {
-                       $this->pageRendererObject->addJsFile($this->javascriptPath . $file, 'text/javascript', FALSE);
-               }
-
-               // @todo: no need of that now. Though, this line may be still used in the future for Ext Direct calls.
-//             $this->pageRendererObject->addJsFile('ajax.php?ajaxID=ExtDirect::getAPI&namespace=TYPO3.Devlog', 'text/javascript', FALSE);
-
-               // label / preference datasoure
-               $labels = json_encode($this->getLabels());
-               $preferences = json_encode($this->getPreferences());
-
-               // Other datasource
-               $timeList = json_encode($this->getTimeList());
-               $severityList = json_encode($this->getSeverityList());
-               $extensionList = json_encode($this->getExtensionList());
-               $pageList = json_encode($this->getPageList());
-               $logPeriod = json_encode($this->getLogPeriod());
-               $lastLogTime = json_encode($this->getLastLogTime());
-
-                       // *********************************** //
-                       // Defines onready Javascript
-               $readyJavascript = array();
-               $readyJavascript[] .= <<< EOF
-                       Ext.ns("TYPO3.Devlog");
-                       TYPO3.Devlog.Language = $labels;
-                       TYPO3.Devlog.Preferences = $preferences;
-
-                       Ext.ns("TYPO3.Devlog.Data");
-                       TYPO3.Devlog.Data.TimeList = $timeList;
-                       TYPO3.Devlog.Data.ExtensionList = $extensionList;
-                       TYPO3.Devlog.Data.SeverityList = $severityList;
-                       TYPO3.Devlog.Data.PageList = $pageList;
-                       TYPO3.Devlog.Data.LogPeriod = $logPeriod;
-                       TYPO3.Devlog.Data.LastLogTime = $lastLogTime;
-
-
-//             for (var api in Ext.app.ExtDirectAPI) {
-//                     Ext.Direct.addProvider(Ext.app.ExtDirectAPI[api]);
-//             }
-//
-//             TYPO3.Devlog.Remote.testMe("Hellooo", "World!", function(result) {
-//                     if (typeof console == "object") {
-//                             console.log(result);
-//                     } else {
-//                             alert(result);
-//                     }
-//             });
-
-EOF;
-
-               $this->pageRendererObject->addExtOnReadyCode(PHP_EOL . implode("\n", $readyJavascript) . PHP_EOL);
-
-                       // *********************************** //
-                       // Defines contextual variables
-                       // Define function for switching visibility of extra data field on or off
-               $imageExpand = t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/plusbullet_list.gif','width="18" height="12"');
-               $imageCollapse = t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/minusbullet_list.gif','width="18" height="12"');
-
-
-               if (!isset($this->extConf['refreshFrequency'])) {
-                       throw new tx_devlog_exception('Missing setting "refreshFrequency". Try to re-set settings in the Extension Manager.', 1275573201);
-               }
-               
-               $autoRefresh = $this->MOD_SETTINGS['autorefresh'] ? $this->extConf['refreshFrequency'] : '0';
-               $this->inlineJavascript[] .= <<< EOF
-Ext.ns("{$this->extensionName}");
-devlog = {
-       imageExpand: '<img $imageExpand alt="+" />',
-       imageCollapse: '<img $imageCollapse alt="-" />',
-       show_extra_data: '{$GLOBALS['LANG']->getLL('show_extra_data')}',
-       hide_extra_data: '{$GLOBALS['LANG']->getLL('hide_extra_data')}',
-       autorefresh: $autoRefresh,
-}
-EOF;
-               $this->pageRendererObject->addJsInlineCode('devlog', implode("\n", $this->inlineJavascript));
-       }
-
-       /**
-        * Get log period
-        *
-        * @global t3lib_DB $TYPO3_DB
-        * @global Language $LANG;
-        * @return string
-        */
-       public function getLogPeriod() {
-               global $TYPO3_DB;
-               global $LANG;
-
-               $content = '';
-               $startDate = $endDate = 0;
-
-               // Fetches interval of time
-               $records = $TYPO3_DB->exec_SELECTgetRows('MAX(crdate) AS maximum, MIN(crdate) AS minimum', 'tx_devlog', '');
-               if (!empty($records[0])) {
-                       $endDate = $records[0]['maximum'];
-                       $startDate = $records[0]['minimum'];
-               }
-               
-               if ($startDate > 0 && $endDate > 0) {
-                       // return rendered table and pagination
-                       if ($startDate != $endDate) {
-                               $content = $LANG->getLL('log_period').': '.t3lib_befunc::dateTimeAge($startDate).' - '.t3lib_befunc::dateTimeAge($endDate);
-                       }
-                       else {
-                               $content = $LANG->getLL('log_period') . ': '.t3lib_befunc::dateTimeAge($startDate);
-                       }
-               }
-               
-               return $content;
-       }
-
-       /**
-        * Get log period
-        *
-        * @global t3lib_DB $TYPO3_DB
-        * @return string
-        */
-       public function getLastLogTime() {
-               global $TYPO3_DB;
-               $result = 0;
-               // Fetches interval of time
-               $records = $TYPO3_DB->exec_SELECTgetRows('MAX(crmsec) AS crmsec', 'tx_devlog', '');
-               if (isset($records[0]['crmsec'])) {
-                       $result = $records[0]['crmsec'];
-               }
-               return $result;
-       }
-       /**
-        * Fetches filter by time
-        *
-        * @global t3lib_DB $TYPO3_DB
-        * @global Language $LANG;
-        * @return array
-        */
-       public function getTimeList() {
-               global $TYPO3_DB;
-               global $LANG;
-               
-                       // Initialize $records with default value
-               $records[] = array('1000', $LANG->getLL('latest_run'));
-               $records[] = array('25', $LANG->getLL('latest_25'));
-               $records[] = array('50', $LANG->getLL('latest_50'));
-               $records[] = array('100', $LANG->getLL('latest_100'));
-               $records[] = array('-1', $LANG->getLL('all_entries'));
-
-               $runLimit = empty($this->extConf['maxLogRuns']) ? 0 : $this->extConf['maxLogRuns'];
-               $dbres = $TYPO3_DB->exec_SELECTquery('DISTINCT crmsec, crdate', 'tx_devlog', '', '', 'crmsec DESC');
-
-                       // Assemble those runs in an associative array with run timestamp as a key
-               $counter = 0;
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) {
-                       $formattedDate = t3lib_befunc::dateTimeAge($row['crdate']);
-                       $logRuns[$row['crmsec']] = $formattedDate;
-                       if ($runLimit != 0 && $counter < $runLimit) {
-                               $records[] = array($row['crmsec'], $formattedDate);
-                       }
-                       $counter++;
-               }
-
-               $GLOBALS['TYPO3_DB']->sql_free_result($dbres);
-
-               return $records;
-       }
-
-       /**
-        * Fetches list of severities
-        *
-        * @global t3lib_DB $TYPO3_DB
-        * @global Language $LANG;
-        * @return array
-        */
-       public function getSeverityList() {
-               global $TYPO3_DB;
-               global $LANG;
-
-               $records[] = array('', $LANG->getLL('selectseverity'), '');
-               $dbres = $TYPO3_DB->exec_SELECTquery('DISTINCT severity', 'tx_devlog', '', '', 'crmsec DESC');
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) {
-                       $severityLabel = '';
-                       switch ($row['severity']) {
-                               case '-1':
-                                       $severity = 'ok';
-                                       break;
-                               case '0':
-                                       $severity = 'info';
-                                       break;
-                               case '1':
-                                       $severity = 'notice';
-                                       break;
-                               case '2':
-                                       $severity = 'warning';
-                                       break;
-                               case '3':
-                                       $severity = 'error';
-                                       break;
-                       }
-                       $severityLabel = $LANG->getLL('severity_' . $severity);
-                       $icon = t3lib_iconWorks::getSpriteIcon('extensions-devlog-' . $severity);
-                       $records[] = array($row['severity'], $severityLabel, $severity);
-               }
-               return $records;
-       }
-
-       /**
-        * Fetches list of extensions
-        *
-        * @global t3lib_DB $TYPO3_DB
-        * @global Language $LANG;
-        * @return array
-        */
-       public function getExtensionList() {
-               global $TYPO3_DB;
-               global $LANG;
-               global $TYPO3_LOADED_EXT;
-
-               $records[] = array('', $LANG->getLL('selectextentionkey'), '');
-               $dbres = $TYPO3_DB->exec_SELECTquery('DISTINCT extkey', 'tx_devlog', '', '', 'crmsec DESC');
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) {
-                       $extKey = $row['extkey'];
-                       if (isset($TYPO3_LOADED_EXT[$extKey]['typo3RelPath'])) {
-                               $className = $extKey;
-                               $iconPath = $TYPO3_LOADED_EXT[$extKey]['typo3RelPath'] . 'ext_icon.gif';
-                               $inlineCSS[] .= <<< EOF
-                                       .$extKey {
-                                               background-image:url(../../../../../../$iconPath) !important;
-                                       }
-EOF;
-                       }
-                       else {
-                               $className = 'missing';
-                       }
-                       $records[] = array($row['extkey'], $row['extkey'], $className);
-               }
-               $this->pageRendererObject->addCssInlineBlock('devlog-class-extension', PHP_EOL . implode("\n", $inlineCSS) . PHP_EOL);
-               return $records;
-       }
-       
-       /**
-        * Fetches list of pages
-        *
-        * @global t3lib_DB $TYPO3_DB
-        * @global Language $LANG;
-        * @return array
-        */
-       public function getPageList() {
-               global $TYPO3_DB;
-               global $LANG;
-
-               $records[] = array('', $LANG->getLL('selectpage'), '');
-               $dbres = $TYPO3_DB->exec_SELECTquery('DISTINCT pid', 'tx_devlog', '', 'pid ASC');
-
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) {
-
-                               // Retrieve the stored page information
-                       $page = t3lib_BEfunc::getRecord('pages', $row['pid']);
-                       $elementTitle = t3lib_BEfunc::getRecordTitle('pages', $page, 1);
-                       $records[] = array($row['pid'], $row['pid'] . ' - ' . $elementTitle, 'page');
-               }
-               return $records;
-       }
-
-       /**
-        * Return labels in the form of an array
-        *
-        * @global Language $LANG
-        * @global array $LANG_LANG
-        * @return array
-        */
-       protected function getLabels() {
-               global $LANG;
-               global $LOCAL_LANG;
-
-               if (isset($LOCAL_LANG[$LANG->lang]) && !empty($LOCAL_LANG[$LANG->lang])) {
-                       $markers = $LOCAL_LANG[$LANG->lang];
-                       //$markers = $LANG->includeLLFile('EXT:devlog/Resources/Private/Language/locallang.xml', 0);
-               }
-               else {
-                       throw new tx_devlog_exception('No language file has been found', 1276451853);
-               }
-               return $markers;
-       }
-
-       /**
-        * Returns some preferences for the Application
-        *
-        * @global array $TYPO3_CONF_VARS
-        * @return array
-        */
-       protected function getPreferences() {
-               global $TYPO3_CONF_VARS;
-
-               $preferences['dateFormat'] = $TYPO3_CONF_VARS['SYS']['ddmmyy'];
-               $preferences['timeFormat'] = $TYPO3_CONF_VARS['SYS']['hhmm'];
-               $preferences['pageSize'] = 25;
-               return $preferences;
-       }
-
-       /**
-        * Prints out the module HTML
-        *
-        * @return      void
-        */
-       function printContent() {
-               $this->content .= $this->doc->endPage();
-               $this->content = $this->doc->insertStylesAndJS($this->content);
-               echo $this->content;
-       }
-
-       /**
-        * Render the CSH icon/box of a given key and return the HTML code
-        *
-        * @param       string    $str: Locallang key
-        * @return      string    HTML output
-        */
-       function renderCsh($str) {
-               global $BACK_PATH;
-               return t3lib_BEfunc::cshItem($this->cshKey, $str, $BACK_PATH, '|', false, 'margin-bottom:0px;');
-       }
-
-       /**
-        * Processes GP parameters
-        *
-        * @return      string    HTML message for the BE
-        */
-       private function processParameters() {
-               $message = '';
-               $parameters = t3lib_div::_GP('tx_devlog');
-               if (isset($parameters['clear'])) {
-                       if ($parameters['clear'] == 'all') {
-                               $where = '';
-                       }
-                       else if ((int) $parameters['clear'] > 0) {
-                               $where = "crdate <= '" . $parameters['clear'] . "'";
-                       }
-                       else {
-                               $where = "extkey = '" . $parameters['clear'] . "'";
-                       }
-
-                       $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_devlog', $where);
-                       $affectedRows = $GLOBALS['TYPO3_DB']->sql_affected_rows();
-                       $message = $this->wrapMessage(sprintf($GLOBALS['LANG']->getLL('cleared_log'), $affectedRows), 'success');
-               }
-               return $message;
-       }
-
-       /**
-        * Render the "clear all" menu option and return the HTML code
-        *
-        * @return      string    HTML output
-        */
-       private function renderClearMenu() {
-               global $LANG;
-               $labelClearLog = $LANG->getLL('clearlog');
-               $labelClearAllLog = $LANG->getLL('clearalllog');
-               $labelCleanUpForPeriod = $LANG->getLL('cleanup_for_period');
-               $labelCleanUpForExtension = $LANG->getLL('cleanup_for_extension');
-               $numberOfEntries = $this->renderClearAllMenu();
-               $clearByTimeMenu = $this->renderClearByTimeMenu();
-               $clearByExtensionMenu = $this->renderClearByExtensionMenu();
-               $content .= <<< EOF
-<select onchange="this.parentNode.submit()" name="tx_devlog[clear]">
-       <option selected="selected" value="">$labelClearLog</option>
-       <optgroup class="c-divider" label="$labelClearAllLog">
-               <option value="all">$numberOfEntries</option>
-       </optgroup>
-       <optgroup class="c-divider" label="$labelCleanUpForPeriod">
-               $clearByTimeMenu
-       </optgroup>
-       <optgroup class="c-divider" label="$labelCleanUpForExtension">
-               $clearByExtensionMenu
-       </optgroup>
-</select>
-EOF;
-               return $content;
-       }
-
-       /**
-        * Render the "clear all" menu option and return the HTML code
-        *
-        * @return      string    HTML output
-        */
-       private function renderClearAllMenu() {
-               $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('COUNT(uid) AS total', 'tx_devlog', '');
-               $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres);
-               $GLOBALS['TYPO3_DB']->sql_free_result($dbres);
-               return sprintf($GLOBALS['LANG']->getLL('xx_entries'), $row['total']);
-       }
-
-       /**
-        * Render the "clear by time" menu and return the HTML code
-        *
-        * @param       string    $str: Locallang key
-        * @return      string    HTML output
-        */
-       private function renderClearByTimeMenu() {
-               $content = '';
-               foreach ($this->cleanupPeriods as $key => $period) {
-                       $date = strtotime($period);
-                       $content .= '<option value="'.$date.'">'.$GLOBALS['LANG']->getLL($key).'</option>';
-               }
-               return $content;
-       }
-
-       /**
-        * Render the "clear by extension" menu and return the HTML code
-        *
-        * @param       string    $str: Locallang key
-        * @return      string    HTML output
-        */
-       private function renderClearByExtensionMenu() {
-               $content = '';
-                       // Get list of existing extension keys in the log table
-               $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT extkey', 'tx_devlog', '', '', 'extkey ASC');
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) {
-                       $content .= '<option value="'.$row['extkey'].'">'.$row['extkey'].'</option>';
-               }
-               $GLOBALS['TYPO3_DB']->sql_free_result($dbres);
-
-               return $content;
-       }
-
-       /**
-        * This method wraps a given string with some styling depending on the type of message
-        * (success, wraning or error)
-        * This wrapper makes it easier to change the kind of styling (e.g. when it will be easier to load custom CSS in a BE module)
-        *
-        * @param       string  $string: the message to wrap
-        * @param       string  $type: the type of message (success, wraning or error)
-        * @return      string  The wrapped string
-        */
-       private function wrapMessage($string, $type = 'error') {
-               switch ($type) {
-                       case 'success':
-                               $type = t3lib_FlashMessage::OK;
-                               break;
-                       case 'warning':
-                               $type = t3lib_FlashMessage::ERROR;
-                               break;
-                       default:
-                               $type = t3lib_FlashMessage::INFO;
-                               break;
-               }
-
-               $flashMessage = t3lib_div::makeInstance(
-                       't3lib_FlashMessage',
-                       $string,
-                       '',
-                       $type
-               );
-               return $flashMessage->render();
-       }
-
-       /*******************************************
-        *
-        * DB stuff
-        *
-        *******************************************/
-
-       /**
-        * This method cleans up any log runs in excess of maxLogRuns
-        *
-        * @return      void
-        */
-       function logGC() {
-               if (!empty($this->extConf['maxLogRuns']) && count($this->logRuns) >= $this->extConf['maxLogRuns']) {
-                       $keys = array_keys($this->logRuns);
-                       $logRun = $keys[$this->extConf['maxLogRuns'] - 1];
-                       $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_devlog', 'crmsec < ' . $logRun);
-               }
-       }
-
-       /**
-        * This method prepares the link for opening the devlog in a new window
-        *
-        * @return      string  Hyperlink with icon and appropriate JavaScript
-        */
-       function openNewView() {
-               global $BACK_PATH;
-
-               $url = t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT');
-               $onClick = "devlogWin=window.open('" . $GLOBALS['MCONF']['_'] . "','devlog','width=790,status=0,menubar=1,resizable=1,location=0,scrollbars=1,toolbar=0');devlogWin.focus();return false;";
-               $content = '<a id="openview" href="#" onclick="' . htmlspecialchars($onClick).'">' .
-                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH,'gfx/open_in_new_window.gif', 'width="19" height="14"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.openInNewWindow', 1) . '" class="absmiddle" alt="" />' .
-                                       '</a>';
-               return $content;
-       }
-}
-
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/devlog/mod1/index.php'])      {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/devlog/mod1/index.php']);
-}
-
-try {
-       // Make instance:
-       $SOBE = t3lib_div::makeInstance('tx_devlog_module1');
-       $SOBE->initialize();
-       $SOBE->main();
-       $SOBE->printContent();
-}
-catch (Exception $e) {
-       print $e->getMessage();
-}
-?>
diff --git a/mod1/locallang_mod.xml b/mod1/locallang_mod.xml
deleted file mode 100644 (file)
index d49e25e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3locallang>
-    <meta type="array">
-        <description>Module description</description>
-        <type>module</type>
-        <csh_table></csh_table>
-        <labelContext type="array">
-        </labelContext>
-    </meta>
-    <data type="array">
-        <languageKey index="default" type="array">
-            <label index="mlang_tabs_tab">Developer Log</label>
-            <label index="mlang_labels_tabdescr">View entries written to the Developer Log using t3lib_div::devLog().</label>
-            <label index="mlang_labels_tablabel">Developer Log</label>
-        </languageKey>
-    </data>
-</T3locallang>
\ No newline at end of file
diff --git a/mod1/moduleicon.gif b/mod1/moduleicon.gif
deleted file mode 100755 (executable)
index 964e4d9..0000000
Binary files a/mod1/moduleicon.gif and /dev/null differ
diff --git a/tca.php b/tca.php
deleted file mode 100644 (file)
index 27c4e68..0000000
--- a/tca.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
-
-$TCA['tx_devlog'] = array(
-       'ctrl' => $TCA['tx_devlog']['ctrl'],
-       'interface' => array(
-               'showRecordFieldList' => 'severity,extkey,msg,location,data_var'
-       ),
-       'feInterface' => $TCA['tx_devlog']['feInterface'],
-       'columns' => array(
-               'crdate' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.crdate',
-                       'config' => array(
-                               'type' => 'input',
-                               'eval' => 'datetime',
-                               'readOnly' => true
-                       )
-               ),
-               'severity' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.severity',
-                       'config' => array(
-                               'type' => 'user',
-                               'userFunc' => 'tx_devlog_tceforms->displaySeverity',
-
-                       )
-               ),
-               'extkey' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.extkey',
-                       'config' => array(
-                               'type' => 'none'
-                       )
-               ),
-               'msg' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.msg',
-                       'config' => array(
-                               'type' => 'user',
-                               'userFunc' => 'tx_devlog_tceforms->displayMessage',
-                       )
-               ),
-               'location' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.location',
-                       'config' => array(
-                               'type' => 'none'
-                       )
-               ),
-               'line' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.line',
-                       'config' => array(
-                               'type' => 'none'
-                       )
-               ),
-               'data_var' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:devlog/locallang_db.xml:tx_devlog.data_var',
-                       'config' => array(
-                               'type' => 'user',
-                               'userFunc' => 'tx_devlog_tceforms->displayAdditionalData',
-                       )
-               )
-       ),
-       'types' => array(
-               '0' => array('showitem' => 'crdate;;;;1-1-1, severity;;;;1-1-1, extkey, msg, location;;1, data_var;;;;1-1-1')
-       ),
-       'palettes' => array(
-               '1' => array('showitem' => 'line', 'canNotCollapse' => true)
-       )
-);
-?>
\ No newline at end of file
diff --git a/writers/class.tx_devlog_writers_database.php b/writers/class.tx_devlog_writers_database.php
deleted file mode 100644 (file)
index 3c526ea..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Francois Suter (typo3@cobweb.ch)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-
-/**
- * This class writes log entries to the database table "tx_devlog"
- *
- * @author             Francois Suter <typo3@cobweb.ch>
- * @package            TYPO3
- * @subpackage tx_devlog
- *
- *  $Id$
- */
-class tx_devlog_writers_Database implements tx_devlog_LogWriter {
-       /**
-        * This method is used to write a devLog entry to the database
-        *
-        * @param       array   $logEntry: addition information related to the log entry
-        * @return void
-        */
-       public function writeEntry($logEntry) {
-               $insertFields = array(
-                       'pid' => $logEntry['pid'],
-                       'crmsec' => $logEntry['microtime'],
-                       'crdate' => $GLOBALS['EXEC_TIME'],
-                       'cruser_id' => $logEntry['user'],
-                       'ip' => $logEntry['ip'],
-                       'severity' => $logEntry['severity'],
-                       'extkey' => $logEntry['key'],
-                       'msg' => $logEntry['message'],
-                       'location' => $logEntry['location'],
-                       'line' => $logEntry['line'],
-                       'data_var' => $logEntry['data']
-               );
-               $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_devlog', $insertFields);
-       }
-}
-?>
\ No newline at end of file