Commit 2d81d318 authored by Oliver Hader's avatar Oliver Hader
Browse files

Cleanup: Set SVN end of line property

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7906 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 2af0a3e5
2010-06-13 Oliver Hader <oliver@typo3.org>
 
* Cleanup: Updated copyright comments
* Cleanup: Set SVN end of line property
 
2010-06-13 Benjamin Mack <benni@typo3.org>
 
......
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Tolleiv Nietsch <nietsch@aoemedia.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* interface for classes which hook into t3lib_pageSelect
*
* @author Tolleiv Nietsch <nietsch@aoemedia.de>
* @package TYPO3
* @subpackage t3lib
*/
interface t3lib_pageSelect_getPageOverlayHook {
/**
* enables to preprocess the pageoverlay
*
* @param array $pageInput - the page record
* @param integer $lUid - the overlay language
* @param t3lib_pageSelect $parent - the calling parent object
* @return void
*/
public function getPageOverlay_preProcess(&$pageInput, &$lUid, t3lib_pageSelect $parent);
}
?>
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Tolleiv Nietsch <nietsch@aoemedia.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* interface for classes which hook into t3lib_pageSelect
*
* @author Tolleiv Nietsch <nietsch@aoemedia.de>
* @package TYPO3
* @subpackage t3lib
*/
interface t3lib_pageSelect_getPageOverlayHook {
/**
* enables to preprocess the pageoverlay
*
* @param array $pageInput - the page record
* @param integer $lUid - the overlay language
* @param t3lib_pageSelect $parent - the calling parent object
* @return void
*/
public function getPageOverlay_preProcess(&$pageInput, &$lUid, t3lib_pageSelect $parent);
}
?>
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Tolleiv Nietsch <nietsch@aoemedia.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* interface for classes which hook into t3lib_pageSelect
*
* @author Tolleiv Nietsch <nietsch@aoemedia.de>
* @package TYPO3
* @subpackage t3lib
*/
interface t3lib_pageSelect_getRecordOverlayHook {
/**
* Enables to preprocess a record overlay
*
* @param string $table
* @param array $row
* @param integer $sys_language_content
* @param string $OLmode
* @param t3lib_pageSelect $parent
*/
public function getRecordOverlay_preProcess($table, &$row, &$sys_language_content, $OLmode, t3lib_pageSelect $parent);
/**
* Enables to postprocess a record overlay
*
* @param string $table
* @param array $row
* @param integer $sys_language_content
* @param string $OLmode
* @param t3lib_pageSelect $parent
*/
public function getRecordOverlay_postProcess($table, &$row, &$sys_language_content, $OLmode, t3lib_pageSelect $parent);
}
?>
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Tolleiv Nietsch <nietsch@aoemedia.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* interface for classes which hook into t3lib_pageSelect
*
* @author Tolleiv Nietsch <nietsch@aoemedia.de>
* @package TYPO3
* @subpackage t3lib
*/
interface t3lib_pageSelect_getRecordOverlayHook {
/**
* Enables to preprocess a record overlay
*
* @param string $table
* @param array $row
* @param integer $sys_language_content
* @param string $OLmode
* @param t3lib_pageSelect $parent
*/
public function getRecordOverlay_preProcess($table, &$row, &$sys_language_content, $OLmode, t3lib_pageSelect $parent);
/**
* Enables to postprocess a record overlay
*
* @param string $table
* @param array $row
* @param integer $sys_language_content
* @param string $OLmode
* @param t3lib_pageSelect $parent
*/
public function getRecordOverlay_postProcess($table, &$row, &$sys_language_content, $OLmode, t3lib_pageSelect $parent);
}
?>
/***************************************************************
* Copyright notice
*
* (c) 2010 Steffen Kamper <info@sk-typo3.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Flashmessage rendered by ExtJS
*
*
* @author Steffen Kamper <info@sk-typo3.de>
* @package TYPO3
* @subpackage t3lib
* @version $Id: $
*/
Ext.ns('TYPO3');
/**
* @class TYPO3.Flashmessage
* Passive popup box singleton
* @singleton
*
* Example (Information message):
* TYPO3.Flashmessage.display(1, 'TYPO3 Backend - Version 4.4', 'Ready for take off', 3);
*/
TYPO3.Flashmessage = function() {
var messageContainer;
var severities = ['notice', 'information', 'ok', 'warning', 'error'];
function createBox(severity, title, message){
return ['<div class="typo3-message message-', severity, '" style="width: 400px">',
'<div class="header-container">',
'<div class="message-header">', title, '</div>',
'</div>',
'<div class="message-body">', message, '</div>',
'</div>'].join('');
}
return {
/**
* Shows popup
* @member TYPO3.Flashmessage
* @param int severity (0=notice, 1=information, 2=ok, 3=warning, 4=error)
* @param string title
* @param string message
* @param float duration in sec (default 5)
*/
display : function(severity, title, message, duration){
duration = duration || 5;
if(!messageContainer){
messageContainer = Ext.DomHelper.insertFirst(document.body, {
id : 'msg-div',
style: 'position:absolute;z-index:10000'
}, true);
}
var box = Ext.DomHelper.append(messageContainer, {
html: createBox(severities[severity], title, message)
}, true);
messageContainer.alignTo(document, 't-t');
box.slideIn('t').pause(duration).ghost('t', {remove:true});
}
}
/***************************************************************
* Copyright notice
*
* (c) 2010 Steffen Kamper <info@sk-typo3.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Flashmessage rendered by ExtJS
*
*
* @author Steffen Kamper <info@sk-typo3.de>
* @package TYPO3
* @subpackage t3lib
* @version $Id: $
*/
Ext.ns('TYPO3');
/**
* @class TYPO3.Flashmessage
* Passive popup box singleton
* @singleton
*
* Example (Information message):
* TYPO3.Flashmessage.display(1, 'TYPO3 Backend - Version 4.4', 'Ready for take off', 3);
*/
TYPO3.Flashmessage = function() {
var messageContainer;
var severities = ['notice', 'information', 'ok', 'warning', 'error'];
function createBox(severity, title, message){
return ['<div class="typo3-message message-', severity, '" style="width: 400px">',
'<div class="header-container">',
'<div class="message-header">', title, '</div>',
'</div>',
'<div class="message-body">', message, '</div>',
'</div>'].join('');
}
return {
/**
* Shows popup
* @member TYPO3.Flashmessage
* @param int severity (0=notice, 1=information, 2=ok, 3=warning, 4=error)
* @param string title
* @param string message
* @param float duration in sec (default 5)
*/
display : function(severity, title, message, duration){
duration = duration || 5;
if(!messageContainer){
messageContainer = Ext.DomHelper.insertFirst(document.body, {
id : 'msg-div',
style: 'position:absolute;z-index:10000'
}, true);
}
var box = Ext.DomHelper.append(messageContainer, {
html: createBox(severities[severity], title, message)
}, true);
messageContainer.alignTo(document, 't-t');
box.slideIn('t').pause(duration).ghost('t', {remove:true});
}
}
}();
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Tolleiv Nietsch <nietsch@aoemedia.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Class to handle mail specific functionality
*
* $Id: class.t3lib_utility_mail.php 6536 2009-11-25 14:07:18Z stucki $
*
*
* @author Tolleiv Nietsch <nietsch@aoemedia.de>
* @package TYPO3
* @subpackage t3lib
*/
final class t3lib_utility_Mail {
/**
* Proxy for the PHP mail() function. Adds possibility to hook in and send the mails in a different way.
* The hook can be used by adding function to the configuration array:
* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery']
*
* @param string Email address to send to.
* @param string Subject line, non-encoded. (see PHP function mail())
* @param string Message content, non-encoded. (see PHP function mail())
* @param string Additional headers for the mail (see PHP function mail())
* @param string Additional flags for the sending mail tool (see PHP function mail())
* @return boolean Indicates whether the mail has been sent or not
* @see PHP function mail() []
* @link http://www.php.net/manual/en/function.mail.php
*/
public static function mail($to, $subject, $messageBody, $additionalHeaders = null, $additionalParameters = null) {
$success = TRUE;
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'])) {
$parameters = array(
'to' => $to,
'subject' => $subject,
'messageBody' => $messageBody,
'additionalHeaders' => $additionalHeaders,
'additionalParameters' => $additionalParameters,
);
$fakeThis = FALSE;
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'] as $hookMethod) {
$success = $success && t3lib_div::callUserFunction($hookMethod, $parameters, $fakeThis);
}
} else {
$success = @mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
}
if (!$success) {
t3lib_div::sysLog('Mail to "' . $email . '" could not be sent (Subject: "' . $subject . '").', 'Core', 3);
}
return $success;
}
}
?>
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Tolleiv Nietsch <nietsch@aoemedia.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Class to handle mail specific functionality
*
* $Id: class.t3lib_utility_mail.php 6536 2009-11-25 14:07:18Z stucki $
*
*
* @author Tolleiv Nietsch <nietsch@aoemedia.de>
* @package TYPO3
* @subpackage t3lib
*/
final class t3lib_utility_Mail {
/**
* Proxy for the PHP mail() function. Adds possibility to hook in and send the mails in a different way.
* The hook can be used by adding function to the configuration array:
* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery']
*
* @param string Email address to send to.
* @param string Subject line, non-encoded. (see PHP function mail())
* @param string Message content, non-encoded. (see PHP function mail())
* @param string Additional headers for the mail (see PHP function mail())
* @param string Additional flags for the sending mail tool (see PHP function mail())
* @return boolean Indicates whether the mail has been sent or not
* @see PHP function mail() []
* @link http://www.php.net/manual/en/function.mail.php
*/
public static function mail($to, $subject, $messageBody, $additionalHeaders = null, $additionalParameters = null) {
$success = TRUE;
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'])) {
$parameters = array(
'to' => $to,
'subject' => $subject,
'messageBody' => $messageBody,
'additionalHeaders' => $additionalHeaders,
'additionalParameters' => $additionalParameters,
);
$fakeThis = FALSE;
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'] as $hookMethod) {
$success = $success && t3lib_div::callUserFunction($hookMethod, $parameters, $fakeThis);
}
} else {
$success = @mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
}
if (!$success) {
t3lib_div::sysLog('Mail to "' . $email . '" could not be sent (Subject: "' . $subject . '").', 'Core', 3);
}
return $success;
}
}
?>
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Oliver Klee (typo3-coding@oliverklee.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Testcase for the t3lib_utility_Mail class.
*
* @package TYPO3
* @subpackage t3lib
*
* @author Oliver Klee <typo3-coding@oliverklee.de>
*/
class t3lib_utility_mailTest extends tx_phpunit_testcase {
/**
* backed-up TYPO3_CONF_VARS SC_OPTIONS
*
* @var array
*/
private $scOptionsBackup = array();
/**
* backed-up T3_VAR callUserFunction
*
* @var array
*/
private $callUserFunctionBackup = array();
public function setUp() {