@@ -4169,10 +4169,10 @@ discard block |
||
4169 | 4169 | { |
4170 | 4170 | $value=TPropertyValue::ensureEnum($value,'THttpSessionCookieMode'); |
4171 | 4171 | if($value===THttpSessionCookieMode::None) |
4172 | - { |
|
4172 | + { |
|
4173 | 4173 | ini_set('session.use_cookies','0'); |
4174 | 4174 | ini_set('session.use_only_cookies','0'); |
4175 | - } |
|
4175 | + } |
|
4176 | 4176 | else if($value===THttpSessionCookieMode::Allow) |
4177 | 4177 | { |
4178 | 4178 | ini_set('session.use_cookies','1'); |
@@ -5847,7 +5847,7 @@ discard block |
||
5847 | 5847 | } |
5848 | 5848 | public function __construct($style=null) |
5849 | 5849 | { |
5850 | - parent::__construct(); |
|
5850 | + parent::__construct(); |
|
5851 | 5851 | if($style!==null) |
5852 | 5852 | $this->copyFrom($style); |
5853 | 5853 | } |
@@ -6837,77 +6837,77 @@ discard block |
||
6837 | 6837 | throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this)); |
6838 | 6838 | parent::initRecursive($namingContainer); |
6839 | 6839 | } |
6840 | - public function tryToUpdateView($arObj, $throwExceptions = false) |
|
6841 | - { |
|
6842 | - $objAttrs = get_class_vars(get_class($arObj)); |
|
6843 | - foreach (array_keys($objAttrs) as $key) |
|
6844 | - { |
|
6845 | - try |
|
6846 | - { |
|
6847 | - if ($key != "RELATIONS") |
|
6848 | - { |
|
6849 | - $control = $this->{$key}; |
|
6850 | - if ($control instanceof TTextBox) |
|
6851 | - $control->Text = $arObj->{$key}; |
|
6852 | - elseif ($control instanceof TCheckBox) |
|
6853 | - $control->Checked = (boolean) $arObj->{$key}; |
|
6854 | - elseif ($control instanceof TDatePicker) |
|
6855 | - $control->Date = $arObj->{$key}; |
|
6856 | - } |
|
6857 | - else |
|
6858 | - { |
|
6859 | - foreach ($objAttrs["RELATIONS"] as $relKey => $relValues) |
|
6860 | - { |
|
6861 | - $relControl = $this->{$relKey}; |
|
6862 | - switch ($relValues[0]) |
|
6863 | - { |
|
6864 | - case TActiveRecord::BELONGS_TO: |
|
6865 | - case TActiveRecord::HAS_ONE: |
|
6866 | - $relControl->Text = $arObj->{$relKey}; |
|
6867 | - break; |
|
6868 | - case TActiveRecord::HAS_MANY: |
|
6869 | - if ($relControl instanceof TListControl) |
|
6870 | - { |
|
6871 | - $relControl->DataSource = $arObj->{$relKey}; |
|
6872 | - $relControl->dataBind(); |
|
6873 | - } |
|
6874 | - break; |
|
6875 | - } |
|
6876 | - } |
|
6877 | - break; |
|
6878 | - } |
|
6879 | - } |
|
6880 | - catch (Exception $ex) |
|
6881 | - { |
|
6882 | - if ($throwExceptions) |
|
6883 | - throw $ex; |
|
6884 | - } |
|
6885 | - } |
|
6886 | - } |
|
6887 | - public function tryToUpdateAR($arObj, $throwExceptions = false) |
|
6888 | - { |
|
6889 | - $objAttrs = get_class_vars(get_class($arObj)); |
|
6890 | - foreach (array_keys($objAttrs) as $key) |
|
6891 | - { |
|
6892 | - try |
|
6893 | - { |
|
6894 | - if ($key == "RELATIONS") |
|
6895 | - break; |
|
6896 | - $control = $this->{$key}; |
|
6897 | - if ($control instanceof TTextBox) |
|
6898 | - $arObj->{$key} = $control->Text; |
|
6899 | - elseif ($control instanceof TCheckBox) |
|
6900 | - $arObj->{$key} = $control->Checked; |
|
6901 | - elseif ($control instanceof TDatePicker) |
|
6902 | - $arObj->{$key} = $control->Date; |
|
6903 | - } |
|
6904 | - catch (Exception $ex) |
|
6905 | - { |
|
6906 | - if ($throwExceptions) |
|
6907 | - throw $ex; |
|
6908 | - } |
|
6909 | - } |
|
6910 | - } |
|
6840 | + public function tryToUpdateView($arObj, $throwExceptions = false) |
|
6841 | + { |
|
6842 | + $objAttrs = get_class_vars(get_class($arObj)); |
|
6843 | + foreach (array_keys($objAttrs) as $key) |
|
6844 | + { |
|
6845 | + try |
|
6846 | + { |
|
6847 | + if ($key != "RELATIONS") |
|
6848 | + { |
|
6849 | + $control = $this->{$key}; |
|
6850 | + if ($control instanceof TTextBox) |
|
6851 | + $control->Text = $arObj->{$key}; |
|
6852 | + elseif ($control instanceof TCheckBox) |
|
6853 | + $control->Checked = (boolean) $arObj->{$key}; |
|
6854 | + elseif ($control instanceof TDatePicker) |
|
6855 | + $control->Date = $arObj->{$key}; |
|
6856 | + } |
|
6857 | + else |
|
6858 | + { |
|
6859 | + foreach ($objAttrs["RELATIONS"] as $relKey => $relValues) |
|
6860 | + { |
|
6861 | + $relControl = $this->{$relKey}; |
|
6862 | + switch ($relValues[0]) |
|
6863 | + { |
|
6864 | + case TActiveRecord::BELONGS_TO: |
|
6865 | + case TActiveRecord::HAS_ONE: |
|
6866 | + $relControl->Text = $arObj->{$relKey}; |
|
6867 | + break; |
|
6868 | + case TActiveRecord::HAS_MANY: |
|
6869 | + if ($relControl instanceof TListControl) |
|
6870 | + { |
|
6871 | + $relControl->DataSource = $arObj->{$relKey}; |
|
6872 | + $relControl->dataBind(); |
|
6873 | + } |
|
6874 | + break; |
|
6875 | + } |
|
6876 | + } |
|
6877 | + break; |
|
6878 | + } |
|
6879 | + } |
|
6880 | + catch (Exception $ex) |
|
6881 | + { |
|
6882 | + if ($throwExceptions) |
|
6883 | + throw $ex; |
|
6884 | + } |
|
6885 | + } |
|
6886 | + } |
|
6887 | + public function tryToUpdateAR($arObj, $throwExceptions = false) |
|
6888 | + { |
|
6889 | + $objAttrs = get_class_vars(get_class($arObj)); |
|
6890 | + foreach (array_keys($objAttrs) as $key) |
|
6891 | + { |
|
6892 | + try |
|
6893 | + { |
|
6894 | + if ($key == "RELATIONS") |
|
6895 | + break; |
|
6896 | + $control = $this->{$key}; |
|
6897 | + if ($control instanceof TTextBox) |
|
6898 | + $arObj->{$key} = $control->Text; |
|
6899 | + elseif ($control instanceof TCheckBox) |
|
6900 | + $arObj->{$key} = $control->Checked; |
|
6901 | + elseif ($control instanceof TDatePicker) |
|
6902 | + $arObj->{$key} = $control->Date; |
|
6903 | + } |
|
6904 | + catch (Exception $ex) |
|
6905 | + { |
|
6906 | + if ($throwExceptions) |
|
6907 | + throw $ex; |
|
6908 | + } |
|
6909 | + } |
|
6910 | + } |
|
6911 | 6911 | } |
6912 | 6912 | class TForm extends TControl |
6913 | 6913 | { |
@@ -7620,13 +7620,13 @@ discard block |
||
7620 | 7620 | Prado::using('System.Web.UI.ActiveControls.TActivePageAdapter'); |
7621 | 7621 | Prado::using('System.Web.UI.JuiControls.TJuiControlOptions'); |
7622 | 7622 | $this->setAdapter(new TActivePageAdapter($this)); |
7623 | - $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER); |
|
7624 | - if(strlen($callbackEventParameter) > 0) |
|
7625 | - $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter); |
|
7626 | - if (($g=$this->getApplication()->getGlobalization(false))!==null && |
|
7627 | - strtoupper($enc=$g->getCharset())!='UTF-8') |
|
7628 | - foreach ($this->_postData as $k=>$v) |
|
7629 | - $this->_postData[$k]=self::decodeUTF8($v, $enc); |
|
7623 | + $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER); |
|
7624 | + if(strlen($callbackEventParameter) > 0) |
|
7625 | + $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter); |
|
7626 | + if (($g=$this->getApplication()->getGlobalization(false))!==null && |
|
7627 | + strtoupper($enc=$g->getCharset())!='UTF-8') |
|
7628 | + foreach ($this->_postData as $k=>$v) |
|
7629 | + $this->_postData[$k]=self::decodeUTF8($v, $enc); |
|
7630 | 7630 | $this->onPreInit(null); |
7631 | 7631 | $this->initRecursive(); |
7632 | 7632 | $this->onInitComplete(null); |
@@ -9211,15 +9211,15 @@ discard block |
||
9211 | 9211 | $component=new ReflectionClass('TComponent'); |
9212 | 9212 | $behaviors=$component->getStaticProperties(); |
9213 | 9213 | if(!isset($behaviors['_um'])) |
9214 | - return false; |
|
9214 | + return false; |
|
9215 | 9215 | foreach($behaviors['_um'] as $name=>$list) |
9216 | 9216 | { |
9217 | - if(strtolower($class->getShortName())!==$name && !$class->isSubclassOf($name)) continue; |
|
9218 | - foreach($list as $param) |
|
9219 | - { |
|
9220 | - if(method_exists($param->getBehavior(),$method)) |
|
9221 | - return true; |
|
9222 | - } |
|
9217 | + if(strtolower($class->getShortName())!==$name && !$class->isSubclassOf($name)) continue; |
|
9218 | + foreach($list as $param) |
|
9219 | + { |
|
9220 | + if(method_exists($param->getBehavior(),$method)) |
|
9221 | + return true; |
|
9222 | + } |
|
9223 | 9223 | } |
9224 | 9224 | return false; |
9225 | 9225 | } |