| @@ 131-142 (lines=12) @@ | ||
| 128 | ||
| 129 | // Display the Site Use Cookie Warning Validation |
|
| 130 | $useCookieValidation = api_get_setting('cookie_warning'); |
|
| 131 | if ($useCookieValidation === 'true') { |
|
| 132 | if (isset($_POST['acceptCookies'])) { |
|
| 133 | api_set_site_use_cookie_warning_cookie(); |
|
| 134 | } else if (!api_site_use_cookie_warning_cookie_exist()) { |
|
| 135 | if (Template::isToolBarDisplayedForUser()) { |
|
| 136 | $controller->tpl->assign('toolBarDisplayed', true); |
|
| 137 | } else { |
|
| 138 | $controller->tpl->assign('toolBarDisplayed', false); |
|
| 139 | } |
|
| 140 | $controller->tpl->assign('displayCookieUsageWarning', true); |
|
| 141 | } |
|
| 142 | } |
|
| 143 | ||
| 144 | // When loading a chamilo page do not include the hot courses and news |
|
| 145 | ||
| @@ 225-238 (lines=14) @@ | ||
| 222 | ||
| 223 | // Display the Site Use Cookie Warning Validation |
|
| 224 | $useCookieValidation = api_get_setting('cookie_warning'); |
|
| 225 | if ($useCookieValidation === 'true') { |
|
| 226 | if (isset($_POST['acceptCookies'])) { |
|
| 227 | api_set_site_use_cookie_warning_cookie(); |
|
| 228 | } else { |
|
| 229 | if (!api_site_use_cookie_warning_cookie_exist()) { |
|
| 230 | if (Template::isToolBarDisplayedForUser()) { |
|
| 231 | $controller->tpl->assign('toolBarDisplayed', true); |
|
| 232 | } else { |
|
| 233 | $controller->tpl->assign('toolBarDisplayed', false); |
|
| 234 | } |
|
| 235 | $controller->tpl->assign('displayCookieUsageWarning', true); |
|
| 236 | } |
|
| 237 | } |
|
| 238 | } |
|
| 239 | ||
| 240 | //check for flash and message |
|
| 241 | $sniff_notification = ''; |
|