public function save($args)
 {
     $args['mautic_base_url'] = isset($args['mautic_base_url']) ? $args['mautic_base_url'] : '';
     // Sanitize URL
     $args['mautic_base_url'] = trim($args['mautic_base_url'], ' \\t\\n\\r\\0\\x0B/');
     parent::save($args);
 }
 public function save($args)
 {
     $db = Loader::db();
     $args['showArrows'] = intval($args['showArrows']);
     $args['loopSequence'] = intval($args['loopSequence']);
     parent::save($args);
 }
Exemple #3
0
 public function save($args)
 {
     $args += array('showArrows' => 0, 'loopSequence' => 0);
     $args['showArrows'] = intval($args['showArrows']);
     $args['loopSequence'] = intval($args['loopSequence']);
     parent::save($args);
 }
 public function save($data)
 {
     $args['content'] = isset($data['content']) ? $data['content'] : '';
     $args['language'] = isset($data['language']) ? $data['language'] : '';
     $args['theme'] = isset($data['theme']) ? $data['theme'] : '';
     parent::save($args);
 }
 public function save($args)
 {
     $db = Loader::db();
     $cnvMessageID = $db->GetOne('select cnvMessageID from btCoreConversationMessage where bID = ?', array($this->bID));
     if (!$cnvMessageID) {
         $message = ConversationMessage::add(false, $args['cnvMessageSubject'], $args['cnvMessageBody']);
         if (!Loader::helper('validation/antispam')->check($args['cnvMessageBody'], 'conversation_comment')) {
             $message->flag(ConversationFlagType::getByHandle('spam'));
         } else {
             $message->approve();
         }
         $data = array();
         $data['cnvMessageID'] = $message->getConversationMessageID();
         parent::save($data);
         // update any conversation blocks on that page to have their conversations reflect that this is a base message block.
         // we will then use that to group and show replies and messages in the dashboard
         $b = $this->getBlockObject();
         $c = $b->getBlockCollectionObject();
         $blocks = $c->getBlocks();
         foreach ($blocks as $b) {
             if ($b->getBlockTypeHandle() == BLOCK_HANDLE_CONVERSATION) {
                 $bi = $b->getController();
                 $conversation = $bi->getConversationObject();
                 $conversation->setConversationParentMessageID($message->getConversationMessageID());
             }
         }
     }
 }
Exemple #6
0
 public function save($args)
 {
     $args['enableFullWidth'] = isset($args['enableFullWidth']) ? 1 : 0;
     $args['enableClear'] = isset($args['enableClear']) ? 1 : 0;
     $args['enableSticky'] = isset($args['enableSticky']) ? 1 : 0;
     parent::save($args);
 }
Exemple #7
0
 public function save($args)
 {
     $args['do_crop'] = $args['do_crop'] ? true : false;
     // Due to a bug in the core, we can't save null values yet...
     $args['max_width'] = !empty($args['max_width']) ? $args['max_width'] : 0;
     $args['max_height'] = !empty($args['max_height']) ? $args['max_height'] : 0;
     parent::save($args);
 }
Exemple #8
0
 public function save($args)
 {
     if ($args['table_data'] == '[[null],[null]]' || $args['table_data'] == '[[null]]') {
         $args['table_data'] = '';
         $args['table_metadata'] = '';
     }
     parent::save($args);
 }
 public function save($args)
 {
     $args['showCartItems'] = isset($args['showCartItems']) ? 1 : 0;
     $args['showCartTotal'] = isset($args['showCartTotal']) ? 1 : 0;
     $args['showSignIn'] = isset($args['showSignIn']) ? 1 : 0;
     $args['showCheckout'] = isset($args['showCheckout']) ? 1 : 0;
     $args['showGreeting'] = isset($args['showGreeting']) ? 1 : 0;
     parent::save($args);
 }
Exemple #10
0
 public function save($data)
 {
     $args['title'] = isset($data['title']) ? trim($data['title']) : '';
     $args['videoURL'] = isset($data['videoURL']) ? trim($data['videoURL']) : '';
     $args['vHeight'] = isset($data['vHeight']) ? trim($data['vHeight']) : '';
     $args['vWidth'] = isset($data['vWidth']) ? trim($data['vWidth']) : '';
     $args['vPlayer'] = $data['vPlayer'] == 1 ? 1 : 0;
     parent::save($args);
 }
Exemple #11
0
 public function save($data)
 {
     if (isset($data['host'])) {
         $url = Url::createFromUrl($data['host']);
         $host = $url->getHost();
         $data['host'] = (string) $host;
     }
     parent::save($data);
 }
 public function save($args)
 {
     $args['mautic_base_url'] = isset($args['mautic_base_url']) ? $args['mautic_base_url'] : '';
     // Sanitize URL
     $args['mautic_base_url'] = trim($args['mautic_base_url']);
     $args['mautic_base_url'] = rtrim($args['mautic_base_url'], '/');
     $args['mautic_base_url'] = ltrim($args['mautic_base_url'], 'https:');
     parent::save($args);
 }
 public function save($data)
 {
     $data['useCustomTitle'] = isset($data['useCustomTitle']) && $data['useCustomTitle'] ? 1 : 0;
     $data['useFilterTitle'] = isset($data['useFilterTitle']) && $data['useFilterTitle'] ? 1 : 0;
     $data['useFilterTopic'] = isset($data['useFilterTopic']) && $data['useFilterTopic'] ? 1 : 0;
     $data['useFilterTag'] = isset($data['useFilterTag']) && $data['useFilterTag'] ? 1 : 0;
     $data['useFilterDate'] = isset($data['useFilterDate']) && $data['useFilterDate'] ? 1 : 0;
     parent::save($data);
 }
 function save($data)
 {
     $args['webmfID'] = intval($data['webmfID']) > 0 ? intval($data['webmfID']) : 0;
     $args['oggfID'] = intval($data['oggfID']) > 0 ? intval($data['oggfID']) : 0;
     $args['mp4fID'] = intval($data['mp4fID']) > 0 ? intval($data['mp4fID']) : 0;
     $args['posterfID'] = intval($data['posterfID']) > 0 ? intval($data['posterfID']) : 0;
     $args['width'] = intval($data['width']) > 0 ? intval($data['width']) : 425;
     $args['height'] = intval($data['height']) > 0 ? intval($data['height']) : 334;
     parent::save($args);
 }
Exemple #15
0
 public function save($args)
 {
     $args['showQuickViewLink'] = isset($args['showQuickViewLink']) ? 1 : 0;
     $args['showPageLink'] = isset($args['showPageLink']) ? 1 : 0;
     $args['showAddToCart'] = isset($args['showAddToCart']) ? 1 : 0;
     $args['showLink'] = isset($args['showLink']) ? 1 : 0;
     $args['showButton'] = isset($args['showButton']) ? 1 : 0;
     $args['truncateEnabled'] = isset($args['truncateEnabled']) ? 1 : 0;
     $args['showPagination'] = isset($args['showPagination']) ? 1 : 0;
     parent::save($args);
 }
Exemple #16
0
 public function save($data)
 {
     $args['title'] = isset($data['title']) ? trim($data['title']) : '';
     $args['location'] = isset($data['location']) ? trim($data['location']) : '';
     $args['zoom'] = intval($data['zoom']) >= 0 && intval($data['zoom']) <= 21 ? intval($data['zoom']) : 14;
     $args['latitude'] = is_numeric($data['latitude']) ? $data['latitude'] : 0;
     $args['longitude'] = is_numeric($data['longitude']) ? $data['longitude'] : 0;
     $args['width'] = $data['width'];
     $args['height'] = $data['height'];
     $args['scrollwheel'] = $data['scrollwheel'] ? 1 : 0;
     parent::save($args);
 }
 public function save($args)
 {
     $db = Loader::db();
     $db->execute('DELETE from btFaqEntries WHERE bID = ?', array($this->bID));
     $count = count($args['sortOrder']);
     $i = 0;
     parent::save($args);
     while ($i < $count) {
         $db->execute('INSERT INTO btFaqEntries (bID, title, linkTitle, description, sortOrder) values(?,?,?,?,?)', array($this->bID, $args['title'][$i], $args['linkTitle'][$i], $args['description'][$i], $args['sortOrder'][$i]));
         $i++;
     }
 }
 function save($args)
 {
     $args['numberFiles'] = $args['numberFiles'] > 0 ? $args['numberFiles'] : 0;
     $args['displaySetTitle'] = $args['displaySetTitle'] ? '1' : '0';
     $args['replaceUnderscores'] = $args['replaceUnderscores'] ? '1' : '0';
     $args['displaySize'] = $args['displaySize'] ? '1' : '0';
     $args['displayDateAdded'] = $args['displayDateAdded'] ? '1' : '0';
     $args['uppercaseFirst'] = $args['uppercaseFirst'] ? '1' : '0';
     $args['paginate'] = $args['paginate'] ? '1' : '0';
     $args['forceDownload'] = $args['forceDownload'] ? '1' : '0';
     parent::save($args);
 }
 public function save($args)
 {
     // convert to int
     $args['sectorId'] = intval($args['sectorId']);
     // convert to string
     if (is_array($args['types'])) {
         $args['types'] = implode(',', $args['types']);
     } else {
         $args['types'] = '';
     }
     parent::save($args);
 }
Exemple #20
0
 public function save($args)
 {
     $db = Database::connection();
     $db->execute('DELETE from btFaqEntries WHERE bID = ?', array($this->bID));
     $count = isset($args['sortOrder']) ? count($args['sortOrder']) : 0;
     $i = 0;
     parent::save($args);
     while ($i < $count) {
         $db->execute('INSERT INTO btFaqEntries (bID, title, linkTitle, description, sortOrder) values(?,?,?,?,?)', array($this->bID, $args['title'][$i], $args['linkTitle'][$i], $args['description'][$i], $args['sortOrder'][$i]));
         ++$i;
     }
 }
Exemple #21
0
 public function save($data)
 {
     $data += array('title' => '', 'location' => '', 'zoom' => -1, 'latitude' => 0, 'longitude' => 0, 'width' => null, 'width' => null, 'scrollwheel' => 0);
     $args['title'] = trim($data['title']);
     $args['location'] = trim($data['location']);
     $args['zoom'] = intval($data['zoom']) >= 0 && intval($data['zoom']) <= 21 ? intval($data['zoom']) : 14;
     $args['latitude'] = is_numeric($data['latitude']) ? $data['latitude'] : 0;
     $args['longitude'] = is_numeric($data['longitude']) ? $data['longitude'] : 0;
     $args['width'] = $data['width'];
     $args['height'] = $data['height'];
     $args['scrollwheel'] = $data['scrollwheel'] ? 1 : 0;
     parent::save($args);
 }
 public function save($data)
 {
     $data += ['title' => '', 'location' => '', 'zoom' => -1, 'latitude' => 0, 'longitude' => 0, 'width' => null, 'height' => null, 'scrollwheel' => 0, 'apiKey' => ''];
     Config::save('app.api_keys.google.maps', trim($data['apiKey']));
     $args['title'] = trim($data['title']);
     $args['location'] = trim($data['location']);
     $args['zoom'] = intval($data['zoom']) >= 0 && intval($data['zoom']) <= 21 ? intval($data['zoom']) : 14;
     $args['latitude'] = is_numeric($data['latitude']) ? $data['latitude'] : 0;
     $args['longitude'] = is_numeric($data['longitude']) ? $data['longitude'] : 0;
     $args['width'] = $data['width'];
     $args['height'] = $data['height'];
     $args['scrollwheel'] = $data['scrollwheel'] ? 1 : 0;
     parent::save($args);
 }
Exemple #23
0
 public function save($args)
 {
     $db = Loader::db();
     $db->execute('DELETE from btVividSimpleAccordionItem WHERE bID = ?', array($this->bID));
     $count = count($args['sortOrder']);
     $i = 0;
     parent::save($args);
     while ($i < $count) {
         $db->execute('INSERT INTO btVividSimpleAccordionItem (bID, title, description, state, sortOrder) values(?,?,?,?,?)', array($this->bID, $args['title'][$i], $args['description'][$i], $args['state'][$i], $args['sortOrder'][$i]));
         $i++;
     }
     $blockObject = $this->getBlockObject();
     if (is_object($blockObject)) {
         $blockObject->setCustomTemplate($args['framework']);
     }
 }
Exemple #24
0
 public function save($args)
 {
     // save data in default table btTextList
     parent::save($args);
     // save procedure for table btTextListEntries
     $db = Database::connection();
     $db->query('DELETE FROM btTextListEntries WHERE bID = ?', array($this->bID));
     if (is_array($args['textEntries'])) {
         foreach ($args['textEntries'] as $textEntry) {
             if ($textEntry != '') {
                 $params = array($this->bID, $textEntry);
                 $query = "INSERT INTO btTextListEntries (bID, textEntry) VALUES (?, ?)";
                 $db->query($query, $params);
             }
         }
     }
 }
 public function save($args)
 {
     $session = Core::make('app')->make('session');
     $session->set('msv_code_display.lastFontSize', $this->post('fontSize'));
     $session->set('msv_code_display.lastLanguage', $this->post('language'));
     $session->set('msv_code_display.lastTheme', $this->post('theme'));
     $session->set('msv_code_display.lastShowLineNumbers', $this->post('showLineNumbers'));
     $session->set('msv_code_display.lastlineWrapping', $this->post('lineWrapping'));
     $args['showLineNumbers'] = $args['showLineNumbers'] ? 1 : 0;
     $args['showInvisibles'] = $args['showInvisibles'] ? 1 : 0;
     $args['lineWrapping'] = $args['lineWrapping'] ? 1 : 0;
     $args['content'] = isset($args['content']) ? base64_decode($args['content']) : '';
     $args['title'] = trim($args['title']);
     $args['fontSize'] = max($args['fontSize'], 2);
     $args['maximumLines'] = max($args['maximumLines'], 0);
     $args['description'] = LinkAbstractor::translateTo($args['description']);
     parent::save($args);
 }
Exemple #26
0
 public function save($args)
 {
     $db = Loader::db();
     $db->execute('DELETE from btVividCarouselItem WHERE bID = ?', array($this->bID));
     $count = count($args['sort']);
     $i = 0;
     parent::save($args);
     while ($i < $count) {
         if (empty($args['pageID'][$i])) {
             $args['pageID'][$i] = 0;
         }
         if (empty($args['fID'][$i])) {
             $args['fID'][$i] = 0;
         }
         $vals = array($this->bID, $args['fID'][$i], $args['title'][$i], $args['carcontent'][$i], $args['pageID'][$i], $args['btntext'][$i], $args['sort'][$i]);
         $db->execute('INSERT INTO btVividCarouselItem (bID, fID, title, carcontent, pageID, btntext, sort) values(?,?,?,?,?,?,?)', $vals);
         $i++;
     }
 }
Exemple #27
0
 public function save($args)
 {
     $args['showProductName'] = isset($args['showProductName']) ? 1 : 0;
     $args['showProductDescription'] = isset($args['showProductDescription']) ? 1 : 0;
     $args['showProductDetails'] = isset($args['showProductDetails']) ? 1 : 0;
     $args['showProductPrice'] = isset($args['showProductPrice']) ? 1 : 0;
     $args['showWeight'] = isset($args['showWeight']) ? 1 : 0;
     $args['showImage'] = isset($args['showImage']) ? 1 : 0;
     $args['showCartButton'] = isset($args['showCartButton']) ? 1 : 0;
     $args['showIsFeatured'] = isset($args['showIsFeatured']) ? 1 : 0;
     $args['showGroups'] = isset($args['showGroups']) ? 1 : 0;
     $args['showDimensions'] = isset($args['showDimensions']) ? 1 : 0;
     if ($args['productLocation'] == 'search') {
         if (!is_numeric($args['pID']) || $args['pID'] < 1) {
             $args['productLocation'] = "page";
         }
     }
     parent::save($args);
 }
 public function save($data)
 {
     $args['title'] = isset($data['title']) ? trim($data['title']) : '';
     $args['videoURL'] = isset($data['videoURL']) ? trim($data['videoURL']) : '';
     $args['vHeight'] = isset($data['vHeight']) ? trim($data['vHeight']) : '';
     $args['vWidth'] = isset($data['vWidth']) ? trim($data['vWidth']) : '';
     $args['rel'] = $data['rel'] ? 1 : 0;
     $args['showinfo'] = $data['showinfo'] ? 1 : 0;
     $args['autoplay'] = $data['autoplay'] ? 1 : 0;
     $args['loopEnd'] = $data['loopEnd'] ? 1 : 0;
     $args['modestbranding'] = $data['modestbranding'] ? 1 : 0;
     $args['iv_load_policy'] = $data['iv_load_policy'] ? 3 : 1;
     $args['color'] = $data['color'];
     $args['sizing'] = $data['sizing'];
     $args['controls'] = $data['controls'] ? 1 : 0;
     if ($data['sizing'] != 'fixed') {
         $args['vHeight'] = '';
         $args['vWidth'] = '';
     }
     parent::save($args);
 }
Exemple #29
0
 public function save($args)
 {
     $db = Database::get();
     $db->execute('DELETE from btHeroSliderEntries WHERE bID = ?', array($this->bID));
     parent::save($args);
     if (isset($args['sortOrder'])) {
         $count = count($args['sortOrder']);
         $i = 0;
         //Log::addEntry("In save");
         //Log::addEntry($args['enableSlide'][1]);
         while ($i < $count) {
             $enableSlide = $args['enableSlide'][$i];
             $linkURL = $args['linkURL'][$i];
             $internalLinkCID = $args['internalLinkCID'][$i];
             switch (intval($args['linkType'][$i])) {
                 case 1:
                     $linkURL = '';
                     break;
                 case 2:
                     $internalLinkCID = 0;
                     break;
                 default:
                     $linkURL = '';
                     $internalLinkCID = 0;
                     break;
             }
             if (isset($args['description'][$i])) {
                 $args['description'][$i] = LinkAbstractor::translateTo($args['description'][$i]);
             }
             $db->execute('INSERT INTO btHeroSliderEntries (bID, enableSlide, heading, headingColor, description, descriptionColor,
 					background, textLeftAlign, ctatext, internalLinkCID, linkType, externalLink, openInNewWindow, 
 					iconID, icontext, fID, fOnstateID, sortOrder)
 					values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', array($this->bID, $args['enableSlide'][$i], $args['heading'][$i], $args['headingColor'][$i], $args['description'][$i], $args['descriptionColor'][$i], $args['background'][$i], $args['textLeftAlign'][$i], $args['ctatext'][$i], $args['internalLinkCID'][$i], $args['linkType'][$i], $args['externalLink'][$i], $args['openInNewWindow'][$i], $args['iconID'][$i], $args['icontext'][$i], intval($args['fID'][$i]), $args['fOnstateID'][$i], $args['sortOrder'][$i]));
             ++$i;
         }
     }
 }
 public function save($args)
 {
     $args += array('timeout' => 4000, 'speed' => 500);
     $args['timeout'] = intval($args['timeout']);
     $args['speed'] = intval($args['speed']);
     $args['noAnimate'] = isset($args['noAnimate']) ? 1 : 0;
     $args['pause'] = isset($args['pause']) ? 1 : 0;
     $args['maxWidth'] = isset($args['maxWidth']) ? intval($args['maxWidth']) : 0;
     $db = Database::get();
     $db->execute('DELETE from btImageSliderEntries WHERE bID = ?', array($this->bID));
     parent::save($args);
     if (isset($args['sortOrder'])) {
         $count = count($args['sortOrder']);
         $i = 0;
         while ($i < $count) {
             $linkURL = $args['linkURL'][$i];
             $internalLinkCID = $args['internalLinkCID'][$i];
             switch (intval($args['linkType'][$i])) {
                 case 1:
                     $linkURL = '';
                     break;
                 case 2:
                     $internalLinkCID = 0;
                     break;
                 default:
                     $linkURL = '';
                     $internalLinkCID = 0;
                     break;
             }
             if (isset($args['description'][$i])) {
                 $args['description'][$i] = LinkAbstractor::translateTo($args['description'][$i]);
             }
             $db->execute('INSERT INTO btImageSliderEntries (bID, fID, title, description, sortOrder, linkURL, internalLinkCID) values(?, ?, ?, ?,?,?,?)', array($this->bID, intval($args['fID'][$i]), $args['title'][$i], $args['description'][$i], $args['sortOrder'][$i], $linkURL, $internalLinkCID));
             ++$i;
         }
     }
     $this->tracker->track($this);
 }