| @@ 215-228 (lines=14) @@ | ||
| 212 | ||
| 213 | // Display the Site Use Cookie Warning Validation |
|
| 214 | $useCookieValidation = api_get_setting('cookie_warning'); |
|
| 215 | if ($useCookieValidation === 'true') { |
|
| 216 | if (isset($_POST['acceptCookies'])) { |
|
| 217 | api_set_site_use_cookie_warning_cookie(); |
|
| 218 | } else { |
|
| 219 | if (!api_site_use_cookie_warning_cookie_exist()) { |
|
| 220 | if (Template::isToolBarDisplayedForUser()) { |
|
| 221 | $controller->tpl->assign('toolBarDisplayed', true); |
|
| 222 | } else { |
|
| 223 | $controller->tpl->assign('toolBarDisplayed', false); |
|
| 224 | } |
|
| 225 | $controller->tpl->assign('displayCookieUsageWarning', true); |
|
| 226 | } |
|
| 227 | } |
|
| 228 | } |
|
| 229 | ||
| 230 | //check for flash and message |
|
| 231 | $sniff_notification = ''; |
|
| @@ 126-137 (lines=12) @@ | ||
| 123 | ||
| 124 | // Display the Site Use Cookie Warning Validation |
|
| 125 | $useCookieValidation = api_get_setting('cookie_warning'); |
|
| 126 | if ($useCookieValidation === 'true') { |
|
| 127 | if (isset($_POST['acceptCookies'])) { |
|
| 128 | api_set_site_use_cookie_warning_cookie(); |
|
| 129 | } else if (!api_site_use_cookie_warning_cookie_exist()) { |
|
| 130 | if (Template::isToolBarDisplayedForUser()) { |
|
| 131 | $controller->tpl->assign('toolBarDisplayed', true); |
|
| 132 | } else { |
|
| 133 | $controller->tpl->assign('toolBarDisplayed', false); |
|
| 134 | } |
|
| 135 | $controller->tpl->assign('displayCookieUsageWarning', true); |
|
| 136 | } |
|
| 137 | } |
|
| 138 | ||
| 139 | // When loading a chamilo page do not include the hot courses and news |
|
| 140 | ||