Skip to content

Commit

Permalink
Merge pull request #106 from ticktackk/develop
Browse files Browse the repository at this point in the history
1.3.6
  • Loading branch information
ticktackk authored Aug 22, 2021
2 parents 381cda5 + aac7bd6 commit 82e30d9
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 29 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
==========================

## 1.3.6 (`1030670`)

- **Fix:** Large email HTML body causes "Data too long for column" exception to be thrown (#103)
- **Fix:** Building add-on from admin control panel does not rebuild data directory (#107)

## 1.3.5 (`1030570`)

- **Change:** Improvement to how `XF\PermissionCache` class is extended (#99) (Thanks @Xon)
Expand Down
Empty file modified Cli/Command/BetterExport.php
100755 → 100644
Empty file.
33 changes: 26 additions & 7 deletions Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,24 @@
use XF\AddOn\StepRunnerInstallTrait;
use XF\AddOn\StepRunnerUninstallTrait;
use XF\AddOn\StepRunnerUpgradeTrait;
use XF\Db\Schema\Alter;
use XF\Db\Schema\Alter as DbAlterSchema;
use XF\Util\File as FileUtil;
use XF\Util\Json as JsonUtil;
use XF\AddOn\AddOn;

/**
* Class Setup
*
* @package TickTackk\DeveloperTools
* @since 1.0.0
* @version 1.3.6
*/
class Setup extends AbstractSetup
{
use StepRunnerInstallTrait;
use StepRunnerUpgradeTrait;
use StepRunnerUninstallTrait;

/**
* @version 1.3.6
*/
public function installStep1() : void
{
$sm = $this->schemaManager();
Expand All @@ -38,8 +40,8 @@ public function installStep1() : void
$table->addColumn('to', 'blob');
$table->addColumn('cc', 'blob')->nullable();
$table->addColumn('bcc', 'blob')->nullable();
$table->addColumn('html_message', 'text')->nullable();
$table->addColumn('text_message', 'text')->nullable();
$table->addColumn('html_message', 'blob')->nullable();
$table->addColumn('text_message', 'blob')->nullable();

$table->addKey('log_date');
});
Expand Down Expand Up @@ -76,9 +78,12 @@ public function upgrade1000033Step1() : void
}
}

/**
* @version 1.3.6
*/
public function upgrade1000033Step2() : void
{
$this->schemaManager()->alterTable('xf_addon', function (Alter $table)
$this->schemaManager()->alterTable('xf_addon', function (DbAlterSchema $table)
{
$table->dropColumns(['devTools_license', 'devTools_gitignore', 'devTools_readme_md', 'devTools_parse_additional_files']);
});
Expand Down Expand Up @@ -238,4 +243,18 @@ public function upgrade1030070Step1() : void
{
$this->installStep1();
}

/**
* @since 1.3.6
*/
public function upgrade1030670Step1() : void
{
$sm = $this->schemaManager();

$sm->alterTable('xf_tck_developer_tools_email_log', function(DbAlterSchema $table)
{
$table->addColumn('html_message', 'blob')->nullable();
$table->addColumn('text_message', 'blob')->nullable();
});
}
}
54 changes: 41 additions & 13 deletions XF/Service/AddOn/ReleaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,43 @@

namespace TickTackk\DeveloperTools\XF\Service\AddOn;

use XF\Service\AbstractService;
use XF\Service\AddOn\Exporter as AddOnExporterSvc;
use XF\Util\File as FileUtil;

/**
* Class ReleaseBuilder
*
* @package TickTackk\DeveloperTools
* @version 1.3.6
*/
class ReleaseBuilder extends XFCP_ReleaseBuilder
{
/**
* @since 1.3.6
*/
protected function prepareDataDirectory() : void
{
$addOnExporterSvc = $this->getAddonExporterSvc();

foreach ($addOnExporterSvc->getContainers() AS $containerName)
{
$addOnExporterSvc->export($containerName);
}
}

/**
* @version 1.3.6
*/
protected function prepareFilesToCopy()
{
$this->prepareDataDirectory();

parent::prepareFilesToCopy();

foreach (['LICENSE', "README", 'CHANGELOG'] AS $fileName)
{
$this->copyFileToBuildRoot($fileName, ['md', '', 'txt', 'html']);
}
}

/**
* @throws \XF\PrintableException
*/
Expand Down Expand Up @@ -48,16 +76,6 @@ protected function excludeFiles(array $excludedFiles) : void
}
}

protected function prepareFilesToCopy()
{
parent::prepareFilesToCopy();

foreach (['LICENSE', "README", 'CHANGELOG'] AS $fileName)
{
$this->copyFileToBuildRoot($fileName, ['md', '', 'txt', 'html']);
}
}

/**
* @param array|string $possibleFileName
* @param array|string $possibleExtensions
Expand Down Expand Up @@ -126,4 +144,14 @@ protected function getExcludedDirectories()

return \array_unique($excludedDirectories);
}

/**
* @since 1.3.6
*
* @return AbstractService|AddOnExporterSvc
*/
protected function getAddonExporterSvc() : AddOnExporterSvc
{
return $this->service('XF:AddOn\Exporter', $this->addOn);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"from_class": "XF\\Admin\\Controller\\Log",
"to_class": "TickTackk\\DeveloperTools\\XF\\Admin\\Controller\\Log",
"execute_order": 10,
"execute_order": 6119,
"active": true
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"from_class": "XF\\Mail\\Mailer",
"to_class": "TickTackk\\DeveloperTools\\XF\\Mail\\Mailer",
"execute_order": 10,
"execute_order": 6119,
"active": true
}
10 changes: 5 additions & 5 deletions _output/extension_hint.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ class XFCP_Template extends \XF\Admin\Controller\Template {}
class XFCP_TemplateModification extends \XF\Admin\Controller\TemplateModification {}
}

namespace TickTackk\DeveloperTools\XF
{
class XFCP_PermissionCache extends \XF\PermissionCache {}
}

namespace TickTackk\DeveloperTools\XF\Entity
{
class XFCP_CodeEventListener extends \XF\Entity\CodeEventListener {}
Expand All @@ -44,6 +39,11 @@ class XFCP_Mailer extends \XF\Mail\Mailer {}
class XFCP_Json extends \XF\Mvc\Renderer\Json {}
}

namespace TickTackk\DeveloperTools\XF
{
class XFCP_PermissionCache extends \XF\PermissionCache {}
}

namespace TickTackk\DeveloperTools\XF\Repository
{
class XFCP_CodeEvent extends \XF\Repository\CodeEvent {}
Expand Down
4 changes: 2 additions & 2 deletions addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"legacy_addon_id": "",
"title": "Developer Tools",
"description": "This add-on provides enhancements for add-on developers.",
"version_id": 1030570,
"version_string": "1.3.5",
"version_id": 1030670,
"version_string": "1.3.6",
"dev": "TickTackk",
"dev_url": "https://xenforo.com/community/members/ticktackk.90375/",
"faq_url": "",
Expand Down

0 comments on commit 82e30d9

Please sign in to comment.