Undefined variable: where
/mnt/devel/Atrium/atriumstudio/vendor/onionCMS/Modules/Projects/Controllers/AdminProjectsCategoryController.php
http://www.atriumarchitekti.loc/admin/project-category/create (POST)
Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0
184 }185 }186187 $out = array();188 $out['flash'] = $this->app->getFlash('next', true);189190 $this->view = $out;191 }192193194 public function save($formData, $return = false)195 {196 if (empty($formData['id']) === false) {197 $where = array();198 $where[] = array('projects_categories_contents.language', 1);199 $where[] = array('projects_categories.id', $formData['id']);200 }201202 try {203 $projectsCategoryModel = $this->services->getFactory('projectsCategoryModel')->create($where);204205 } catch (\Onion\Database\ModelException $e) {206 $this->returnToManage($e->getMessage(), 'error');207 }208209 $projectsCategoryModel['show'] = $formData['show'];210 $projectsCategoryModel['order'] = $formData['order'];211212 foreach ($formData['language'] as $languageId => $languageData) {213 $projectsCategoryModel['language'] = $languageId;
184 }185 }186187 $out = array();188 $out['flash'] = $this->app->getFlash('next', true);189190 $this->view = $out;191 }192193194 public function save($formData, $return = false)195 {196 if (empty($formData['id']) === false) {197 $where = array();198 $where[] = array('projects_categories_contents.language', 1);199 $where[] = array('projects_categories.id', $formData['id']);200 }201202 try {203 $projectsCategoryModel = $this->services->getFactory('projectsCategoryModel')->create($where);204205 } catch (\Onion\Database\ModelException $e) {206 $this->returnToManage($e->getMessage(), 'error');207 }208209 $projectsCategoryModel['show'] = $formData['show'];210 $projectsCategoryModel['order'] = $formData['order'];211212 foreach ($formData['language'] as $languageId => $languageData) {213 $projectsCategoryModel['language'] = $languageId;
array ( 0 => 8, 1 => 'Undefined variable: where', 2 => '/mnt/devel/Atrium/atriumstudio/vendor/onionCMS/Modules/Projects/Controllers/AdminProjectsCategoryController.php', 3 => 203, 4 => array ( 'formData' => array ( 'id' => '', 'tab' => 'english', 'show' => 'false', 'order' => 'abc', 'language' => array ( 1 => array ( 'name' => 'abc', 'description' => '', ), 2 => array ( 'name' => 'abc', 'description' => '', ), ), ), 'return' => 'false', ), )
372 }373374 $this->submitter = $button;375376 $arguments = array($this->getValues());377 if (count($button['on_click']) === 4) {378 $args = (array) array_pop($button['on_click']);379 $arguments = array_merge($arguments, $args);380 }381382 $onValidForm = true;383 if (count($button['on_click']) === 3) {384 $onValidForm = array_pop($button['on_click']);385 }386387 if (($this->isValid === true388 AND $onValidForm === true)389 OR $onValidForm === false) {390391 call_user_func_array($button['on_click'], $arguments);392 }393 }394 }395396 /**397 * Metóda na uloženie aktuálneho prvku do poľa s prvkami formulára398 * a vytvorenie nového prázdneho aktuálneho prvku399 *400 * @return void401 */
array ( 0 => array ( 0 => 'object (onionCMS\\Modules\\Projects\\Controllers\\AdminProjectsCategoryController)', 1 => 'save', ), 1 => array ( 0 => array ( 'id' => '', 'tab' => 'english', 'show' => 'false', 'order' => 'abc', 'language' => array ( 1 => array ( 'name' => 'abc', 'description' => '', ), 2 => array ( 'name' => 'abc', 'description' => '', ), ), ), ), )
744 }745 }746747 if (\Onion\Utils\Validators::isEmpty($element['value']) === true748 AND $required === false749 AND $ruleName !== 'callback') {750751 $element['error'] = null;752 $validElement = true;753 }754755 if ($validElement === false) {756 $valid = false;757 }758 }759760 $this->isValid = $valid;761762 if ($this->isSubmitted() === true) {763 $this->onSubmit();764 }765766 return $valid;767 }768769 /**770 * Metóda na overenie hodnoty položky pomocou vlastnej funkcie771 *772 * @param array metóda na overenie773 * @param mixed hodnota na overenie
array ( )
512 if (count($keys) === 1) {513 $values[$element['name']] = $element['value'];514515 } else {516 $v = &$values;517 foreach ($keys as $key) {518 $v = &$v[$key];519 }520521 $v = $element['value'];522 }523 }524525 unset($values['token']);526 return $values;527 }528529 public function open($echo = true)530 {531 $this->validate();532533 $anchor = '';534 if ($this->anchor !== null) {535 $anchor = '#'.$this->anchor;536 }537538 $out = '<form action="'.$this->action.$anchor.'" method="'.$this->method.'"';539540 if (empty($this->class) === false) {541 $class = implode(' ', (array) $this->class);
array ( )
932 $js .= '},'."\n";933 }934935 $js = trim($js, ",\n")."\n";936 $js .= '],'."\n";937 }938939 $js = trim($js, ",\n");940 $js .= '}'."\n";941 $js .= '});'."\n";942 $js .= '});'."\n";943944 return $js;945 }946947 public function getArrayCopy()948 {949 $array = array();950951 $array['open'] = $this->open(false);952 $array['close'] = $this->close(false);953 $array['buttons'] = $this->buttons;954955 $elements = array();956 $fieldsets = array();957 $hidden = array();958959 foreach ($this->elements as $element) {960 $attributes = array();961 if (isset($element['attributes']) === true) {
array ( 0 => 'false', )
149 'on_click' => array($this, 'save'),150 'class' => $saveClass151 ));152153 $form->addButton(array(154 'name' => 'saveClose',155 'value' => 'Uložiť a koniec',156 'type' => 'submit',157 'on_click' => array($this, 'saveClose')158 ));159160 $form->addButton(array(161 'name' => 'close',162 'value' => 'Koniec',163 'type' => 'submit',164 'on_click' => array($this, 'close', false)165 ));166167 $this->view['title'] = 'Kategória :: ' . $projectsCategoryModel['name'];168 $this->view['form'] = $form->getArrayCopy();169 $this->services->onionCMS->assets->js($this->view['form']['js']);170171 if ($this->app->request->isAjax() === false) {172 foreach ($this->view['form']['errors'] as $error) {173 $this->app->addFlash($error, 'error', 'current');174 }175176 return;177 }178
array ( )
27 $grid->addColumn('order', 'Poradie');28 $grid->addColumn('show', 'Zobrazovať', array('select', $show), array($this->services->filters, 'bool'));2930 $grid->addAction('<i class="icon icon-pencil"></i>', 'adminEditProjectsCategory', 'Upraviť');31 $grid->addAction('<i class="icon icon-trash"></i>', 'adminDeleteProjectsCategory', 'Zmazať');3233 $grid->addMultiaction('<i class="icon icon-trash"></i> Zmazať', array($this, 'deleteMulti'));3435 $this->view['title'] = 'Kategórie projektov';36 $this->view['grid'] = $grid->getArrayCopy();3738 $this->view['new_item_text'] = 'Pridať kategóriu';39 $url = $this->app->router->createUrl('adminCreateProjectsCategory');40 $this->view['new_item_url'] = $url;41 }424344 public function create()45 {46 $this->edit(null);47 }484950 public function edit($projectsCategoryId)51 {52 $this->view->setTemplate(ONIONCMS_DIR.'/Core/Templates/Edit.html');5354 $where = array();5556 if ($projectsCategoryId !== null) {
array ( 0 => 'NULL', )
151152 if ($this->actionName === null) {153 $this->actionName = $this->currentRoute->action;154 }155 preg_match('/([A-Za-z0-9]+)Controller/', $this->controllerName, $match);156 if (isset($match[1]) === true) {157 $view->setTemplate(APP_DIR.'/Templates/'.$match[1].'.html');158 }159160 $this->controller = new $this->controllerName($this->container);161162 $parameters = $this->currentRoute->getResource();163164 $this->runHooks('system.hooks.afterCreateController');165166 call_user_func_array(array($this->controller, 'before'), $parameters);167168 $this->runHooks('system.hooks.beforeControllerRun');169170 call_user_func_array(array($this->controller, $this->actionName), $parameters);171172 $this->runHooks('system.hooks.afterControllerRun');173174 call_user_func_array(array($this->controller, 'after'), $parameters);175176 if (is_object($this->controller->view) === true) {177 $view['flash'] = $this->flash['current'];178179 $this->runHooks('system.hooks.beforeRenderView');180
array ( 0 => array ( 0 => 'object (onionCMS\\Modules\\Projects\\Controllers\\AdminProjectsCategoryController)', 1 => 'create', ), 1 => array ( ), )
132 WWW_DIR.'/js/vendor/cookie.js',133 WWW_DIR.'/js/vendor/scroll-top.js',134 ),135 'less' => array(136 )137 ),138 'after' => array(139 'js' => array(140 WWW_DIR.'/js/main.js',141 ),142 'less' => array(143 WWW_DIR.'/less/main.less'144 )145 )146 )147 );148149 $app = new \Onion\Application($configuration);150151 $app->run();152 exit;
array ( )
13 // absolute filesystem path to the libraries14 define('LIBS_DIR', realpath(WWW_DIR.'/../vendor'));1516 // absolute filesystem path to the web root17 define('ONION_DIR', LIBS_DIR.'/Onion');1819 // absolute filesystem path to the application root20 define('APP_DIR', WWW_DIR.'/../app');2122 // absolute filesystem path to the temporary files23 define('TEMP_DIR', realpath(WWW_DIR.'/../temp'));2425 // absolute filesystem path to the cache26 define('CACHE_DIR', realpath(WWW_DIR.'/../cache'));2728 define('ONIONCMS_DIR', realpath(ONION_DIR.'/../onionCMS'));2930 // load bootstrap file31 if ($_SERVER["SERVER_ADDR"] === "127.0.0.1") {32 require ONIONCMS_DIR.'/bootstrap.dev.php';33 } else {34 require ONIONCMS_DIR.'/bootstrap.php';35 }
array ( 0 => '/mnt/devel/Atrium/atriumstudio/vendor/onionCMS/bootstrap.dev.php', )
array ( 'REDIRECT_STATUS' => '200', 'HTTP_HOST' => 'www.atriumarchitekti.loc', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0', 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_LANGUAGE' => 'sk,cs;q=0.8,en-US;q=0.5,en;q=0.3', 'HTTP_ACCEPT_ENCODING' => 'gzip, deflate', 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', 'CONTENT_LENGTH' => '198', 'HTTP_ORIGIN' => 'http://www.atriumarchitekti.loc', 'HTTP_CONNECTION' => 'keep-alive', 'HTTP_REFERER' => 'http://www.atriumarchitekti.loc/admin/project-category/create', 'HTTP_COOKIE' => 'language=sk; cookieconsent_dismissed=yes; ws56trt87dfgxzaq=a1lWMHRZTnY0WGxCb1BRSDh6R2IwUnI1VFFzS3Z6SnFnendZYmgxRTI4Y3hOUlVVYjBwZXA3VUI0cWZGbkNRM1lOQkhCTmF3MC9OTy9JbTM0L2dYRzk4akJzRU9hNi96Z25sUzhLOVNGaVgyOHlOTCtLeEY4YTd1OHVQWEtrUFp1bzFOaEdqZEkwSW9nc2hTejVsMkE4YWZCRTlMMHdhVUY0ajFoajFCQk9RWnd2a2xxMDJaek5WUnhNcS9qN0QwSkI1TW5zL0hnRGRiU2lYUXYreWF5TGJSVXRSa3VTMWk4aExtMWc2YTVaNk1RUllRRTdraEZOVW4wQ3Exc1lwaVYvOXRHK2tteGJnPTMzNTk1ZmNj; qazfdrtygdfxsw=olaiin58tj630tkgkhgku1r3mp', 'HTTP_UPGRADE_INSECURE_REQUESTS' => '1', 'HTTP_PRIORITY' => 'u=1', 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'SERVER_SIGNATURE' => '<address>Apache/2.4.38 (Debian) Server at www.atriumarchitekti.loc Port 80</address> ', 'SERVER_SOFTWARE' => 'Apache/2.4.38 (Debian)', 'SERVER_NAME' => 'www.atriumarchitekti.loc', 'SERVER_ADDR' => '127.0.0.1', 'SERVER_PORT' => '80', 'REMOTE_ADDR' => '127.0.0.1', 'DOCUMENT_ROOT' => '/mnt/devel/Atrium/atriumstudio/www_root', 'REQUEST_SCHEME' => 'http', 'CONTEXT_PREFIX' => '', 'CONTEXT_DOCUMENT_ROOT' => '/mnt/devel/Atrium/atriumstudio/www_root', 'SERVER_ADMIN' => 'webmaster@localhost', 'SCRIPT_FILENAME' => '/mnt/devel/Atrium/atriumstudio/www_root/index.php', 'REMOTE_PORT' => '59668', 'REDIRECT_URL' => '/admin/project-category/create', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'POST', 'QUERY_STRING' => '', 'REQUEST_URI' => '/admin/project-category/create', 'SCRIPT_NAME' => '/index.php', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1717742860.486, 'REQUEST_TIME' => 1717742860, )
array ( 'order' => 'abc', 'language' => array ( 1 => array ( 'name' => 'abc', 'description' => '', ), 2 => array ( 'name' => 'abc', 'description' => '', ), ), 'token' => '022d923986d0dcd657682cf9aeac67bf', 'id' => '', 'tab' => 'english', 'save' => '', )
array ( )