summaryrefslogtreecommitdiffstats
path: root/inc/configmodule/customodule.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/configmodule/customodule.inc.php')
-rw-r--r--inc/configmodule/customodule.inc.php55
1 files changed, 0 insertions, 55 deletions
diff --git a/inc/configmodule/customodule.inc.php b/inc/configmodule/customodule.inc.php
deleted file mode 100644
index 31796e9c..00000000
--- a/inc/configmodule/customodule.inc.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-ConfigModule::registerModule(
- ConfigModule_CustomModule::MODID, // ID
- Dictionary::translate('config-module', 'custom_title'), // Title
- Dictionary::translate('config-module', 'custom_description'), // Description
- Dictionary::translate('config-module', 'group_generic'), // Group
- false, // Only one per config?
- 100 // Sort order
-);
-
-class ConfigModule_CustomModule extends ConfigModule
-{
- const MODID = 'CustomModule';
- const VERSION = 1;
-
- private $tmpFile = false;
-
- protected function generateInternal($tgz, $parent)
- {
- if (!$this->validateConfig()) {
- return $this->archive() !== false && file_exists($this->archive()); // No new temp file given, old archive still exists, pretend it worked...
- }
- $task = Taskmanager::submit('MoveFile', array(
- 'source' => $this->tmpFile,
- 'destination' => $tgz,
- 'parentTask' => $parent,
- 'failOnParentFail' => false
- ));
- return $task;
- }
-
- protected function moduleVersion()
- {
- return self::VERSION;
- }
-
- protected function validateConfig()
- {
- return $this->tmpFile !== false && file_exists($this->tmpFile);
- }
-
- public function setData($key, $value)
- {
- if ($key !== 'tmpFile' || !file_exists($value))
- return false;
- $this->tmpFile = $value;
- }
-
- public function getData($key)
- {
- return false;
- }
-
-}