Exemplo n.º 1
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);
 }
Exemplo n.º 2
0
 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());
             }
         }
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 protected function deliverResponse(BlockController $controller, $action)
 {
     list($method, $parameters) = $controller->getPassThruActionAndParameters(array($action));
     if ($controller->isValidControllerTask($method, $parameters)) {
         $controller->on_start();
         $response = $controller->runAction($method, $parameters);
         if ($response instanceof \Symfony\Component\HttpFoundation\Response) {
             return $response;
         } else {
             $r = new Response($response);
             return $r;
         }
     }
     $response = new Response(t('Access Denied'));
     return $response;
 }
Exemplo n.º 6
0
 public function save($args)
 {
     $db = Loader::db();
     $args['showArrows'] = intval($args['showArrows']);
     $args['loopSequence'] = intval($args['loopSequence']);
     parent::save($args);
 }
Exemplo n.º 7
0
 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);
 }
Exemplo n.º 8
0
 public function delete()
 {
     $db = Database::connection();
     $params = array($this->bID);
     $query = "DELETE FROM btTextListEntries WHERE bID = ?";
     $db->query($query, $params);
     parent::delete();
 }
Exemplo n.º 9
0
 public function save($args)
 {
     if ($args['table_data'] == '[[null],[null]]' || $args['table_data'] == '[[null]]') {
         $args['table_data'] = '';
         $args['table_metadata'] = '';
     }
     parent::save($args);
 }
Exemplo n.º 10
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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 12
0
 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);
 }
Exemplo n.º 13
0
 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);
 }
Exemplo n.º 14
0
 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);
 }
Exemplo n.º 15
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);
 }
Exemplo n.º 16
0
 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);
 }
Exemplo n.º 17
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);
 }
Exemplo n.º 18
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;
     }
 }
Exemplo n.º 19
0
 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);
 }
Exemplo n.º 21
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)
 {
     // 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);
 }
Exemplo n.º 23
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);
 }
Exemplo n.º 24
0
 public function getPassThruActionAndParameters($method, $parameters = array())
 {
     $return = parent::getPassThruActionAndParameters($method, $parameters);
     $parameters = $return[1];
     // pop the last element off the array and get it
     $bID = array_pop($parameters);
     if ($bID == $this->bID) {
         // this is the proxy block. So we pop off the block ID and replace it with the original ID
         $parameters[] = $this->bOriginalID;
         $return[1] = $parameters;
     }
     return $return;
 }
Exemplo n.º 25
0
 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);
 }
Exemplo n.º 26
0
 public function runAction($method, $parameters = array())
 {
     if (in_array($method, array('add', 'edit'))) {
         parent::runAction($method, $parameters);
         return;
     }
     $controller = $this->getController();
     if ($controller) {
         $controller->runAction($method, $parameters);
         foreach ($controller->getSets() as $key => $value) {
             $this->set($key, $value);
         }
     }
 }
Exemplo n.º 27
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']);
     }
 }
Exemplo n.º 28
0
 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);
 }
Exemplo n.º 29
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++;
     }
 }
Exemplo n.º 30
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);
 }