Index: trunk/core/kernel/session/session.php
===================================================================
diff -u -r1764 -r1852
--- trunk/core/kernel/session/session.php (.../session.php) (revision 1764)
+++ trunk/core/kernel/session/session.php (.../session.php) (revision 1852)
@@ -284,11 +284,15 @@
$this->Data =& new Params();
$tmp_sid = $this->GetPassedSIDValue();
- $expired_sids = $this->DeleteExpired();
- if( ( $expired_sids && in_array($tmp_sid,$expired_sids) ) || ( $tmp_sid && !$this->Check() ) )
+
+ if( !defined('IS_INSTALL') && IS_INSTALL )
{
- $this->SetSession();
- $this->Application->HandleEvent($event, 'login:OnSessionExpire');
+ $expired_sids = $this->DeleteExpired();
+ if( ( $expired_sids && in_array($tmp_sid,$expired_sids) ) || ( $tmp_sid && !$this->Check() ) )
+ {
+ $this->SetSession();
+ $this->Application->HandleEvent($event, 'login:OnSessionExpire');
+ }
}
if ($this->Check()) {
Index: trunk/tools/phrase_locator.php
===================================================================
diff -u -r912 -r1852
--- trunk/tools/phrase_locator.php (.../phrase_locator.php) (revision 912)
+++ trunk/tools/phrase_locator.php (.../phrase_locator.php) (revision 1852)
@@ -1,50 +1,23 @@
GetCol($sql);
+ $db_phrases = $tool_db->GetCol($sql);
foreach ($db_phrases as $phrase)
{
unset($phrases[$phrase]); // phrase is translated
+ if( !isset($phrase_files[$phrase]) )
+ {
+ unset($phrase_files[$phrase]);
+ }
+ else
+ {
+ echo 'inconsistance in phrase '.$phrase.'
';
+ }
}
$ret = Array();
@@ -54,6 +27,7 @@
}
tool_printPre($ret);
+ tool_printPre($phrase_files);
if( unlink(BASE_PATH.'/new_phrases.txt') )
{
@@ -68,4 +42,48 @@
{
die('Can\'t create file new_phrases.txt');
}
+
+
+ function addPhrase($array, $file)
+ {
+ global $phrases, $phrase_files;
+
+ foreach ($array as $phrase_name)
+ {
+ $phrase_name = strtolower($phrase_name);
+ $phrases[$phrase_name] = 1;
+ if( !isset($phrase_files[$phrase_name]) ) $phrase_files[$phrase_name] = Array();
+ $phrase_files[$phrase_name][] = substr($file, strlen(BASE_PATH), strlen($file) );
+ }
+ }
+
+ function scanDir($FolderPath)
+ {
+ $scan_types = Array('php','js','tpl');
+ $FolderHandle = opendir($FolderPath);
+ if($FolderHandle)
+ {
+ while( false !== ($file = readdir($FolderHandle)) )
+ {
+ if($file == '.' || $file == '..') continue;
+ $file = $FolderPath.$file;
+
+ if( is_dir($file) )
+ {
+ scanDir($file.'/');
+ }
+ elseif( is_file($file) && in_array(substr($file,-3),$scan_types) )
+ {
+ $filedata = file_get_contents($file);
+
+ preg_match_all('/\'(lu_.*|la_.*)\'/U',$filedata,$rets);
+ if($rets[1]) addPhrase($rets[1], $file);
+
+ preg_match_all('/"(lu_.*|la_.*)"/U',$filedata,$rets);
+ if($rets[1]) addPhrase($rets[1], $file);
+ }
+ }
+ closedir($FolderHandle);
+ }
+ }
?>
\ No newline at end of file
Index: trunk/new_phrases.txt
===================================================================
diff -u -r1851 -r1852
--- trunk/new_phrases.txt (.../new_phrases.txt) (revision 1851)
+++ trunk/new_phrases.txt (.../new_phrases.txt) (revision 1852)
@@ -35,7 +35,6 @@
la_invalid
la_verified
la_penging
-lu_ferror_rate_duplicate
la_fields
la_value
la_tooltip_resettoshipping
Index: trunk/kernel/include/adodb/adodb.inc.php
===================================================================
diff -u -r1566 -r1852
--- trunk/kernel/include/adodb/adodb.inc.php (.../adodb.inc.php) (revision 1566)
+++ trunk/kernel/include/adodb/adodb.inc.php (.../adodb.inc.php) (revision 1852)
@@ -723,7 +723,7 @@
ADOConnection::outp( "=----\n($this->databaseType): ".($sqlTxt)." \n-----\n",false);
flush();
- $profileSQLs = defined('DBG_SQL_PROFILE')&&DBG_SQL_PROFILE;
+ $profileSQLs = dbg_ConstOn('DBG_SQL_PROFILE');
if($profileSQLs)
{
$isSkipTable = isSkipTable($sql);
@@ -752,7 +752,7 @@
$e = $this->ErrorNo();
$m = $this->ErrorMsg();
- $errorLevel = defined('DBG_SQL_FAILURE')&&DBG_SQL_FAILURE ? E_USER_ERROR : E_USER_WARNING;
+ $errorLevel = dbg_ConstOn('DBG_SQL_FAILURE') && !dbg_ConstOn('IS_INSTALL') ? E_USER_ERROR : E_USER_WARNING;
$debugger->dumpVars($_REQUEST);
$debugger->appendTrace();