Commit 55a550a8 authored by Vasily Bezruchkin's avatar Vasily Bezruchkin 💬
Browse files

Prepared for release.

parent 7532caee
<ul>
<li>Version: 4.1.11
<ul>
<li>Bug #4: Recheck tree</li>
<li>Bug #8:Article URL has smarty in it.</li>
<li>Bug #9: Cannot Edit Category when editing article</li>
<li>Bug #10: Article Source Link Config option does not work</li>
<li>Bug #11: Sub Categories in Parents issue</li>
<li>Bug #12: Article Cat - Field Display on blank</li>
<li>Bug #13: 'Child' column of the Root category is not updated when categories removed</li>
<li>Bug #14: Pagination Issue on Article Categories</li>
<li>Bug #15: Adapt categories to new abstract structure</li>
<li>Feature #5: Improve filters</li>
</ul>
</li>
<li>Version: 4.1.0
<ul>
<li>Bug #2193: Max length of title field</li>
......
......@@ -66,7 +66,7 @@ class iaArticle extends abstractPublishingModuleAdmin
$sql = <<<SQL
SELECT a.`id`, a.`title_alias`, c.`title_alias` `category_alias`
FROM `:table_articles` a
FROM `:table_articles` a
LEFT JOIN `:table_categories` c ON (c.`id` = a.`category_id`)
WHERE a.`status` = ':status'
SQL;
......@@ -91,7 +91,7 @@ SQL;
{
$sql = <<<SQL
SELECT :columns, c.`title_:lang` `category_title`, c.`title_alias` `category_alias`, m.`fullname` `member`
FROM `:prefix:table_articles` a
FROM `:prefix:table_articles` a
LEFT JOIN `:prefix:table_categories` c ON (a.`category_id` = c.`id`)
LEFT JOIN `:prefix:table_members` m ON (a.`member_id` = m.`id`)
WHERE :where :order
......
......@@ -111,7 +111,6 @@ class iaArticle extends abstractPublishingModuleFront
* Returns listings for Favorites page
*
* @param $ids
* @param $fields
*
* @return mixed
*/
......@@ -296,7 +295,7 @@ class iaArticle extends abstractPublishingModuleFront
/**
* Returns incomplete article
*
* @param integer $aAuthorId account id
* @param integer $authorId account id
* @param string $sessionId session id
*
* @return array
......
......@@ -54,9 +54,10 @@ class iaArticlecat extends iaAbstractFrontHelperCategoryFlat implements iaPublis
* Returns article categories
*
* @param string $where additional WHERE clause
* @param integer $start[optional] starting position
* @param integer $limit[optional] number of categories to return
* @param integer $parentId[optional] parent category id
* @param integer $start [optional] starting position
* @param integer $limit [optional] number of categories to return
* @param integer $parentId [optional] parent category id
* @param bool $sorting
*
* @return array
*/
......
......@@ -85,7 +85,8 @@ if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
case 'publishing_home':
// get current category
$category = $iaArticlecat->getOne("`title_alias` = '" . (count($iaCore->requestPath) > 0 ? iaSanitize::sql(implode('/', $iaCore->requestPath)) . '/' : '') . "'");
$category = $iaArticlecat->getOne("`title_alias` = '" . (count($iaCore->requestPath) > 0 ? iaSanitize::sql(implode('/',
$iaCore->requestPath)) . '/' : '') . "'");
if (empty($category)) {
return iaView::errorPage(iaView::ERROR_NOT_FOUND);
......@@ -102,13 +103,15 @@ if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
$rssFeed = 'latest';
}
$categories = $iaArticlecat->get(($iaCore->get('art_view_category', true) ? '' : " AND `num_all_articles` > 0"), 0, 0, $category['id']);
$categories = $iaArticlecat->get(($iaCore->get('art_view_category',
true) ? '' : " AND `num_all_articles` > 0"), 0, 0, $category['id']);
$order = " ORDER BY t1." . $order;
$where .= $iaCore->get('articles_show_children')
? sprintf(" AND t1.`category_id` IN (SELECT `category_id` FROM `%s` WHERE `parent_id` = %d) ", $iaArticlecat->getTableFlat(true), $category['id'])
: " AND t1.`category_id` = ({$category['id']}) " ;
? sprintf(" AND t1.`category_id` IN (SELECT `category_id` FROM `%s` WHERE `parent_id` = %d) ",
$iaArticlecat->getTableFlat(true), $category['id'])
: " AND t1.`category_id` = ({$category['id']}) ";
$articles = $iaArticle->get($where . $order, $start, $pagination['limit']);
......@@ -128,7 +131,8 @@ if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
return iaView::accessDenied();
}
$articles = $iaArticle->get('AND t1.`member_id` = ' . iaUsers::getIdentity()->id . ' ORDER BY t1.' . $order, $start, $pagination['limit'], true);
$articles = $iaArticle->get('AND t1.`member_id` = ' . iaUsers::getIdentity()->id . ' ORDER BY t1.' . $order,
$start, $pagination['limit'], true);
$pagination['total'] = $iaDb->foundRows();
......@@ -211,7 +215,8 @@ if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
if ($day > 0 && $day <= 31) {
$stmt .= ' AND DAY(t1.`date_added`) = ' . $day;
iaBreadcrumb::add(iaLanguage::get('month' . $month), IA_MODULE_URL . $baseUrl . $year . IA_URL_DELIMITER . $month . IA_URL_DELIMITER);
iaBreadcrumb::add(iaLanguage::get('month' . $month),
IA_MODULE_URL . $baseUrl . $year . IA_URL_DELIMITER . $month . IA_URL_DELIMITER);
iaBreadcrumb::replaceEnd($day, IA_SELF);
}
} else {
......@@ -225,7 +230,11 @@ if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
$pagination['total'] = $iaDb->foundRows();
$caption = iaLanguage::getf('articles_by_date', ['year' => $year, 'month' => iaLanguage::get('month' . $month), 'day' => is_numeric($day) ? $day : '']);
$caption = iaLanguage::getf('articles_by_date', [
'year' => $year,
'month' => iaLanguage::get('month' . $month),
'day' => is_numeric($day) ? $day : ''
]);
$iaView->caption($caption);
$iaView->assign('curr_year', $year);
......@@ -238,7 +247,8 @@ if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
$iaView->assign('pagination', $pagination);
} elseif ('publishing_home' == $iaView->name()) {
if (isset($category['parent_id']) && $category['parent_id'] != 0 && isset($category['level']) && $category['level'] > 0) {
$iaView->setMessages(iaLanguage::getf('no_articles2', ['url' => IA_MODULE_URL . 'add/?category=' . $category['id']]), iaView::ALERT);
$iaView->setMessages(iaLanguage::getf('no_articles2',
['url' => IA_MODULE_URL . 'add/?category=' . $category['id']]), iaView::ALERT);
}
} elseif (!('date_articles' == $iaView->name() && !isset($iaCore->requestPath[1]))) {
$iaView->setMessages(iaLanguage::get('no_articles'), iaView::ALERT);
......@@ -278,7 +288,9 @@ if (iaView::REQUEST_XML == $iaView->getRequestType()) {
$limit = (int)$iaCore->get('art_perpage', 10);
if (isset($iaCore->requestPath[0]) && $iaCore->requestPath[0] == 'author' && isset($iaCore->requestPath[1])) {
if ($memberInfo = $iaDb->row_bind(['fullname', 'id'], '`username` = :user AND `status` = :status', ['user' => $iaCore->requestPath[1], 'status' => iaCore::STATUS_ACTIVE], iaUsers::getTable())) {
if ($memberInfo = $iaDb->row_bind(['fullname', 'id'], '`username` = :user AND `status` = :status',
['user' => $iaCore->requestPath[1], 'status' => iaCore::STATUS_ACTIVE], iaUsers::getTable())
) {
$stmt = 'AND t1.`member_id` = ' . $memberInfo['id'] . $stmt;
$category = iaLanguage::get('author') . ': ' . $memberInfo['fullname'];
......@@ -289,7 +301,8 @@ if (iaView::REQUEST_XML == $iaView->getRequestType()) {
} elseif (isset($iaCore->requestPath[0]) && $iaCore->requestPath[0] == 'latest') {
$articles = $iaArticle->get('AND 1 ORDER BY t1.`date_added` DESC', 0, $limit);
} else {
$stmt = "AND t2.`title_alias` = '" . (implode(IA_URL_DELIMITER, $iaCore->requestPath) . IA_URL_DELIMITER) . "'" . $stmt;
$stmt = "AND t2.`title_alias` = '" . (implode(IA_URL_DELIMITER,
$iaCore->requestPath) . IA_URL_DELIMITER) . "'" . $stmt;
$articles = $iaArticle->get($stmt, 0, $limit);
}
......
......@@ -4,9 +4,9 @@
<summary>This package is intended to publish articles on your Subrion CMS powered website</summary>
<author>Intelliants LLC</author>
<contributor>Intelliants LLC</contributor>
<version>4.1.0</version>
<date>2016-03-24</date>
<compatibility>4.1.2</compatibility>
<version>4.1.1</version>
<date>2016-04-14</date>
<compatibility>4.1.3</compatibility>
<url>articles</url>
<screenshots>
......@@ -236,7 +236,7 @@
<phrase category="admin" key="are_you_sure_to_delete_selected_articlecats">Are you sure you wish to delete these article categories? All subcategories will be deleted as well.</phrase>
<phrase category="admin" key="are_you_sure_to_delete_selected_article">Are you sure you wish to delete this article?</phrase>
<phrase category="admin" key="are_you_sure_to_delete_selected_articles">Are you sure you wish to delete these articles?</phrase>
<phrase category="admin" key="categories_repaired">Categories repaired.</phrase>
<phrase category="admin" key="categories_repaired">Categories repaired.</phrase>
<phrase category="admin" key="dashboard_articles_list">Articles</phrase>
<phrase category="admin" key="dashboard_articles_add">Add article</phrase>
<phrase category="admin" key="edit_category">Edit Category</phrase>
......@@ -334,16 +334,15 @@
<hook name="populateCommonStatisticsBlock" page_type="front">
<![CDATA[
$condition = iaDb::printf("`status` = ':status'", array('status' => iaCore::STATUS_ACTIVE));
$statistics['publishing'] = array(
array(
$statistics['publishing'] = [
[
'title' => iaLanguage::get('articles'),
'value' => number_format((int)$iaDb->one(iaDb::STMT_COUNT_ROWS, $condition, 'articles'))
),
array(
], [
'title' => iaLanguage::get('categories'),
'value' => number_format((int)$iaDb->one(iaDb::STMT_COUNT_ROWS, $condition . ' AND `parent_id` != 0', 'articles_categories'))
)
);
]
];
]]>
</hook>
<hook name="smartyFrontAfterHeadSection" page_type="front" type="smarty">
......@@ -354,14 +353,14 @@ $statistics['publishing'] = array(
]]>
</hook>
<hook name="adminDatabaseConsistency" type="smarty" page_type="admin" filename="hook.db-consistency"><![CDATA[]]></hook>
<hook name="phpAdminDatabaseConsistencyType" page_type="admin" pages="database">
<![CDATA[
<hook name="phpAdminDatabaseConsistencyType" page_type="admin" pages="database">
<![CDATA[
if ('repair_article_categories' == $type) {
$iaCore->factoryModule('articlecat', 'publishing', iaCore::ADMIN)->rebuild();
$iaView->setMessages(iaLanguage::get('categories_repaired'), iaView::SUCCESS);
}
]]>
</hook>
</hook>
</hooks>
<install>
......@@ -419,11 +418,11 @@ ALTER TABLE `{prefix}articles` ADD FULLTEXT (`title_{lang}`, `body_{lang}`);
ALTER TABLE `{prefix}members` ADD `articles_url` tinytext NOT NULL, ADD `articles_url_description` text NOT NULL;
]]>
</sql>
<code>
<![CDATA[
<code>
<![CDATA[
$iaCore->factoryModule('articlecat', 'publishing', iaCore::ADMIN)->setupDbStructure();
]]>
</code>
]]>
</code>
</install>
<uninstall>
......
{if isset($publishingFiltersCategories)}
<div class="form-group">
<label>{lang key='keywords'}</label>
<input type="text" name="keywords" placeholder="{lang key='keywords'}" class="form-control"{if isset($filters.params.keywords)} value="{$filters.params.keywords|escape:'html'}"{/if}>
<input type="text" name="keywords" placeholder="{lang key='keywords'}" class="form-control"{if isset($filters.params.keywords)} value="{$filters.params.keywords|escape}"{/if}>
</div>
<div class="form-group">
<label>{lang key='category'}</label>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment