Добавления приватности.
Как сделать чтобы выполнялась запись в БД?
Вот код private.tpl:
И вот код из ActionSettings.class.php:
Думаю почему то не выполняется это: ($this->User_Update($this->oUserCurrent))
Выдает ошибку: `system_error`
Вот код private.tpl:
{assign var="sidebarPosition" value='left'} {include file='header.tpl'} {include file='actions/ActionProfile/profile_top.tpl'} {include file='menu.settings.tpl'} {hook run='settings_private_begin'} <form action="{router page='settings'}private/" method="POST" enctype="multipart/form-data"> {hook run='form_settings_private_begin'} <input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" /> <h3 class="header-sep">{$aLang.settings_private_about}</h3> <label><input {if $oUserCurrent->getSettingsPrivateStatus()}checked{/if} type="checkbox" id="settings_private_status" name="settings_private_status" value="1" class="input-checkbox" /> {$aLang.settings_private_status} | [{$aLang.settings_private_info}:100] </label> <label><input {if $oUserCurrent->getSettingsPrivateFreand()}checked{/if} type="checkbox" id="settings_private_freand" name="settings_private_freand" value="1" class="input-checkbox" /> {$aLang.settings_private_freand} | [{$aLang.settings_private_info}:500] </label> <label><input {if $oUserCurrent->getSettingsPrivatePhoto()}checked{/if} type="checkbox" id="settings_private_photo" name="settings_private_photo" value="1" class="input-checkbox" /> {$aLang.settings_private_photo} | [{$aLang.settings_private_info}:1000] </label> <label><input {if $oUserCurrent->getSettingsPrivateProfile()}checked{/if} type="checkbox" id="settings_private_profile" name="settings_private_profile" value="1" class="input-checkbox" /> {$aLang.settings_private_profile} | [{$aLang.settings_private_info}:10000] </label> {hook run='form_settings_private_end'} <br /> <br /> <button type="submit" name="submit_settings_private" class="button button-primary">{$aLang.settings_profile_submit}</button> </form> {hook run='settings_private_end'} {include file='footer.tpl'}
И вот код из ActionSettings.class.php:
protected function EventPrivate() { $this->sMenuItemSelect='settings'; $this->sMenuSubItemSelect='private'; $this->Viewer_AddHtmlTitle($this->Lang_Get('settings_menu_private')); /** * Если отправили форму с настройками - сохраняем */ isPost('submit_settings_private'); $this->Security_ValidateSendForm(); $this->oUserCurrent->setSettingsPrivateStatus( getRequest('settings_private_status') ? 1 : 0 ); $this->oUserCurrent->setSettingsPrivateFreand( getRequest('settings_private_freand') ? 1 : 0 ); $this->oUserCurrent->setSettingsPrivatePhoto( getRequest('settings_private_photo') ? 1 : 0 ); $this->oUserCurrent->setSettingsPrivateProfile( getRequest('settings_private_profile') ? 1 : 0 ); /** * Запускаем выполнение хуков */ $this->Hook_Run('settings_private_save_before', array('oUser'=>$this->oUserCurrent)); if ($this->User_Update($this->oUserCurrent)) { $this->Message_AddNoticeSingle($this->Lang_Get('settings_private_submit_ok')); $this->Hook_Run('settings_private_save_after', array('oUser'=>$this->oUserCurrent)); } else { $this->Message_AddErrorSingle($this->Lang_Get('system_error')); } }
Думаю почему то не выполняется это: ($this->User_Update($this->oUserCurrent))
Выдает ошибку: `system_error`
0 комментариев