Index: branches/5.3.x/install.php =================================================================== diff -u -N -r15490 -r15898 --- branches/5.3.x/install.php (.../install.php) (revision 15490) +++ branches/5.3.x/install.php (.../install.php) (revision 15898) @@ -1,6 +1,6 @@ toolkit; - /* @var $toolkit kInstallToolkit */ - } - $application =& kApplication::Instance(); - $application->Init(); + $toolkit = new kInstallToolkit(); +} +else { + // install, using installation wizard + $toolkit =& $this->toolkit; + /* @var $toolkit kInstallToolkit */ +} - if ($application->RecallVar('user_id') != USER_ROOT) { - die('restricted access!'); - } +$application =& kApplication::Instance(); +$application->Init(); - $category =& $toolkit->createModuleCategory('Forums', 'Discussion Forums', '#in-bulletin/section_design#', 'in-bulletin/img/menu_topics.gif'); +if ( $application->RecallVar('user_id') != USER_ROOT ) { + die('restricted access!'); +} - $toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); - $toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{TopicCatId}', $category->GetID()); - $toolkit->ImportLanguage('/' . $module_folder . '/install/english'); +$category =& $toolkit->createModuleCategory('Forums', 'Discussion Forums', '#in-bulletin/section_design#', 'in-bulletin/img/menu_topics.gif'); - $toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID()); +$toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); +$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{TopicCatId}', $category->GetID()); +$toolkit->ImportLanguage('/' . $module_folder . '/install/english'); -// $toolkit->linkCustomFields(basename($module_folder), 'bb', 3); // to create Custom Fields for Topics - $toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field - $toolkit->setModuleItemTemplate($category, 'bb', '#in-bulletin/item_design#'); +$toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID()); - $toolkit->finalizeModuleInstall($module_folder, true); \ No newline at end of file +//$toolkit->linkCustomFields(basename($module_folder), 'bb', 3); // to create Custom Fields for Topics +$toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field +$toolkit->setModuleItemTemplate($category, 'bb', '#in-bulletin/item_design#'); + +$toolkit->finalizeModuleInstall($module_folder, true); Index: branches/5.3.x/install/english.lang =================================================================== diff -u -N -r15490 -r15898 --- branches/5.3.x/install/english.lang (.../english.lang) (revision 15490) +++ branches/5.3.x/install/english.lang (.../english.lang) (revision 15898) @@ -1,5 +1,9 @@ - - + + + + + JGJvZHkNCjxici8+PGJyLz4NCg0KU2luY2VyZWx5LDxici8+PGJyLz4NCg0KV2Vic2l0ZSBhZG1pbmlzdHJhdGlvbi4NCg0KPCEtLSMjIDxpbnAyOmVtYWlsLWxvZ19JdGVtTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9lbWFpbCIvPiAjIy0tPg== + VXNlcg== TGFzdCBQb3N0IE9u Index: branches/5.3.x/install/install_data.sql =================================================================== diff -u -N -r15670 -r15898 --- branches/5.3.x/install/install_data.sql (.../install_data.sql) (revision 15670) +++ branches/5.3.x/install/install_data.sql (.../install_data.sql) (revision 15898) @@ -226,4 +226,4 @@ INSERT INTO CustomFields VALUES (DEFAULT, 1, 'bb_ItemTemplate', 'la_fld_cust_bb_ItemTemplate', 0, 'la_title_SystemCF', 'la_fld_cust_bb_ItemTemplate', 'text', NULL, '', 0, 0, 1, 0); -INSERT INTO Modules VALUES ('In-Bulletin', 'modules/in-bulletin/', 'bb', DEFAULT, 1, 3, 'in-bulletin/', {TopicCatId}, NULL, NULL); +INSERT INTO Modules VALUES ('In-Bulletin', 'modules/in-bulletin/', 'Intechnic\\InPortal\\Modules\\InBulletin', 'bb', DEFAULT, 1, 3, 'in-bulletin/', {TopicCatId}, NULL, NULL); Index: branches/5.3.x/install/upgrades.php =================================================================== diff -u -N -r15694 -r15898 --- branches/5.3.x/install/upgrades.php (.../upgrades.php) (revision 15694) +++ branches/5.3.x/install/upgrades.php (.../upgrades.php) (revision 15898) @@ -1,6 +1,6 @@ Array ('Core' => '5.2.0-RC1'), '5.2.0' => Array ('Core' => '5.2.0'), '5.2.1-B1' => Array ('Core' => '5.2.1-B1'), + '5.2.1-B2' => Array ('Core' => '5.2.1-B2'), + '5.2.1-RC1' => Array ('Core' => '5.2.1-RC1'), ); } Index: branches/5.3.x/install/upgrades.sql =================================================================== diff -u -N -r15670 -r15898 --- branches/5.3.x/install/upgrades.sql (.../upgrades.sql) (revision 15670) +++ branches/5.3.x/install/upgrades.sql (.../upgrades.sql) (revision 15898) @@ -266,3 +266,10 @@ INSERT INTO Permissions VALUES(DEFAULT, 'in-bulletin:configuration_output.add', 11, 1, 1, 0); # ===== v 5.2.1-B1 ===== + +# ===== v 5.2.1-B2 ===== +UPDATE Modules +SET ClassNamespace = 'Intechnic\\InPortal\\Modules\\InBulletin' +WHERE `Name` = 'In-Bulletin'; + +# ===== v 5.2.1-RC1 ===== Index: branches/5.3.x/units/poll_comments/poll_comment_eh.php =================================================================== diff -u -N -r15694 -r15898 --- branches/5.3.x/units/poll_comments/poll_comment_eh.php (.../poll_comment_eh.php) (revision 15694) +++ branches/5.3.x/units/poll_comments/poll_comment_eh.php (.../poll_comment_eh.php) (revision 15898) @@ -1,6 +1,6 @@ Array ('self' => true, 'subitem' => true,), + 'OnCreateAjax' => Array ('self' => true, 'subitem' => true,), 'OnItemBuild' => Array ('self' => true, 'subitem' => true,), ); @@ -103,7 +103,7 @@ if ( $spam_helper->InSpamControl() ) { $event->status = kEvent::erFAIL; - $object->SetError('CommentText', 'too_frequent', 'lu_error_AlreadyCommented'); + $object->SetError('CommentBody', 'too_frequent', 'lu_error_AlreadyCommented'); return ; } @@ -132,11 +132,26 @@ if ( !$this->Application->isAdmin && $event->status == kEvent::erSUCCESS ) { $event->setRedirectParam('opener', 's'); $event->setRedirectParam('pass', 'm,poll'); - $event->redirect = $this->Application->GetVar('success_template'); } } /** + * Wrapper for OnCreate event + * + * @param kEvent $event + * + * @return void + * @access protected + */ + protected function OnCreateAjax(kEvent $event) + { + $ajax_form_helper = $this->Application->recallObject('AjaxFormHelper'); + /* @var $ajax_form_helper AjaxFormHelper */ + + $ajax_form_helper->transitEvent($event, 'OnCreate'); + } + + /** * Protects against spam * * @param kEvent $event Index: branches/5.3.x/units/topics/topics_config.php =================================================================== diff -u -N -r15670 -r15898 --- branches/5.3.x/units/topics/topics_config.php (.../topics_config.php) (revision 15670) +++ branches/5.3.x/units/topics/topics_config.php (.../topics_config.php) (revision 15898) @@ -1,6 +1,6 @@ ' SELECT %1$s.* %2$s FROM %1$s LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId + {PERM_JOIN} LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1 - LEFT JOIN '.TABLE_PREFIX.'CategoryPermissionsCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId LEFT JOIN '.TABLE_PREFIX.'Users u ON %1$s.OwnerId = u.PortalUserId LEFT JOIN '.TABLE_PREFIX.'%3$sPosting last_post ON last_post.PostingId = %1$s.LastPostId LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId',