예제 #1
0
     $iclsettings['setup_wizard_step'] = 2;
     $this->save_settings($iclsettings);
     break;
 case 'toggle_show_translations':
     $iclsettings['show_translations_flag'] = @intval(!$iclsettings['show_translations_flag']);
     $this->save_settings($iclsettings);
     break;
 case 'icl_messages':
     if (!$this->get_setting('icl_disable_reminders')) {
         break;
     }
     if (!empty($iclsettings['site_id']) && !empty($iclsettings['access_key']) && empty($iclsettings['icl_anonymous_user'])) {
         $iclq = new ICanLocalizeQuery($iclsettings['site_id'], $iclsettings['access_key']);
         $output = '';
         if (isset($_POST['refresh']) && $_POST['refresh'] == 1) {
             $reminders = $iclq->get_reminders(true);
         } else {
             $reminders = $iclq->get_reminders();
         }
         $count = 0;
         foreach ($reminders as $r) {
             $message = $r->message;
             $message = str_replace('[', '<', $message);
             $message = str_replace(']', '>', $message);
             $url = $r->url;
             $anchor_pos = strpos($url, '#');
             if ($anchor_pos !== false) {
                 $url = substr($url, 0, $anchor_pos);
             }
             if (false !== strpos($url, '?')) {
                 $url_glue = '&';