@@ -4203,10 +4203,10 @@ discard block |
||
| 4203 | 4203 | { |
| 4204 | 4204 | $value=TPropertyValue::ensureEnum($value,'THttpSessionCookieMode'); |
| 4205 | 4205 | if($value===THttpSessionCookieMode::None) |
| 4206 | - { |
|
| 4206 | + { |
|
| 4207 | 4207 | ini_set('session.use_cookies','0'); |
| 4208 | 4208 | ini_set('session.use_only_cookies','0'); |
| 4209 | - } |
|
| 4209 | + } |
|
| 4210 | 4210 | else if($value===THttpSessionCookieMode::Allow) |
| 4211 | 4211 | { |
| 4212 | 4212 | ini_set('session.use_cookies','1'); |
@@ -6805,77 +6805,77 @@ discard block |
||
| 6805 | 6805 | throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this)); |
| 6806 | 6806 | parent::initRecursive($namingContainer); |
| 6807 | 6807 | } |
| 6808 | - public function tryToUpdateView($arObj, $throwExceptions = false) |
|
| 6809 | - { |
|
| 6810 | - $objAttrs = get_class_vars(get_class($arObj)); |
|
| 6811 | - foreach (array_keys($objAttrs) as $key) |
|
| 6812 | - { |
|
| 6813 | - try |
|
| 6814 | - { |
|
| 6815 | - if ($key != "RELATIONS") |
|
| 6816 | - { |
|
| 6817 | - $control = $this->{$key}; |
|
| 6818 | - if ($control instanceof TTextBox) |
|
| 6819 | - $control->Text = $arObj->{$key}; |
|
| 6820 | - elseif ($control instanceof TCheckBox) |
|
| 6821 | - $control->Checked = (boolean) $arObj->{$key}; |
|
| 6822 | - elseif ($control instanceof TDatePicker) |
|
| 6823 | - $control->Date = $arObj->{$key}; |
|
| 6824 | - } |
|
| 6825 | - else |
|
| 6826 | - { |
|
| 6827 | - foreach ($objAttrs["RELATIONS"] as $relKey => $relValues) |
|
| 6828 | - { |
|
| 6829 | - $relControl = $this->{$relKey}; |
|
| 6830 | - switch ($relValues[0]) |
|
| 6831 | - { |
|
| 6832 | - case TActiveRecord::BELONGS_TO: |
|
| 6833 | - case TActiveRecord::HAS_ONE: |
|
| 6834 | - $relControl->Text = $arObj->{$relKey}; |
|
| 6835 | - break; |
|
| 6836 | - case TActiveRecord::HAS_MANY: |
|
| 6837 | - if ($relControl instanceof TListControl) |
|
| 6838 | - { |
|
| 6839 | - $relControl->DataSource = $arObj->{$relKey}; |
|
| 6840 | - $relControl->dataBind(); |
|
| 6841 | - } |
|
| 6842 | - break; |
|
| 6843 | - } |
|
| 6844 | - } |
|
| 6845 | - break; |
|
| 6846 | - } |
|
| 6847 | - } |
|
| 6848 | - catch (Exception $ex) |
|
| 6849 | - { |
|
| 6850 | - if ($throwExceptions) |
|
| 6851 | - throw $ex; |
|
| 6852 | - } |
|
| 6853 | - } |
|
| 6854 | - } |
|
| 6855 | - public function tryToUpdateAR($arObj, $throwExceptions = false) |
|
| 6856 | - { |
|
| 6857 | - $objAttrs = get_class_vars(get_class($arObj)); |
|
| 6858 | - foreach (array_keys($objAttrs) as $key) |
|
| 6859 | - { |
|
| 6860 | - try |
|
| 6861 | - { |
|
| 6862 | - if ($key == "RELATIONS") |
|
| 6863 | - break; |
|
| 6864 | - $control = $this->{$key}; |
|
| 6865 | - if ($control instanceof TTextBox) |
|
| 6866 | - $arObj->{$key} = $control->Text; |
|
| 6867 | - elseif ($control instanceof TCheckBox) |
|
| 6868 | - $arObj->{$key} = $control->Checked; |
|
| 6869 | - elseif ($control instanceof TDatePicker) |
|
| 6870 | - $arObj->{$key} = $control->Date; |
|
| 6871 | - } |
|
| 6872 | - catch (Exception $ex) |
|
| 6873 | - { |
|
| 6874 | - if ($throwExceptions) |
|
| 6875 | - throw $ex; |
|
| 6876 | - } |
|
| 6877 | - } |
|
| 6878 | - } |
|
| 6808 | + public function tryToUpdateView($arObj, $throwExceptions = false) |
|
| 6809 | + { |
|
| 6810 | + $objAttrs = get_class_vars(get_class($arObj)); |
|
| 6811 | + foreach (array_keys($objAttrs) as $key) |
|
| 6812 | + { |
|
| 6813 | + try |
|
| 6814 | + { |
|
| 6815 | + if ($key != "RELATIONS") |
|
| 6816 | + { |
|
| 6817 | + $control = $this->{$key}; |
|
| 6818 | + if ($control instanceof TTextBox) |
|
| 6819 | + $control->Text = $arObj->{$key}; |
|
| 6820 | + elseif ($control instanceof TCheckBox) |
|
| 6821 | + $control->Checked = (boolean) $arObj->{$key}; |
|
| 6822 | + elseif ($control instanceof TDatePicker) |
|
| 6823 | + $control->Date = $arObj->{$key}; |
|
| 6824 | + } |
|
| 6825 | + else |
|
| 6826 | + { |
|
| 6827 | + foreach ($objAttrs["RELATIONS"] as $relKey => $relValues) |
|
| 6828 | + { |
|
| 6829 | + $relControl = $this->{$relKey}; |
|
| 6830 | + switch ($relValues[0]) |
|
| 6831 | + { |
|
| 6832 | + case TActiveRecord::BELONGS_TO: |
|
| 6833 | + case TActiveRecord::HAS_ONE: |
|
| 6834 | + $relControl->Text = $arObj->{$relKey}; |
|
| 6835 | + break; |
|
| 6836 | + case TActiveRecord::HAS_MANY: |
|
| 6837 | + if ($relControl instanceof TListControl) |
|
| 6838 | + { |
|
| 6839 | + $relControl->DataSource = $arObj->{$relKey}; |
|
| 6840 | + $relControl->dataBind(); |
|
| 6841 | + } |
|
| 6842 | + break; |
|
| 6843 | + } |
|
| 6844 | + } |
|
| 6845 | + break; |
|
| 6846 | + } |
|
| 6847 | + } |
|
| 6848 | + catch (Exception $ex) |
|
| 6849 | + { |
|
| 6850 | + if ($throwExceptions) |
|
| 6851 | + throw $ex; |
|
| 6852 | + } |
|
| 6853 | + } |
|
| 6854 | + } |
|
| 6855 | + public function tryToUpdateAR($arObj, $throwExceptions = false) |
|
| 6856 | + { |
|
| 6857 | + $objAttrs = get_class_vars(get_class($arObj)); |
|
| 6858 | + foreach (array_keys($objAttrs) as $key) |
|
| 6859 | + { |
|
| 6860 | + try |
|
| 6861 | + { |
|
| 6862 | + if ($key == "RELATIONS") |
|
| 6863 | + break; |
|
| 6864 | + $control = $this->{$key}; |
|
| 6865 | + if ($control instanceof TTextBox) |
|
| 6866 | + $arObj->{$key} = $control->Text; |
|
| 6867 | + elseif ($control instanceof TCheckBox) |
|
| 6868 | + $arObj->{$key} = $control->Checked; |
|
| 6869 | + elseif ($control instanceof TDatePicker) |
|
| 6870 | + $arObj->{$key} = $control->Date; |
|
| 6871 | + } |
|
| 6872 | + catch (Exception $ex) |
|
| 6873 | + { |
|
| 6874 | + if ($throwExceptions) |
|
| 6875 | + throw $ex; |
|
| 6876 | + } |
|
| 6877 | + } |
|
| 6878 | + } |
|
| 6879 | 6879 | } |
| 6880 | 6880 | class TForm extends TControl |
| 6881 | 6881 | { |
@@ -7536,13 +7536,13 @@ discard block |
||
| 7536 | 7536 | { |
| 7537 | 7537 | Prado::using('System.Web.UI.ActiveControls.TActivePageAdapter'); |
| 7538 | 7538 | $this->setAdapter(new TActivePageAdapter($this)); |
| 7539 | - $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER); |
|
| 7540 | - if(strlen($callbackEventParameter) > 0) |
|
| 7541 | - $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter); |
|
| 7542 | - if (($g=$this->getApplication()->getGlobalization(false))!==null && |
|
| 7543 | - strtoupper($enc=$g->getCharset())!='UTF-8') |
|
| 7544 | - foreach ($this->_postData as $k=>$v) |
|
| 7545 | - $this->_postData[$k]=self::decodeUTF8($v, $enc); |
|
| 7539 | + $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER); |
|
| 7540 | + if(strlen($callbackEventParameter) > 0) |
|
| 7541 | + $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter); |
|
| 7542 | + if (($g=$this->getApplication()->getGlobalization(false))!==null && |
|
| 7543 | + strtoupper($enc=$g->getCharset())!='UTF-8') |
|
| 7544 | + foreach ($this->_postData as $k=>$v) |
|
| 7545 | + $this->_postData[$k]=self::decodeUTF8($v, $enc); |
|
| 7546 | 7546 | $this->onPreInit(null); |
| 7547 | 7547 | $this->initRecursive(); |
| 7548 | 7548 | $this->onInitComplete(null); |
@@ -9127,15 +9127,15 @@ discard block |
||
| 9127 | 9127 | $component=new ReflectionClass('TComponent'); |
| 9128 | 9128 | $behaviors=$component->getStaticProperties(); |
| 9129 | 9129 | if(!isset($behaviors['_um'])) |
| 9130 | - return false; |
|
| 9130 | + return false; |
|
| 9131 | 9131 | foreach($behaviors['_um'] as $name=>$list) |
| 9132 | 9132 | { |
| 9133 | - if(strtolower($class->getShortName())!==$name && !$class->isSubclassOf($name)) continue; |
|
| 9134 | - foreach($list as $param) |
|
| 9135 | - { |
|
| 9136 | - if(method_exists($param->getBehavior(),$method)) |
|
| 9137 | - return true; |
|
| 9138 | - } |
|
| 9133 | + if(strtolower($class->getShortName())!==$name && !$class->isSubclassOf($name)) continue; |
|
| 9134 | + foreach($list as $param) |
|
| 9135 | + { |
|
| 9136 | + if(method_exists($param->getBehavior(),$method)) |
|
| 9137 | + return true; |
|
| 9138 | + } |
|
| 9139 | 9139 | } |
| 9140 | 9140 | return false; |
| 9141 | 9141 | } |