[TYPO3-core] RFC: protect localconf.php from being lost

Michael Stucki michael at typo3.org
Sat Dec 17 15:19:45 CET 2005


Hi Martin,

>> >> As for the die() calls - what about just putting the error message
>> >> into $this->messages[] and hope the admin will look carefully
>> > > enough
>> >> at the output? This way it could be called "graceful" error
>> > > handling,
>> >> somewhat at least.
>> > 
>> > I don't know where the message strings are used. When I changed the
>> > settings of an extension in the extension manager I did not see,
>> > the "updated" message. So the display of the message has to be
>> > implemented at
>> > least there. But again, I don't want to don this right now. I'm
>> > only fixing the dataloss bug (#1878).
>> 
>> I already changed this somewhere in my patch-pipeline. Will be changed
>> by me soon (just change debug => t3lib_div::debug).
> 
> There are no debug() calls in this function.

Yes, but Karsten suggested that you turn the die() into debug() calls.

You wrote that you cannot see any output after debug(), so this is the fix
for it:

--- typo3_src-3.8.1.orig/typo3/sysext/install/mod/class.tx_install.php
+++ typo3_src-3.8.1/typo3/sysext/install/mod/class.tx_install.php
@@ -390,7 +390,7 @@
                $this->check_mail();
                $this->setupGeneral();
                $this->generateConfigForm();
-               if (count($this->messages))     debug($this->messages);
+               if (count($this->messages))     t3lib_div::debug($this->messages);
 
                if ($this->step)        {
                        echo $this->outputWrapper($this->stepOutput());

>> So then it should be no problem to move these messages to
>> $this->messages[].
>> Can you do that, please?
> 
> Yes, but what shall the function return in such a case? "nochanges" or
> "error"? "nochanges" is th return value if $this->allowUpdateLocalConf is
> false. I don't care, but your changes should be able to handle the return
> value.

No, it would for example write this:

"typo3conf/localconf.php.tmp was NOT written properly (written content
didn't match file content) - maybe a disk space problem?"

Regards, michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/



More information about the TYPO3-team-core mailing list