Skip to content

Commit d747a63

Browse files
authored
Merge pull request #18 from oxwall/develop
Release 1.9.0
2 parents f385728 + 8bbb0a1 commit d747a63

5 files changed

Lines changed: 15 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Version 1.9.0(11000)
2+
- php 8 support
3+
- remove auto id generation on form elements

bol/service/post_service.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
*/
3737
class PostService
3838
{
39+
const PLUGIN_KEY = 'blogs';
40+
3941
const FEED_ENTITY_TYPE = 'blog-post';
4042
const PRIVACY_ACTION_VIEW_BLOG_POSTS = 'blogs_view_blog_posts';
4143
const PRIVACY_ACTION_COMMENT_BLOG_POSTS = 'blogs_comment_blog_posts';
@@ -314,4 +316,4 @@ public function getPostUrl($post)
314316
{
315317
return OW::getRouter()->urlForRoute('post', array('id'=>$post->getId()));
316318
}
317-
}
319+
}

controllers/blog.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function index($params)
111111

112112
$this->assign('isBrowseByTagCase', $isBrowseByTagCase);
113113

114-
$tagSearch = new BASE_CMP_TagSearch(OW::getRouter()->urlForRoute('blogs.list', array('list'=>'browse-by-tag')));
114+
$tagSearch = new BASE_CMP_TagSearch(OW::getRouter()->urlForRoute('blogs.list', array('list'=>'browse-by-tag')), PostService::PLUGIN_KEY);
115115

116116
$this->addComponent('tagSearch', $tagSearch);
117117

@@ -498,4 +498,4 @@ private function getToolbar( $idList, $list, $ulist, $nlist )
498498

499499
return $toolbars;
500500
}
501-
}
501+
}

controllers/save.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,15 @@ class SaveForm extends Form
184184

185185
public function __construct( Post $post, $tags = array() )
186186
{
187-
parent::__construct('save');
187+
parent::__construct('save', PostService::PLUGIN_KEY);
188188

189189
$this->service = PostService::getInstance();
190190

191191
$this->post = $post;
192192

193193
$this->setMethod('post');
194194

195-
$titleTextField = new TextField('title');
195+
$titleTextField = new TextField('title', PostService::PLUGIN_KEY);
196196

197197
$this->addElement($titleTextField->setLabel(OW::getLanguage()->text('blogs', 'save_form_lbl_title'))->setValue($post->getTitle())->setRequired(true));
198198

@@ -210,14 +210,14 @@ public function __construct( Post $post, $tags = array() )
210210
BOL_TextFormatService::WS_BTN_VIDEO
211211
);
212212

213-
$postTextArea = new WysiwygTextarea('post', $buttons);
213+
$postTextArea = new WysiwygTextarea('post', PostService::PLUGIN_KEY ,$buttons);
214214
$postTextArea->setSize(WysiwygTextarea::SIZE_L);
215215
$postTextArea->setLabel(OW::getLanguage()->text('blogs', 'save_form_lbl_post'));
216216
$postTextArea->setValue($post->getPost());
217217
$postTextArea->setRequired(true);
218218
$this->addElement($postTextArea);
219219

220-
$draftSubmit = new Submit('draft');
220+
$draftSubmit = new Submit('draft', PostService::PLUGIN_KEY);
221221
$draftSubmit->addAttribute('onclick', "$('#save_post_command').attr('value', 'draft');");
222222

223223
if ( $post->getId() != null && !$post->isDraft() )
@@ -240,7 +240,7 @@ public function __construct( Post $post, $tags = array() )
240240
$text = OW::getLanguage()->text('blogs', 'save_publish');
241241
}
242242

243-
$publishSubmit = new Submit('publish');
243+
$publishSubmit = new Submit('publish', PostService::PLUGIN_KEY);
244244
$publishSubmit->addAttribute('onclick', "$('#save_post_command').attr('value', 'publish');");
245245

246246
$this->addElement($publishSubmit->setValue($text));
@@ -259,7 +259,7 @@ public function __construct( Post $post, $tags = array() )
259259
}
260260
}
261261

262-
$tf = new TagsInputField('tf');
262+
$tf = new TagsInputField('tf', PostService::PLUGIN_KEY);
263263
$tf->setLabel(OW::getLanguage()->text('blogs', 'tags_field_label'));
264264
$tf->setValue($tags);
265265

0 commit comments

Comments
 (0)