@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php return [ |
| 2 | - 'Alias' => [ |
|
| 3 | - 'Front' => [ |
|
| 4 | - '/' => '/content/list/news' |
|
| 5 | - ] |
|
| 6 | - ] |
|
| 2 | + 'Alias' => [ |
|
| 3 | + 'Front' => [ |
|
| 4 | + '/' => '/content/list/news' |
|
| 5 | + ] |
|
| 6 | + ] |
|
| 7 | 7 | ]; |
| 8 | 8 | \ No newline at end of file |
@@ -52,16 +52,16 @@ discard block |
||
| 52 | 52 | $this->data[$lang][] = [ |
| 53 | 53 | 'uri' => Url::standaloneUrl($uri, $lang), |
| 54 | 54 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
| 55 | - 'freq' => (string)$freq, |
|
| 56 | - 'priority' => (float)$priority |
|
| 55 | + 'freq' => (string) $freq, |
|
| 56 | + 'priority' => (float) $priority |
|
| 57 | 57 | ]; |
| 58 | 58 | } |
| 59 | 59 | } else { // only one language, multilanguage is disabled |
| 60 | 60 | $this->data[App::$Properties->get('singleLanguage')][] = [ |
| 61 | 61 | 'uri' => Url::standaloneUrl($uri), |
| 62 | 62 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
| 63 | - 'freq' => (string)$freq, |
|
| 64 | - 'priority' => (float)$priority |
|
| 63 | + 'freq' => (string) $freq, |
|
| 64 | + 'priority' => (float) $priority |
|
| 65 | 65 | ]; |
| 66 | 66 | } |
| 67 | 67 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | 'items' => $items |
| 87 | 87 | ]); |
| 88 | 88 | |
| 89 | - File::write(EntityIndexList::INDEX_PATH . '/' . $uniqueName . '.' . $lang . '.xml', $xml); |
|
| 89 | + File::write(EntityIndexList::INDEX_PATH.'/'.$uniqueName.'.'.$lang.'.xml', $xml); |
|
| 90 | 90 | } |
| 91 | 91 | return true; |
| 92 | 92 | } |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | // add user notification |
| 63 | 63 | if ($target->id !== $viewer->id) { |
| 64 | 64 | $notify = new EntityAddNotification($target->id); |
| 65 | - $notify->add('profile/show/' . $target->id . '#wall-post-' . $record->id, EntityAddNotification::MSG_ADD_WALLPOST, ['snippet' => Text::snippet($this->message, 50)]); |
|
| 65 | + $notify->add('profile/show/'.$target->id.'#wall-post-'.$record->id, EntityAddNotification::MSG_ADD_WALLPOST, ['snippet' => Text::snippet($this->message, 50)]); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | // cleanup message |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | public static function all($columns = ['*']) |
| 28 | 28 | { |
| 29 | - $cacheName = 'activerecords.role.all.' . implode('.', $columns); |
|
| 29 | + $cacheName = 'activerecords.role.all.'.implode('.', $columns); |
|
| 30 | 30 | $records = MemoryObject::instance()->get($cacheName); |
| 31 | 31 | if ($records === null) { |
| 32 | 32 | $records = parent::all($columns); |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public static function get($role_id) |
| 45 | 45 | { |
| 46 | - $role = MainApp::$Memory->get('user.role.cache.' . $role_id); |
|
| 46 | + $role = MainApp::$Memory->get('user.role.cache.'.$role_id); |
|
| 47 | 47 | |
| 48 | 48 | // not founded in cache |
| 49 | 49 | if ($role === null) { |
| 50 | 50 | $role = self::find($role_id); |
| 51 | - MainApp::$Memory->set('user.role.cache.' . $role_id, $role); |
|
| 51 | + MainApp::$Memory->set('user.role.cache.'.$role_id, $role); |
|
| 52 | 52 | } |
| 53 | 53 | return $role; |
| 54 | 54 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public static function all($columns = ['*']) |
| 30 | 30 | { |
| 31 | - $cacheName = 'activerecord.profilefield.all.' . implode('.', $columns); |
|
| 31 | + $cacheName = 'activerecord.profilefield.all.'.implode('.', $columns); |
|
| 32 | 32 | $records = MemoryObject::instance()->get($cacheName); |
| 33 | 33 | if ($records === null) { |
| 34 | 34 | $records = parent::all($columns); |
@@ -37,9 +37,9 @@ |
||
| 37 | 37 | $record->save(); |
| 38 | 38 | |
| 39 | 39 | // add user notification |
| 40 | - if ((int)$this->_post->user_id > 0 && $this->_userId !== (int)$this->_post->user_id) { |
|
| 41 | - $notify = new EntityAddNotification((int)$this->_post->user_id); |
|
| 42 | - $uri = '/feedback/read/' . $this->_post->id . '/' . $this->_post->hash . '#feedback-answer-' . $record->id; |
|
| 40 | + if ((int) $this->_post->user_id > 0 && $this->_userId !== (int) $this->_post->user_id) { |
|
| 41 | + $notify = new EntityAddNotification((int) $this->_post->user_id); |
|
| 42 | + $uri = '/feedback/read/'.$this->_post->id.'/'.$this->_post->hash.'#feedback-answer-'.$record->id; |
|
| 43 | 43 | |
| 44 | 44 | $notify->add($uri, EntityAddNotification::MSG_ADD_FEEDBACKANSWER, [ |
| 45 | 45 | 'snippet' => Text::snippet($this->message, 50), |
@@ -27,8 +27,8 @@ |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | - * Load configs from app data |
|
| 31 | - */ |
|
| 30 | + * Load configs from app data |
|
| 31 | + */ |
|
| 32 | 32 | public function before() |
| 33 | 33 | { |
| 34 | 34 | if ($this->_config === null) { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | { |
| 44 | 44 | // remove gallery files if exists |
| 45 | 45 | foreach ($this->_records->get() as $record) { |
| 46 | - $galleryPath = '/upload/gallery/' . (int)$record->id; |
|
| 46 | + $galleryPath = '/upload/gallery/'.(int) $record->id; |
|
| 47 | 47 | if (Directory::exist($galleryPath)) { |
| 48 | 48 | Directory::remove($galleryPath); |
| 49 | 49 | } |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | { |
| 71 | 71 | $password = App::$Security->password_hash($this->password); |
| 72 | 72 | |
| 73 | - $search = App::$User->where('password', '=', $password)->where(function ($query) { |
|
| 73 | + $search = App::$User->where('password', '=', $password)->where(function($query) { |
|
| 74 | 74 | $query->where('login', '=', $this->login) |
| 75 | 75 | ->orWhere('email', '=', $this->login); |
| 76 | 76 | }); |