public function delete($whichEntries)
 {
     $iii = new _hx_array($whichEntries);
     $_g = 0;
     while ($_g < $iii->length) {
         $thisEntry = $iii[$_g];
         ++$_g;
         $db = JFactory::getDbo();
         $a = $db->quoteName("#__joomlahaxe");
         $query = $db->getQuery(true);
         $query->from($a);
         $query->delete();
         $query->where("id = " . Std::string($thisEntry));
         $db->setQuery($query);
         try {
             $db->execute();
         } catch (Exception $__hx__e) {
             $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
             $e = $_ex_;
             php_Lib::hprint($e);
             die;
             return false;
         }
         unset($thisEntry, $query, $e, $db, $a);
     }
     return true;
 }
 public function display($tpl = null)
 {
     try {
         $this->i = $this->get("Items", null);
         $this->p = $this->get("Pagination", null);
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         $e = $_ex_;
         php_Lib::hprint($e);
         return false;
     }
     $this->items = $this->i;
     $this->pagination = $this->p;
     $this->addToolBar();
     parent::display($tpl);
     return null;
 }
 public function addToolBar($theItem, $theForm)
 {
     $input = JFactory::getApplication()->input;
     $input->set("hidemainmenu", true);
     $isNew = false;
     try {
         $isNew = !$theItem->id;
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         $e = $_ex_;
         php_Lib::hprint($e);
         $isNew = false;
     }
     JToolbarHelper::title($isNew ? "New item" : "Edit item", null);
     JToolbarHelper::save("joomlahaxe.save", "Save");
     JToolbarHelper::cancel("joomlahaxe.cancel", $isNew ? "Cancel" : "Close");
     return true;
 }
Example #4
0
 static function _trace($v, $i = null)
 {
     if (me_cunity_debug_Out::$suspended) {
         return;
     }
     $warned = false;
     if ($i !== null && _hx_has_field($i, "customParams")) {
         $i = $i->customParams[0];
     }
     $msg = null;
     if ($i !== null) {
         $msg = _hx_string_or_null($i->fileName) . ":" . _hx_string_or_null($i->methodName) . ":" . _hx_string_rec($i->lineNumber, "") . ":";
     } else {
         $msg = "";
     }
     $msg .= Std::string($v);
     if (me_cunity_debug_Out::$log !== null) {
         me_cunity_debug_Out::$log->writeString(_hx_string_or_null($msg) . "\n");
         me_cunity_debug_Out::$log->flush();
     } else {
         $_g = me_cunity_debug_Out::$traceTarget;
         switch ($_g->index) {
             case 2:
                 error_log($msg);
                 break;
             case 0:
                 php_Lib::hprint(_hx_string_or_null($msg) . "\r\n");
                 break;
             case 1:
                 php_Lib::hprint(_hx_string_or_null(StringTools::htmlEscape($msg, null)) . "<br/>");
                 break;
             case 3:
                 break;
         }
     }
     if (me_cunity_debug_Out::$once) {
         me_cunity_debug_Out::$once = false;
         me_cunity_debug_Out::_trace("i:" . Std::string(Type::typeof($i)), _hx_anonymous(array("fileName" => "Out.hx", "lineNumber" => 130, "className" => "me.cunity.debug.Out", "methodName" => "_trace")));
         me_cunity_debug_Out::dumpObject($i, _hx_anonymous(array("fileName" => "Out.hx", "lineNumber" => 131, "className" => "me.cunity.debug.Out", "methodName" => "_trace")));
     }
 }
 public function __construct()
 {
     if (!php_Boot::$skip_constructor) {
         $GLOBALS['%s']->push("MainAdmin::new");
         $__hx__spos = $GLOBALS['%s']->length;
         defined('_JEXEC') or die('no joomla here');
         $gc = JControllerLegacy::getInstance('Joomlahaxe');
         try {
             $gc->execute(JRequest::getCmd('task'));
         } catch (Exception $__hx__e) {
             $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
             $e = $_ex_;
             $GLOBALS['%e'] = new _hx_array(array());
             while ($GLOBALS['%s']->length >= $__hx__spos) {
                 $GLOBALS['%e']->unshift($GLOBALS['%s']->pop());
             }
             $GLOBALS['%s']->push($GLOBALS['%e'][0]);
             php_Lib::hprint($e);
         }
         $gc->redirect();
         $GLOBALS['%s']->pop();
     }
 }
 static function println($v)
 {
     php_Lib::hprint($v);
     php_Lib::hprint("\n");
 }