[TASK] Fix various bits and pieces 57/50557/3
authorFrancois Suter <francois@typo3.org>
Wed, 9 Nov 2016 15:02:46 +0000 (16:02 +0100)
committerFrancois Suter <francois@typo3.org>
Wed, 9 Nov 2016 15:06:16 +0000 (16:06 +0100)
Add ordering of options in extension configuration file.
Add composer manifest.
Add missing usage of page length option.
Improved display of object dumps.
Change version to 3.0 and correct extension description.

Resolves: #78624
Releases: 3.0

Change-Id: Ibda27040cb299c7adb96382c5c9940671a8cc26e
Reviewed-on: https://review.typo3.org/50557
Reviewed-by: Francois Suter <francois@typo3.org>
Tested-by: Francois Suter <francois@typo3.org>
ChangeLog
Classes/Utility/UserFields.php
Resources/Public/JavaScript/ListModule.js
composer.json [new file with mode: 0644]
ext_conf_template.txt
ext_emconf.php

index d518f5e..35ca5be 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2016-11-09 Francois Suter <typo3@cobweb.ch>
 
        * Rewrote documentation and moved it to reST, resolves #78504
+       * Fixed various bits and pieces, added Composer manifest, resolves #78624
 
 2016-11-01 Francois Suter <typo3@cobweb.ch>
 
index 2f464f5..38b296e 100644 (file)
@@ -18,6 +18,7 @@ use TYPO3\CMS\Backend\Form\Element\UserElement;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
 
 /**
  * Custom fields for tx_devlog_domain_model_entry table.
@@ -82,14 +83,24 @@ class UserFields
             $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
-            );
+            // For objects, we use var_export() as DebuggerUtility does not handle unserialized objects well
+            // (maybe this can be improved by someone who knows better)
+            if (is_object($data)) {
+                $html = var_export(
+                        $data,
+                        true
+                );
+                $html = '<pre>' . $html . '</pre>';
+            } else {
+                $html = DebuggerUtility::var_dump(
+                        $data,
+                        null,
+                        10,
+                        false,
+                        true,
+                        true
+                );
+            }
         }
         return $html;
     }
index 60c99e3..4111972 100644 (file)
@@ -125,6 +125,7 @@ define(['jquery',
                                DevlogListModule.table = DevlogListModule.tableView.DataTable({
                                        data: data,
                                        dom: 'tp',
+                                       pageLength: TYPO3.settings.DevLog.entriesPerPage,
                                        // Default ordering is "run_id" and "crdate" columns
                                        order: [
                                                [DevlogListModule.columns.id, 'desc'],
diff --git a/composer.json b/composer.json
new file mode 100644 (file)
index 0000000..1911f06
--- /dev/null
@@ -0,0 +1,27 @@
+{
+       "name": "devlog/devlog",
+       "type": "typo3-cms-extension",
+       "description": "The Developer's Log extension provides development logging/debugging functionality for usage of GeneralUtility::devlog() and a BE module to browse the logs.",
+       "license": [
+               "GPL-2.0+"
+       ],
+       "authors": [
+               {
+                       "name": "Francois Suter",
+                       "role": "Developer"
+               }
+       ],
+       "autoload": {
+               "psr-4": {
+                       "Devlog\\Devlog\\": "Classes/"
+               }
+       },
+       "version": "3.0.0",
+       "require": {
+               "typo3/cms-core": ">=7.6.0,<8.0"
+       },
+       "replace": {
+               "devlog": "self.version",
+               "typo3-ter/devlog": "self.version"
+       }
+}
index f0fee06..83844fb 100644 (file)
@@ -24,13 +24,13 @@ refreshFrequency = 4
 # cat=general/display/b; 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/c; type=integer; label=LLL:EXT:devlog/Resources/Private/Language/Configuration.xlf:maximum_rows
+# cat=dbwriter/limits/a; type=integer; label=LLL:EXT:devlog/Resources/Private/Language/Configuration.xlf:maximum_rows
 maximumRows = 1000
 
-# cat=dbwriter/limits/a; type=boolean; label=LLL:EXT:devlog/Resources/Private/Language/Configuration.xlf:optimize
+# cat=dbwriter/limits/b; type=boolean; label=LLL:EXT:devlog/Resources/Private/Language/Configuration.xlf:optimize
 optimizeTable = 1
 
-# cat=dbwriter/limits/b; type=integer; label=LLL:EXT:devlog/Resources/Private/Language/Configuration.xlf:maximum_extra_data_size
+# cat=dbwriter/limits/c; type=integer; label=LLL:EXT:devlog/Resources/Private/Language/Configuration.xlf:maximum_extra_data_size
 maximumExtraDataSize = 1000000
 
 # cat=filewriter//; type=string; label=LLL:EXT:devlog/Resources/Private/Language/Configuration.xlf:log_file_path
index 6fd41b7..aa3275e 100644 (file)
@@ -12,7 +12,7 @@
 
 $EM_CONF[$_EXTKEY] = array(
     '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.',
+    'description' => 'The Developer\'s Log extension provides development logging/debugging functionality for usage of GeneralUtility::devlog() and a BE module to browse the logs.',
     'category' => 'misc',
     'priority' => '',
     'loadOrder' => '',
@@ -26,7 +26,7 @@ $EM_CONF[$_EXTKEY] = array(
     'author' => 'Francois Suter',
     'author_email' => 'typo3@cobweb.ch',
     'author_company' => '',
-    'version' => '3.0.0-dev',
+    'version' => '3.0.0',
     'constraints' => array(
         'depends' => array(
             'typo3' => '7.6.0-7.99.99',