Skip to content

Commit 73f0781

Browse files
committed
Remove atum template
Signed-off-by: Roland Dalmulder <[email protected]>
1 parent 4e759d9 commit 73f0781

File tree

6 files changed

+0
-390
lines changed

6 files changed

+0
-390
lines changed

administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.sys.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44
; Note : All ini files need to be saved as UTF-8
55

66
COM_PATCHTESTER="Joomla! Patch Tester"
7-
COM_PATCHTESTER_COULD_NOT_INSTALL_OVERRIDES="Could not install the template overrides for the following templates: %s"
8-
COM_PATCHTESTER_COULD_NOT_REMOVE_OVERRIDES="Could not remove the template overrides for the following templates: %s"
97
COM_PATCHTESTER_XML_DESCRIPTION="Component for pull request management testing"

administrator/components/com_patchtester/script.php

Lines changed: 0 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
* @license GNU General Public License version 2 or later
77
*/
88

9-
use Joomla\CMS\Factory;
10-
use Joomla\CMS\Filesystem\Folder;
119
use Joomla\CMS\Installer\Adapter\ComponentAdapter;
1210
use Joomla\CMS\Installer\InstallerScript;
13-
use Joomla\CMS\Language\Text;
1411

1512
/**
1613
* Installation class to perform additional changes during install/uninstall/update
@@ -19,14 +16,6 @@
1916
*/
2017
class Com_PatchtesterInstallerScript extends InstallerScript
2118
{
22-
/**
23-
* Array of templates with supported overrides
24-
*
25-
* @var array
26-
* @since 2.0
27-
*/
28-
protected $templateOverrides = array('atum');
29-
3019
/**
3120
* Extension script constructor.
3221
*
@@ -51,73 +40,6 @@ public function __construct()
5140
);
5241
}
5342

54-
/**
55-
* Function to perform changes during install
56-
*
57-
* @param ComponentAdapter $parent The class calling this method
58-
*
59-
* @return void
60-
*
61-
* @since 2.0
62-
*/
63-
public function install($parent)
64-
{
65-
$this->copyLayouts();
66-
}
67-
68-
/**
69-
* Function to perform changes during update
70-
*
71-
* @param ComponentAdapter $parent The class calling this method
72-
*
73-
* @return void
74-
*
75-
* @since 2.0
76-
*/
77-
public function update($parent)
78-
{
79-
$this->copyLayouts();
80-
}
81-
82-
/**
83-
* Function to perform changes during uninstall
84-
*
85-
* @param ComponentAdapter $parent The class calling this method
86-
*
87-
* @return void
88-
*
89-
* @since 2.0
90-
*/
91-
public function uninstall($parent)
92-
{
93-
// Initialize the error array
94-
$errorTemplates = array();
95-
96-
// Loop the supported templates
97-
foreach ($this->templateOverrides as $template)
98-
{
99-
// Set the file paths
100-
$tmplRoot = JPATH_ADMINISTRATOR . '/templates/' . $template;
101-
$overrideFolder = JPATH_ADMINISTRATOR . '/templates/' . $template . '/html/com_patchtester';
102-
103-
// Make sure the template is actually installed
104-
if (is_dir($tmplRoot))
105-
{
106-
// If there's a failure in copying the overrides, log it to the error array
107-
if (Folder::delete($overrideFolder))
108-
{
109-
$errorTemplates[] = ucfirst($template);
110-
}
111-
}
112-
}
113-
114-
// If we couldn't remove any overrides, notify the user
115-
if (count($errorTemplates) > 0)
116-
{
117-
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_PATCHTESTER_COULD_NOT_REMOVE_OVERRIDES', implode(', ', $errorTemplates)));
118-
}
119-
}
120-
12143
/**
12244
* Function to perform changes during postflight
12345
*
@@ -132,49 +54,4 @@ public function postflight($type, $parent)
13254
{
13355
$this->removeFiles();
13456
}
135-
136-
/**
137-
* Function to copy layout overrides for core templates at install or update
138-
*
139-
* @return void
140-
*
141-
* @since 2.0
142-
*/
143-
private function copyLayouts()
144-
{
145-
// Initialize the error array
146-
$errorTemplates = array();
147-
148-
// Loop the supported templates
149-
foreach ($this->templateOverrides as $template)
150-
{
151-
// Set the file paths
152-
$source = __DIR__ . '/' . $template;
153-
$tmplRoot = JPATH_ADMINISTRATOR . '/templates/' . $template;
154-
$destination = JPATH_ADMINISTRATOR . '/templates/' . $template . '/html/com_patchtester';
155-
156-
// Make sure the template is actually installed
157-
if (is_dir($tmplRoot))
158-
{
159-
// If there's a failure in copying the overrides, log it to the error array
160-
try
161-
{
162-
if (Folder::copy($source, $destination, '', true))
163-
{
164-
$errorTemplates[] = ucfirst($template);
165-
}
166-
}
167-
catch (RuntimeException $exception)
168-
{
169-
$errorTemplates[] = ucfirst($template);
170-
}
171-
}
172-
}
173-
174-
// If we couldn't remove any overrides, notify the user
175-
if (count($errorTemplates) > 0)
176-
{
177-
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_PATCHTESTER_COULD_NOT_INSTALL_OVERRIDES', implode(', ', $errorTemplates)));
178-
}
179-
}
18057
}

administrator/templates/atum/html/com_patchtester/fetch/default.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

administrator/templates/atum/html/com_patchtester/pulls/default.php

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)