Index: branches/unlabeled/unlabeled-1.62.2/core/kernel/db/db_tag_processor.php
===================================================================
diff -u -r5615 -r5653
--- branches/unlabeled/unlabeled-1.62.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 5615)
+++ branches/unlabeled/unlabeled-1.62.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 5653)
@@ -91,29 +91,34 @@
$filters = Array();
$prefix_special = $this->getPrefixSpecial();
- foreach($filter_menu['Filters'] as $filter_key => $filter_params)
- {
- if(!$filter_params)
- {
+
+
+ foreach ($filter_menu['Filters'] as $filter_key => $filter_params) {
+ $group_params = isset($filter_params['group_id']) ? $filter_menu['Groups'][ $filter_params['group_id'] ] : Array();
+ if (!isset($group_params['element_type'])) {
+ $group_params['element_type'] = 'checkbox';
+ }
+
+ if (!$filter_params) {
$filters[] = $separator;
continue;
}
$block_params['label'] = addslashes( $this->Application->Phrase($filter_params['label']) );
- if( getArrayValue($view_filter,$filter_key) )
- {
+ if (getArrayValue($view_filter,$filter_key)) {
$submit = 0;
- $status = 1;
+ $status = $group_params['element_type'] == 'checkbox' ? 1 : 2;
}
- else
- {
+ else {
$submit = 1;
$status = 0;
}
$block_params['filter_action'] = 'set_filter("'.$prefix_special.'","'.$filter_key.'","'.$submit.'",'.$params['ajax'].');';
- $block_params['filter_status'] = $status;
+ $block_params['filter_status'] = $status; // 1 - checkbox, 2 - radio, 0 - no image
$filters[] = $this->Application->ParseBlock($block_params);
}
+
+
return implode('', $filters);
}
Index: branches/unlabeled/unlabeled-1.14.2/core/kernel/utility/email.php
===================================================================
diff -u -r5567 -r5653
--- branches/unlabeled/unlabeled-1.14.2/core/kernel/utility/email.php (.../email.php) (revision 5567)
+++ branches/unlabeled/unlabeled-1.14.2/core/kernel/utility/email.php (.../email.php) (revision 5653)
@@ -254,7 +254,7 @@
$file_info = array('path'=>$filepath, 'mime'=>$mime);
$this->Files[] = $file_info;
}else{
- die('File "'.$filepath.'" not exist...'."\n");
+ $this->Application->ApplicationDie('File "'.$filepath.'" not exist...'."\n");
}
$this->IsMultipart = true;
Index: branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php
===================================================================
diff -u -r5651 -r5653
--- branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5651)
+++ branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5653)
@@ -326,7 +326,7 @@
$language_id = $this->GetDefaultLanguageId();
if (!$language_id) {
if (!$this->Application->IsAdmin()) {
- die ('No Primary Language Selected');
+ $this->ApplicationDie('No Primary Language Selected');
}
else {
$language_id = 1;
@@ -340,7 +340,7 @@
$this->SetVar('lang_mode', '');
$lang =& $this->recallObject('lang.current');
if ( !$lang->IsLoaded() || (!$this->Application->IsAdmin() && !$lang->GetDBField('Enabled')) ) {
- if (!defined('IS_INSTALL')) die ('Unknown or disabled language');
+ if (!defined('IS_INSTALL')) $this->ApplicationDie('Unknown or disabled language');
}
$this->SetVar('lang_mode',$lang_mode);
}
@@ -360,14 +360,14 @@
if (!$theme_id) {
$theme_id = $this->GetDefaultThemeId();
if (!$theme_id) {
- die('No Primary Theme Selected');
+ $this->ApplicationDie('No Primary Theme Selected');
}
}
$this->SetVar('m_theme', $theme_id);
$this->SetVar('theme.current_id', $theme_id ); // KOSTJA: this is to fool theme' getPassedId
$theme =& $this->recallObject('theme.current');
if (!$theme->IsLoaded() || !$theme->GetDBField('Enabled')) {
- if (!defined('IS_INSTALL')) die('Unknown or disabled theme');
+ if (!defined('IS_INSTALL')) $this->ApplicationDie('Unknown or disabled theme');
}
safeDefine('THEMES_PATH', '/themes/'.$theme->GetDBField('Name'));
}
@@ -2094,6 +2094,17 @@
$target_zone = isset($time_zone) ? $time_zone : $this->ConfigValue('Config_Site_Time');
return 3600 * ($target_zone - $this->ConfigValue('Config_Server_Time'));
}
+
+ function ApplicationDie($message = '')
+ {
+ $message = ob_get_clean().$message;
+ if ($this->isDebugMode()) {
+ $message .= $this->Debugger->printReport(true);
+ }
+
+ echo $this->UseOutputCompression() ? gzencode($message, DBG_COMPRESSION_LEVEL) : $message;
+ exit;
+ }
}
Index: branches/unlabeled/unlabeled-1.15.2/kernel/units/general/inp1_parser.php
===================================================================
diff -u -r5497 -r5653
--- branches/unlabeled/unlabeled-1.15.2/kernel/units/general/inp1_parser.php (.../inp1_parser.php) (revision 5497)
+++ branches/unlabeled/unlabeled-1.15.2/kernel/units/general/inp1_parser.php (.../inp1_parser.php) (revision 5653)
@@ -105,7 +105,7 @@
echo "Please use the installation script to fix the problem.
";
echo "Go to installation script
";
flush();
- die();
+ $this->Application->ApplicationDie();
}
//ob_start();
Index: branches/unlabeled/unlabeled-1.2.48/kernel/include/db.class.php
===================================================================
diff -u -r1570 -r5653
--- branches/unlabeled/unlabeled-1.2.48/kernel/include/db.class.php (.../db.class.php) (revision 1570)
+++ branches/unlabeled/unlabeled-1.2.48/kernel/include/db.class.php (.../db.class.php) (revision 5653)
@@ -158,7 +158,7 @@
function Connect($host,$user,$pass,$db)
{
$func = $this->getMetaFunction('connect');
- $this->connectionID = $func($host,$user,$pass) or die('Can\'t connect to db');
+ $this->connectionID = $func($host,$user,$pass) or trigger_error("Can't connect to db", E_USER_ERROR);
if($this->connectionID)
{
$this->setDB($db);
Index: branches/unlabeled/unlabeled-1.15.2/core/units/general/inp1_parser.php
===================================================================
diff -u -r5497 -r5653
--- branches/unlabeled/unlabeled-1.15.2/core/units/general/inp1_parser.php (.../inp1_parser.php) (revision 5497)
+++ branches/unlabeled/unlabeled-1.15.2/core/units/general/inp1_parser.php (.../inp1_parser.php) (revision 5653)
@@ -105,7 +105,7 @@
echo "Please use the installation script to fix the problem.
";
echo "Go to installation script
";
flush();
- die();
+ $this->Application->ApplicationDie();
}
//ob_start();
Index: branches/unlabeled/unlabeled-1.23.32/admin/category/category_maint.php
===================================================================
diff -u -r2858 -r5653
--- branches/unlabeled/unlabeled-1.23.32/admin/category/category_maint.php (.../category_maint.php) (revision 2858)
+++ branches/unlabeled/unlabeled-1.23.32/admin/category/category_maint.php (.../category_maint.php) (revision 5653)
@@ -29,19 +29,20 @@
require_once($pathtoroot.$admin."/listview/listview.php");
$section = "in-portal:category_maint";
-
+$application =& kApplication::Instance();
require_once($pathtoroot.$admin."/category/permcacheupdate.php");
if(!$objSession->GetVariable('PermCache_UpdateRequired'))
{
- die(header('Location: '.$adminURL.'/'.$objSession->GetVariable('ReturnScript').'?env='.BuildEnv()));
+
+ $application->ApplicationDie(header('Location: '.$adminURL.'/'.$objSession->GetVariable('ReturnScript').'?env='.BuildEnv()));
}
if(isset($_GET['continue']))
{
$updater =& new clsCacheUpdater(1);
if(!intval($_GET['continue']))
{
$updater->clearData();
- die(header('Location: '.$adminURL.'/'.$objSession->GetVariable('ReturnScript').'?env='.BuildEnv()));
+ $application->ApplicationDie(header('Location: '.$adminURL.'/'.$objSession->GetVariable('ReturnScript').'?env='.BuildEnv()));
}
}
else
@@ -84,7 +85,7 @@
ApplicationDie();
}
}
$title = prompt_language("la_prompt_updating")." ".prompt_language("la_Text_Categories");
Index: branches/unlabeled/unlabeled-1.8.2/core/units/phrases/phrases_config.php
===================================================================
diff -u -r4944 -r5653
--- branches/unlabeled/unlabeled-1.8.2/core/units/phrases/phrases_config.php (.../phrases_config.php) (revision 4944)
+++ branches/unlabeled/unlabeled-1.8.2/core/units/phrases/phrases_config.php (.../phrases_config.php) (revision 5653)
@@ -55,11 +55,15 @@
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_front','show_admin','show_both'), 'type' => WHERE_FILTER),
+ Array('mode' => 'AND', 'filters' => Array('translated', 'not_translated'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
- 'show_front' => Array('label' =>'la_PhraseType_Front', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 0' ),
- 'show_admin' => Array('label' => 'la_PhraseType_Admin', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 1' ),
- 'show_both' => Array('label' => 'la_PhraseType_Both', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 2' ),
+ 'show_front' => Array('label' =>'la_PhraseType_Front', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 0', 'group_id' => 0),
+ 'show_admin' => Array('label' => 'la_PhraseType_Admin', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 1', 'group_id' => 0),
+ 'show_both' => Array('label' => 'la_PhraseType_Both', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 2', 'group_id' => 0),
+ 's1' => Array(),
+ 'translated' => Array('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation <> pri.Translation', 'group_id' => 1),
+ 'not_translated' => Array('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation = pri.Translation', 'group_id' => 1),
)
),
Index: branches/unlabeled/unlabeled-1.13.2/core/kernel/db/db_connection.php
===================================================================
diff -u -r5215 -r5653
--- branches/unlabeled/unlabeled-1.13.2/core/kernel/db/db_connection.php (.../db_connection.php) (revision 5215)
+++ branches/unlabeled/unlabeled-1.13.2/core/kernel/db/db_connection.php (.../db_connection.php) (revision 5653)
@@ -176,7 +176,7 @@
function Connect($host, $user, $pass, $db, $force_new = false)
{
$func = $this->getMetaFunction('connect');
- $this->connectionID = $func($host, $user, $pass, $force_new) or die('Can\'t connect to db');
+ $this->connectionID = $func($host, $user, $pass, $force_new) or trigger_error("Can't connect to db", E_USER_ERROR);
if ($this->connectionID) {
$this->setDB($db);
$this->showError();
Index: branches/unlabeled/unlabeled-1.75.2/kernel/frontaction.php
===================================================================
diff -u -r5256 -r5653
--- branches/unlabeled/unlabeled-1.75.2/kernel/frontaction.php (.../frontaction.php) (revision 5256)
+++ branches/unlabeled/unlabeled-1.75.2/kernel/frontaction.php (.../frontaction.php) (revision 5653)
@@ -1030,10 +1030,11 @@
break;
}
break;
- case "m_id":
- echo $Action.":".$DownloadId;
- die();
- break;
+
+ case "m_id":
+ $application->ApplicationDie($Action.':'.$DownloadId);
+ break;
+
case "m_simple_subsearch":
$keywords = $_POST["keywords"];
$type = $objItemTypes->GetTypeByName("Category");
Index: branches/unlabeled/unlabeled-1.8.2/kernel/units/phrases/phrases_config.php
===================================================================
diff -u -r4944 -r5653
--- branches/unlabeled/unlabeled-1.8.2/kernel/units/phrases/phrases_config.php (.../phrases_config.php) (revision 4944)
+++ branches/unlabeled/unlabeled-1.8.2/kernel/units/phrases/phrases_config.php (.../phrases_config.php) (revision 5653)
@@ -55,11 +55,15 @@
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_front','show_admin','show_both'), 'type' => WHERE_FILTER),
+ Array('mode' => 'AND', 'filters' => Array('translated', 'not_translated'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
- 'show_front' => Array('label' =>'la_PhraseType_Front', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 0' ),
- 'show_admin' => Array('label' => 'la_PhraseType_Admin', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 1' ),
- 'show_both' => Array('label' => 'la_PhraseType_Both', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 2' ),
+ 'show_front' => Array('label' =>'la_PhraseType_Front', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 0', 'group_id' => 0),
+ 'show_admin' => Array('label' => 'la_PhraseType_Admin', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 1', 'group_id' => 0),
+ 'show_both' => Array('label' => 'la_PhraseType_Both', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 2', 'group_id' => 0),
+ 's1' => Array(),
+ 'translated' => Array('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation <> pri.Translation', 'group_id' => 1),
+ 'not_translated' => Array('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation = pri.Translation', 'group_id' => 1),
)
),
Index: branches/unlabeled/unlabeled-1.11.2/core/kernel/processors/tag_processor.php
===================================================================
diff -u -r5303 -r5653
--- branches/unlabeled/unlabeled-1.11.2/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 5303)
+++ branches/unlabeled/unlabeled-1.11.2/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 5653)
@@ -130,7 +130,7 @@
{
// echo " prefix : $prefix
";
if (!isset($this->Prefixes[$prefix]))
- die ("Filepath and ClassName for prefix $prefix not defined while processing ".htmlspecialchars($tag->GetFullTag())."!");
+ $this->Application->ApplicationDie ("Filepath and ClassName for prefix $prefix not defined while processing ".htmlspecialchars($tag->GetFullTag())."!");
include_once($this->Prefixes[$prefix]['path']);
$ClassName = $this->Prefixes[$prefix]['class'];
$a_processor =& new $ClassName($prefix);
Index: branches/unlabeled/unlabeled-1.14.26/admin/config/edit_label.php
===================================================================
diff -u -r3007 -r5653
--- branches/unlabeled/unlabeled-1.14.26/admin/config/edit_label.php (.../edit_label.php) (revision 3007)
+++ branches/unlabeled/unlabeled-1.14.26/admin/config/edit_label.php (.../edit_label.php) (revision 5653)
@@ -33,7 +33,8 @@
echo " if(window.opener) window.opener.location=window.opener.location;\n";
echo " window.close();";
echo "";
- die();
+ $application =& kApplication::Instance();
+ $application->ApplicationDie();
}
$section = "in-portal:phrase_editor";
Index: branches/unlabeled/unlabeled-1.3.90/admin/install/restore_run.php
===================================================================
diff -u -r79 -r5653
--- branches/unlabeled/unlabeled-1.3.90/admin/install/restore_run.php (.../restore_run.php) (revision 79)
+++ branches/unlabeled/unlabeled-1.3.90/admin/install/restore_run.php (.../restore_run.php) (revision 5653)
@@ -99,8 +99,8 @@
$error = "(".$FileOffset.") ".prompt_language("la_restore_unknown_error");
break;
}
- echo $error;
- die();
+ $application =& kApplication::Instance();
+ $application->ApplicationDie($error);
}
}
else {
Index: branches/unlabeled/unlabeled-1.7.2/admin/backup/restore3.php
===================================================================
diff -u -r5521 -r5653
--- branches/unlabeled/unlabeled-1.7.2/admin/backup/restore3.php (.../restore3.php) (revision 5521)
+++ branches/unlabeled/unlabeled-1.7.2/admin/backup/restore3.php (.../restore3.php) (revision 5653)
@@ -72,8 +72,8 @@
$error = "(".$FileOffset.") ".prompt_language("la_restore_unknown_error");
break;
}
- echo $error;
- die();
+ $application =& kApplication::Instance();
+ $application->ApplicationDie($error);
}
}
else