Esempio n. 1
0
     } else {
         if ($content == "") {
             $error .= '<li>' . lang('nofieldgiven', array('content')) . '</li>';
             $validinfo = false;
         }
     }
 }
 if ($validinfo) {
     $the_blob->id = $htmlblob_id;
     $the_blob->use_wysiwyg = $use_wysiwyg;
     $the_blob->description = $description;
     $the_blob->name = $htmlblob;
     $the_blob->content = $content;
     $the_blob->owner = $owner_id;
     if (isset($_POST["additional_editors"])) {
         $the_blob->ClearAuthors();
         foreach ($_POST["additional_editors"] as $addt_user_id) {
             $the_blob->AddAuthor($addt_user_id);
         }
     }
     Events::SendEvent('Core', 'EditGlobalContentPre', array('global_content' => &$the_blob));
     $result = $the_blob->save();
     if ($result) {
         // put mention into the admin log
         audit($the_blob->id, 'Global Content Block: ' . $the_blob->name, 'Edited');
         #Clear cache
         $smarty = cmsms()->GetSmarty();
         $smarty->clear_all_cache();
         $smarty->clear_compiled_tpl();
         Events::SendEvent('Core', 'EditGlobalContentPost', array('global_content' => &$the_blob));
         if (!isset($_POST['apply'])) {