@@ -39,7 +39,7 @@ |
||
39 | 39 | $options['pos'] = $resizePos; |
40 | 40 | $path = Cache::file($absolutePath, $options); |
41 | 41 | $path = $convet ? mb_convert_encoding($path, 'UTF-8', 'Windows-1251') : $path; |
42 | - return '/' . $path; |
|
42 | + return '/'.$path; |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | $classPath = implode('/', array_slice($classPath, 1)); |
50 | 50 | if (App::$cur) { |
51 | 51 | if (App::$cur !== App::$primary) { |
52 | - $folders['appModule'] = ['folder' => App::$primary->path . '/modules/' . $moduleName, 'classPath' => $classPath]; |
|
52 | + $folders['appModule'] = ['folder' => App::$primary->path.'/modules/'.$moduleName, 'classPath' => $classPath]; |
|
53 | 53 | } |
54 | - $folders['primaryAppModule'] = ['folder' => App::$cur->path . '/modules/' . $moduleName, 'classPath' => $classPath]; |
|
54 | + $folders['primaryAppModule'] = ['folder' => App::$cur->path.'/modules/'.$moduleName, 'classPath' => $classPath]; |
|
55 | 55 | } |
56 | - $folders['systemModule'] = ['folder' => INJI_SYSTEM_DIR . '/modules/' . $moduleName, 'classPath' => $classPath]; |
|
56 | + $folders['systemModule'] = ['folder' => INJI_SYSTEM_DIR.'/modules/'.$moduleName, 'classPath' => $classPath]; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | $classPath = str_replace('\\', '/', $className); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | if (file_exists($path)) { |
74 | 74 | include_once $path; |
75 | 75 | if (in_array('Model', class_parents($className, false)) && \App::$primary) { |
76 | - $filename = Cache::getDir('system') . '/classData.php'; |
|
76 | + $filename = Cache::getDir('system').'/classData.php'; |
|
77 | 77 | $classData = Config::custom($filename); |
78 | 78 | if (empty($classData['Model'][$className]['tableCreated'])) { |
79 | 79 | $classData['Model'][$className]['tableCreated'] = $className::createTable(); |
@@ -98,18 +98,18 @@ discard block |
||
98 | 98 | { |
99 | 99 | $paths = []; |
100 | 100 | if (strpos($classPath, '/') === false) { |
101 | - $paths[$code . '_Object'] = $folder . '/objects/' . $classPath . '.php'; |
|
102 | - $paths[$code . '_ObjectDir'] = $folder . '/objects/' . $classPath . '/' . $classPath . '.php'; |
|
103 | - $paths[$code . '_Model'] = $folder . '/models/' . $classPath . '.php'; |
|
104 | - $paths[$code . '_ModelDir'] = $folder . '/models/' . $classPath . '/' . $classPath . '.php'; |
|
101 | + $paths[$code.'_Object'] = $folder.'/objects/'.$classPath.'.php'; |
|
102 | + $paths[$code.'_ObjectDir'] = $folder.'/objects/'.$classPath.'/'.$classPath.'.php'; |
|
103 | + $paths[$code.'_Model'] = $folder.'/models/'.$classPath.'.php'; |
|
104 | + $paths[$code.'_ModelDir'] = $folder.'/models/'.$classPath.'/'.$classPath.'.php'; |
|
105 | 105 | } else { |
106 | 106 | $classFile = substr($classPath, strrpos($classPath, '/') + 1); |
107 | 107 | $classPathWithotClass = substr($classPath, 0, strrpos($classPath, '/')); |
108 | 108 | |
109 | - $paths[$code . '_Object'] = $folder . '/objects/' . $classPathWithotClass . '/' . $classFile . '.php'; |
|
110 | - $paths[$code . '_ObjectDir'] = $folder . '/objects/' . $classPath . '/' . $classFile . '.php'; |
|
111 | - $paths[$code . '_Model'] = $folder . '/models/' . $classPathWithotClass . '/' . $classFile . '.php'; |
|
112 | - $paths[$code . '_ModelDir'] = $folder . '/models/' . $classPath . '/' . $classFile . '.php'; |
|
109 | + $paths[$code.'_Object'] = $folder.'/objects/'.$classPathWithotClass.'/'.$classFile.'.php'; |
|
110 | + $paths[$code.'_ObjectDir'] = $folder.'/objects/'.$classPath.'/'.$classFile.'.php'; |
|
111 | + $paths[$code.'_Model'] = $folder.'/models/'.$classPathWithotClass.'/'.$classFile.'.php'; |
|
112 | + $paths[$code.'_ModelDir'] = $folder.'/models/'.$classPath.'/'.$classFile.'.php'; |
|
113 | 113 | } |
114 | 114 | return $paths; |
115 | 115 | } |
@@ -64,17 +64,17 @@ |
||
64 | 64 | */ |
65 | 65 | public function run() |
66 | 66 | { |
67 | - if (!empty($this->params[0]) && method_exists($this, $this->params[0] . 'Action')) { |
|
67 | + if (!empty($this->params[0]) && method_exists($this, $this->params[0].'Action')) { |
|
68 | 68 | $this->method = $this->params[0]; |
69 | 69 | $this->params = array_slice($this->params, 1); |
70 | - } elseif (!method_exists($this, $this->method . 'Action')) { |
|
70 | + } elseif (!method_exists($this, $this->method.'Action')) { |
|
71 | 71 | INJI_SYSTEM_ERROR('method not found', true); |
72 | 72 | } |
73 | 73 | if (!$this->checkAccess()) { |
74 | 74 | Tools::redirect($this->access->getDeniedRedirect(), 'У вас нет прав доступа'); |
75 | 75 | } |
76 | 76 | $this->run = true; |
77 | - call_user_func_array([$this, $this->method . 'Action'], $this->params); |
|
77 | + call_user_func_array([$this, $this->method.'Action'], $this->params); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | } |
65 | 65 | return false; |
66 | 66 | } |
67 | - $val = @self::$server->get($name . serialize($params)); |
|
67 | + $val = @self::$server->get($name.serialize($params)); |
|
68 | 68 | if ($val !== false) { |
69 | 69 | return $val; |
70 | 70 | } else { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | self::connect(); |
93 | 93 | } |
94 | 94 | if (self::$connected) { |
95 | - return @self::$server->set($name . serialize($params), $val, false, $lifeTime); |
|
95 | + return @self::$server->set($name.serialize($params), $val, false, $lifeTime); |
|
96 | 96 | } |
97 | 97 | return false; |
98 | 98 | } |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | $crop = !empty($options['crop']) ? $options['crop'] : ''; |
113 | 113 | $pos = !empty($options['pos']) ? $options['pos'] : 'center'; |
114 | 114 | $fileinfo = pathinfo($file); |
115 | - $fileCheckSum = md5($fileinfo['dirname'] . filemtime($file)); |
|
116 | - $path = static::getDir('static') . '/' . $fileCheckSum . '_' . $fileinfo['filename']; |
|
115 | + $fileCheckSum = md5($fileinfo['dirname'].filemtime($file)); |
|
116 | + $path = static::getDir('static').'/'.$fileCheckSum.'_'.$fileinfo['filename']; |
|
117 | 117 | if ($sizes) { |
118 | - $path .= '.' . $sizes['x'] . 'x' . $sizes['y'] . $crop . $pos; |
|
118 | + $path .= '.'.$sizes['x'].'x'.$sizes['y'].$crop.$pos; |
|
119 | 119 | } |
120 | - $path .= '.' . $fileinfo['extension']; |
|
120 | + $path .= '.'.$fileinfo['extension']; |
|
121 | 121 | if (!file_exists($path)) { |
122 | 122 | copy($file, $path); |
123 | 123 | if ($sizes) { |
@@ -71,8 +71,8 @@ |
||
71 | 71 | { |
72 | 72 | $paths = Module::getModulePaths($moduleName); |
73 | 73 | foreach ($paths as $path) { |
74 | - if (file_exists($path . '/' . $moduleName . '.php')) { |
|
75 | - include_once $path . '/' . $moduleName . '.php'; |
|
74 | + if (file_exists($path.'/'.$moduleName.'.php')) { |
|
75 | + include_once $path.'/'.$moduleName.'.php'; |
|
76 | 76 | return $moduleName; |
77 | 77 | } |
78 | 78 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | if ($type == 'array') { |
19 | 19 | return !is_array($_GET[$key]) ? [] : $_GET[$key]; |
20 | 20 | } |
21 | - return eval('return (' . $type . ') $_GET[$key];'); |
|
21 | + return eval('return ('.$type.') $_GET[$key];'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $month = array('января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'); |
39 | 39 | $yearPosrfix = isset($options['yearPostfix']) ? $options['yearPostfix'] : " г."; |
40 | - return ($dd > 0 ? $dd . " " : '') . $month[$mm - 1] . " " . $yy . $yearPosrfix . (empty($options['notime']) ? " " . $hours : ''); |
|
40 | + return ($dd > 0 ? $dd." " : '').$month[$mm - 1]." ".$yy.$yearPosrfix.(empty($options['notime']) ? " ".$hours : ''); |
|
41 | 41 | case 'select': |
42 | 42 | switch ($colInfo['colParams']['source']) { |
43 | 43 | case 'model': |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | case 'image': |
65 | 65 | $file = Files\File::get($this->model->{$this->valueKey}); |
66 | 66 | if ($file) { |
67 | - return '<img src="' . $file->path . '?resize=60x120" />'; |
|
67 | + return '<img src="'.$file->path.'?resize=60x120" />'; |
|
68 | 68 | } else { |
69 | 69 | return '<img src="/static/system/images/no-image.png?resize=60x120" />'; |
70 | 70 | } |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | { |
21 | 21 | if (!$model) { |
22 | 22 | $modulePath = Module::getModulePath($this->module->moduleName); |
23 | - $path = $modulePath . '/models'; |
|
23 | + $path = $modulePath.'/models'; |
|
24 | 24 | if (file_exists($path)) { |
25 | 25 | $files = array_slice(scandir($path), 2); |
26 | 26 | foreach ($files as $file) { |
27 | - if (is_dir($path . '/' . $file)) { |
|
27 | + if (is_dir($path.'/'.$file)) { |
|
28 | 28 | continue; |
29 | 29 | } |
30 | 30 | $model = pathinfo($file, PATHINFO_FILENAME); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | } |
33 | 33 | } |
34 | 34 | } |
35 | - $fullModelName = $this->module->moduleName . '\\' . ucfirst($model); |
|
35 | + $fullModelName = $this->module->moduleName.'\\'.ucfirst($model); |
|
36 | 36 | $dataManager = new Ui\DataManager($fullModelName, $dataManager); |
37 | 37 | $title = !empty($dataManager->managerOptions['name']) ? $dataManager->managerOptions['name'] : $fullModelName::objectName(); |
38 | 38 | $this->view->setTitle($title); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | public function viewAction($model, $pk) |
43 | 43 | { |
44 | - $fullModelName = $this->module->moduleName . '\\' . ucfirst($model); |
|
44 | + $fullModelName = $this->module->moduleName.'\\'.ucfirst($model); |
|
45 | 45 | $item = $fullModelName::get($pk); |
46 | 46 | $this->view->setTitle($item->name()); |
47 | 47 | if (!empty($_POST['comment'])) { |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | // time start |
17 | 17 | define('INJI_TIME_START', microtime(true)); |
18 | 18 | // system files dir |
19 | -define('INJI_SYSTEM_DIR', __DIR__ . '/system'); |
|
19 | +define('INJI_SYSTEM_DIR', __DIR__.'/system'); |
|
20 | 20 | // apps files dir |
21 | -define('INJI_PROGRAM_DIR', __DIR__ . '/program'); |
|
21 | +define('INJI_PROGRAM_DIR', __DIR__.'/program'); |
|
22 | 22 | |
23 | 23 | // check base config |
24 | 24 | if (!file_exists(INJI_SYSTEM_DIR) || !is_dir(INJI_SYSTEM_DIR)) { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | -require_once( INJI_SYSTEM_DIR . '/init.php' ); |
|
38 | +require_once(INJI_SYSTEM_DIR.'/init.php'); |
|
39 | 39 | /** |
40 | 40 | * System error messages |
41 | 41 | */ |