Jump to content
Sign in to follow this  
kavi

Крашится сайт при обновлении модификаторов

Recommended Posts

Немогу сказать с чего это началось. После нажатия на кнопку Обновить получаю белую страницу с ошибкой

 

Parse error: syntax error, unexpected ';' in /home/mysite/www/vqmod/vqcache/vq2-system_modification_system_engine_action.php on line 84

Содержание vq2-system_modification_system_engine_action.php

<?php
final class Action {
    private $file;
    private $class;
    private $method;
    private $args = array();

    public function __construct($route, $args = array()) {
        $path = '';

        // Break apart the route
        $parts = explode('/', str_replace('../', '', (string)$route));

        foreach ($parts as $part) {
            $path .= $part;

            if (is_dir(DIR_APPLICATION . 'controller/' . $path)) {
                $path .= '/';

                array_shift($parts);

                continue;
            }

            $file = DIR_APPLICATION . 'controller/' . str_replace(array('../', '..\\', '..'), '', $path) . '.php';

            if (is_file($file)) {
                $this->file = $file;

                $this->class = 'Controller' . preg_replace('/[^a-zA-Z0-9]/', '', $path);

                array_shift($parts);

                break;
            }
        }

        if ($args) {
            $this->args = $args;
        }

        $method = array_shift($parts);

                 
                /* = */
                if($method){
                $act_to_clean = array('copy', 'delete');
                if (in_array($method , $act_to_clean) OR ($method == 'edit' AND count($_POST)) OR ($method == 'add' AND count($_POST))) {
                include_once DIR_CONFIG .'ssb_library/ssb_data.php';
                $ssb_data = ssb_data::getInstance();
                $ssb_data->clearCache();
                }
                if ($method == 'update' AND !count($_POST)) {
                include_once DIR_CONFIG .'ssb_library/ssb_data.php';
                $ssb_data = ssb_data::getInstance();
                $ssb_setting = $ssb_data->getSetting();
                if(!$ssb_setting){
                include_once DIR_CONFIG .'ssb_library/ssb_table.php';
                $ssb_table = ssb_table::getInstance();
                $ssb_table->changeTables($ssb_data->getDBchange());
                $default_data = $ssb_data->getDefault();
                $ssb_data->setSetting($default_data);
                }
                }
                }    
                /* = */
                
            

        if ($method) {
            $this->method = $method;
        } else {
            $this->method = 'index';
        }
    }

    public function execute($registry) {
        // Stop any magical methods being called
        if (substr($this->method, 0, 2) == '__') {
            return false;
        }

        if (is_file($this->file)) {
            include_once(VQMod::modCheck(modification(modification($this->file), modification($this->file)));

            $class = $this->class;

            $controller = new $class($registry);

            if (is_callable(array($controller, $this->method))) {
                return call_user_func(array($controller, $this->method), $this->args);
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
}

 

Edited by kavi

Share this post


Link to post
Share on other sites

Заменил файлы, в которых возникала ошибка из более раннего архива - ошибка исчезла.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.