| @@ 123-134 (lines=12) @@ | ||
| 120 | ||
| 121 | // Display the Site Use Cookie Warning Validation |
|
| 122 | $useCookieValidation = api_get_setting('cookie_warning'); |
|
| 123 | if ($useCookieValidation === 'true') { |
|
| 124 | if (isset($_POST['acceptCookies'])) { |
|
| 125 | api_set_site_use_cookie_warning_cookie(); |
|
| 126 | } else if (!api_site_use_cookie_warning_cookie_exist()) { |
|
| 127 | if (Template::isToolBarDisplayedForUser()) { |
|
| 128 | $controller->tpl->assign('toolBarDisplayed', true); |
|
| 129 | } else { |
|
| 130 | $controller->tpl->assign('toolBarDisplayed', false); |
|
| 131 | } |
|
| 132 | $controller->tpl->assign('displayCookieUsageWarning', true); |
|
| 133 | } |
|
| 134 | } |
|
| 135 | ||
| 136 | // When loading a chamilo page do not include the hot courses and news |
|
| 137 | ||
| @@ 194-207 (lines=14) @@ | ||
| 191 | ||
| 192 | // Display the Site Use Cookie Warning Validation |
|
| 193 | $useCookieValidation = api_get_setting('cookie_warning'); |
|
| 194 | if ($useCookieValidation === 'true') { |
|
| 195 | if (isset($_POST['acceptCookies'])) { |
|
| 196 | api_set_site_use_cookie_warning_cookie(); |
|
| 197 | } else { |
|
| 198 | if (!api_site_use_cookie_warning_cookie_exist()) { |
|
| 199 | if (Template::isToolBarDisplayedForUser()) { |
|
| 200 | $controller->tpl->assign('toolBarDisplayed', true); |
|
| 201 | } else { |
|
| 202 | $controller->tpl->assign('toolBarDisplayed', false); |
|
| 203 | } |
|
| 204 | $controller->tpl->assign('displayCookieUsageWarning', true); |
|
| 205 | } |
|
| 206 | } |
|
| 207 | } |
|
| 208 | ||
| 209 | //check for flash and message |
|
| 210 | $sniff_notification = ''; |
|