Index: branches/RC/core/units/admin/admin_events_handler.php =================================================================== diff -u -N -r11336 -r11409 --- branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 11336) +++ branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 11409) @@ -53,6 +53,14 @@ return $this->Application->CheckPermission($tools_events[$event->Name]); } + if ($event->Name == 'OnSaveMenuFrameWidth') { + if (!$this->Application->IsAdmin() || !$this->Application->LoggedIn()) { + return false; + } + + return true; + } + return parent::CheckPermission($event); } @@ -1167,4 +1175,27 @@ } } + /** + * Saves menu (tree) frame width + * + * @param kEvent $event + */ + function OnSaveMenuFrameWidth(&$event) + { + $event->status = erSTOP; + + if (!$this->Application->ConfigValue('ResizableFrames')) { + return ; + } + + $sql = 'UPDATE ' . $this->Application->getUnitOption('conf', 'TableName') . ' + SET VariableValue = ' . (int)$this->Application->GetVar('width') . ' + WHERE VariableName = "MenuFrameWidth"'; + $this->Conn->Query($sql); + + if ($this->Conn->getAffectedRows()) { + $this->Application->UnitConfigReader->ResetParsedData(false); + } + } + } \ No newline at end of file