Example #1
0
	function order($option, $pkg, $ids, $inc)
	{
		$database = JFactory::getDBO();
		$row = new facileFormsMenus($database);
		$row->load($ids[0]);
		$row->move($inc, "package='".mysql_escape_string($pkg)."' and parent=".$row->parent);
		updateComponentMenus();
		JFactory::getApplication()->redirect("index.php?option=$option&act=managemenus&pkg=$pkg");
	} // order
Example #2
0
	function emitCompmenu()
	{
		global $database;
		$database = JFactory::getDBO();
		// sanity check
		if ($this->hasErrors()) return;
		if (!array_key_exists('emitted', $this->params[1])) {
			// save new row
			$row = new facileFormsMenus($database);
			$database->setQuery("select max(ordering)+1 from #__facileforms_compmenus");
			$row->ordering    = $database->loadResult();
			$row->published   = $this->getInt(1, 'published', 1);
			$row->package     = $this->getText(1, 'package');
			$row->img         = $this->getText(1, 'img');
			$row->title       = $this->getText(1, 'title', BFText::_('COM_BREEZINGFORMS_INSTALLER_UNKNOWN'));
			$row->name        = $this->getText(1, 'name');
			$row->page        = $this->getInt(1, 'page', 1);
			$row->frame       = $this->getInt(1, 'frame');
			$row->border      = $this->getInt(1, 'border');
			$row->params      = $this->getText(1, 'params');
			if (!$row->store()) {
				$this->setError($row->getError(), true);
				return;
			} // if
			$this->menus[] = $row->id;
			if ($row->published) $this->pubmenus++;
			// final tasks
			$this->params[1]['menu_id']     = $row->id;
			$this->params[1]['submenu_ord'] = 0;
			$this->params[1]['emitted']     = true;
		} // if
	} // emitCompmenu
 static function order($option, $pkg, $ids, $inc)
 {
     $database = JFactory::getDBO();
     JArrayHelper::toInteger($ids);
     $row = new facileFormsMenus($database);
     $row->load($ids[0]);
     $row->move($inc, "package=" . $database->Quote($pkg) . " and parent=" . $row->parent);
     updateComponentMenus();
     JFactory::getApplication()->redirect("index.php?option={$option}&act=managemenus&pkg={$pkg}");
 }