/**
  * Checks, if html newsletter article still exists
  * @return bool
  */
 public function htmlArticleExists()
 {
     if ($this->get("idart") > 0) {
         $oArticles = new cApiArticleLanguageCollection();
         $oArticles->setWhere("idlang", $this->get("idlang"));
         $oArticles->setWhere("idart", $this->get("idart"));
         $oArticles->query();
         if ($oArticles->count() > 0) {
             $bReturn = true;
         } else {
             $bReturn = false;
         }
         unset($oArticles);
     } else {
         $bReturn = false;
     }
     return $bReturn;
 }
             $iIDArt = 0;
         }
         if ($_REQUEST["selTemplate"] > 0) {
             // Template has been changed, but specified: Store template article as new newsletter article
             $iIDArt = conCopyArticle($_REQUEST["selTemplate"], $oClientLang->getProperty("newsletter", "html_newsletter_idcat"), sprintf(i18n("Newsletter: %s", $plugin_name), $oNewsletter->get("name")));
             conMakeOnline($iIDArt, $lang);
             // Article has to be online for sending...
         }
         $oNewsletter->set("idart", $iIDArt);
         $oNewsletter->set("template_idart", $_REQUEST["selTemplate"]);
     }
     $oNewsletter->store();
 } else {
     if ($oNewsletter->get("idart") > 0) {
         // Check, if html message article and template article are still available
         $oArticles = new cApiArticleLanguageCollection();
         $oArticles->setWhere("idlang", $lang);
         $oArticles->setWhere("idart", $oNewsletter->get("idart"));
         $oArticles->query();
         if ($oArticles->count() == 0) {
             // Ups, article lost, reset idart and template_idart for newsletter
             $notis = $notification->returnNotification("error", sprintf(i18n("The html newsletter article has been deleted (idart: %s), the html message is lost", $plugin_name), $oNewsletter->get("idart"))) . "<br>";
             $oNewsletter->set("idart", 0);
             $oNewsletter->set("template_idart", 0);
             $oNewsletter->store();
         } else {
             $oArticles->resetQuery();
             $oArticles->setWhere("idlang", $lang);
             $oArticles->setWhere("idart", $oNewsletter->get("template_idart"));
             $oArticles->query();
             if ($oArticles->count() == 0) {