forked from cs2ag/powermail
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/powermail/trunk@43180 735d13b6-9817-0410-8766-e36946ffe9aa
- Loading branch information
wunschtacho
committed
Feb 6, 2011
1 parent
417b5f1
commit fac0116
Showing
4 changed files
with
108 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
class tx_powermail_scheduler extends tx_scheduler_Task { | ||
|
||
/** | ||
* Function executed from the Scheduler. | ||
* | ||
* @return bool | ||
*/ | ||
public function execute() { | ||
|
||
|
||
|
||
|
||
mail('[email protected]', 'scheduler', 'scheduler'); | ||
return 'fehler'; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
class tx_powermail_scheduler_addField implements tx_scheduler_AdditionalFieldProvider { | ||
|
||
public function getAdditionalFields(array &$taskInfo, $task, tx_scheduler_Module $parentObject) { | ||
|
||
if (empty($taskInfo['ip'])) { | ||
if($parentObject->CMD == 'edit') { | ||
$taskInfo['ip'] = $task->ip; | ||
} else { | ||
$taskInfo['ip'] = ''; | ||
} | ||
} | ||
|
||
if (empty($taskInfo['port'])) { | ||
if($parentObject->CMD == 'add') { | ||
$taskInfo['port'] = '80'; | ||
} elseif($parentObject->CMD == 'edit') { | ||
$taskInfo['port'] = $task->port; | ||
} else { | ||
$taskInfo['port'] = ''; | ||
} | ||
} | ||
|
||
// Write the code for the field | ||
$fieldID = 'task_ip'; | ||
$fieldCode = '<input type="text" name="tx_scheduler[ip]" id="' . $fieldID . '" value="' . $taskInfo['ip'] . '" size="30" />'; | ||
$additionalFields = array(); | ||
$additionalFields[$fieldID] = array( | ||
'code' => $fieldCode, | ||
'label' => 'IP-Adresse/Webseite' | ||
); | ||
|
||
// Write the code for the field | ||
$fieldID = 'task_port'; | ||
$fieldCode = '<input type="text" name="tx_scheduler[port]" id="' . $fieldID . '" value="' . $taskInfo['port'] . '" size="30" />'; | ||
$additionalFields[$fieldID] = array( | ||
'code' => $fieldCode, | ||
'label' => 'Port' | ||
); | ||
|
||
return $additionalFields; | ||
} | ||
|
||
public function validateAdditionalFields(array &$submittedData, tx_scheduler_Module $parentObject) { | ||
$submittedData['ip'] = trim($submittedData['ip']); | ||
$submittedData['port'] = trim($submittedData['port']); | ||
return true; | ||
} | ||
|
||
public function saveAdditionalFields(array $submittedData, tx_scheduler_Task $task) { | ||
$task->ip = $submittedData['ip']; | ||
$task->port = $submittedData['port']; | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
<?php | ||
/* | ||
* Register necessary class names with autoloader | ||
*/ | ||
|
||
$powermailExtPath = t3lib_extMgm::extPath('powermail'); | ||
|
||
return array( | ||
|
||
/* ajax actions*/ | ||
'tx_powermail_action' => $powermailExtPath . 'mod1/class.tx_powermail_action.php', | ||
|
||
/* ajax repositories */ | ||
'tx_powermail_repository' => $powermailExtPath . 'mod1/class.tx_powermail_repository.php', | ||
'tx_powermail_export' => $powermailExtPath . 'mod1/class.tx_powermail_export.php', | ||
|
||
/* div */ | ||
'tx_powermail_functions_div' => $powermailExtPath . 'lib/class.tx_powermail_functions_div.php', | ||
|
||
); | ||
?> | ||
<?php | ||
/* | ||
* Register necessary class names with autoloader | ||
*/ | ||
|
||
$powermailExtPath = t3lib_extMgm::extPath('powermail'); | ||
|
||
return array( | ||
|
||
/* ajax actions*/ | ||
'tx_powermail_action' => $powermailExtPath . 'mod1/class.tx_powermail_action.php', | ||
|
||
/* ajax repositories */ | ||
'tx_powermail_repository' => $powermailExtPath . 'mod1/class.tx_powermail_repository.php', | ||
'tx_powermail_export' => $powermailExtPath . 'mod1/class.tx_powermail_export.php', | ||
|
||
/* div */ | ||
'tx_powermail_functions_div' => $powermailExtPath . 'lib/class.tx_powermail_functions_div.php', | ||
|
||
/* scheduler */ | ||
'tx_powermail_scheduler' => $powermailExtPath . 'cli/class.tx_powermail_scheduler.php', | ||
'tx_powermail_scheduler_addField' => $powermailExtPath . 'cli/class.tx_powermail_scheduler_addField.php' | ||
|
||
); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters