Index: mod1/class.tx_templavoila_mod1_wizards.php
===================================================================
--- mod1/class.tx_templavoila_mod1_wizards.php (revision 27884)
+++ mod1/class.tx_templavoila_mod1_wizards.php (working copy)
@@ -59,7 +59,7 @@
* @package TYPO3
* @subpackage tx_templavoila
*/
-
+
require_once(PATH_t3lib.'class.t3lib_tceforms.php');
class tx_templavoila_mod1_wizards {
@@ -68,6 +68,7 @@
var $pObj; // A pointer to the parent object, that is the templavoila page module script. Set by calling the method init() of this class.
var $doc; // A reference to the doc object of the parent object.
var $extKey; // A reference to extension key of the parent object.
+ var $TCAdefaultOverride; // Config of TCAdefaults
// Local variables
@@ -106,13 +107,20 @@
function renderWizard_createNewPage ($positionPid) {
global $LANG, $BE_USER, $TYPO3_CONF_VARS;
+ // Get default TCA values specific for the page and user
+ $temp = t3lib_BEfunc::getModTSconfig(abs($positionPid) , 'TCAdefaults');
+ if (isset($temp['properties'])) {
+ $this->TCAdefaultOverride = $temp['properties'];
+ }
+
// The user already submitted the create page form:
- if (t3lib_div::_GP('doCreate')) {
+ if (t3lib_div::_GP('doCreate') || isset($this->TCAdefaultOverride['pages.']['tx_templavoila_to'])) {
// Check if the HTTP_REFERER is valid
$refInfo = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
$httpHost = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');
if ($httpHost == $refInfo['host'] || t3lib_div::_GP('vC') == $BE_USER->veriCode() || $TYPO3_CONF_VARS['SYS']['doNotCheckReferer']) {
+
// Create new page
$newID = $this->createPage (t3lib_div::_GP('data'), $positionPid);
if ($newID > 0) {
@@ -227,6 +235,8 @@
$content .= '';
$content .= '';
$content .= '';
+
+ $content .= $this->doc->endPage();
return $content;
}
@@ -256,13 +266,11 @@
switch ($templateType) {
case 'tmplobj':
// Create the "Default template" entry
- $previewIconFilename = $GLOBALS['BACK_PATH'].'../'.t3lib_extMgm::siteRelPath($this->extKey).'res1/default_previewicon.gif';
- $previewIcon = '';
- $description = htmlspecialchars($LANG->getLL ('template_descriptiondefault'));
- $tmplHTML [] = '