Skip to content

Commit

Permalink
Minor fixed & update to ver. 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Quasiocculti committed Jun 24, 2023
1 parent a29d43b commit af95f79
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
10 changes: 6 additions & 4 deletions pagecount/inc/pagecount.functions.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<?php
/**
* @package pagecount
* @version 1.20
* @version 1.21
* @author Dmitri Beliavski
* @copyright Copyright (c) seditio.by 2017-2023
*/

defined('COT_CODE') or die('Wrong URL');

function cot_pagecount ($condition = '', $mode = '', $cats = '', $subs = true, $decl = 'pages') {
global $db, $db_pages, $Ls;

global $Ls;
require_once cot_langfile('page', 'module');
require_once cot_incfile('pagelist', 'plug');

$where_cat = cot_compilecats($mode, $cats, (bool)$subs);
$condition = (empty($condition)) ? '' : 'AND '.$condition;

$totalitems = $db->query("
$db_pages = cot::$db->pages;
$totalitems = cot::$db->query("
SELECT COUNT(*)
FROM $db_pages
WHERE page_state='0' $where_cat $condition
")->fetchColumn();

$totalitems = (empty($decl)) ? $totalitems : cot_declension($totalitems, $Ls[$decl]);

return $totalitems;
Expand Down
2 changes: 1 addition & 1 deletion pagecount/lang/pagecount.en.lang.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package pagecount
* @version 1.20
* @version 1.21
* @author Dmitri Beliavski
* @copyright Copyright (c) seditio.by 2017-2023
*/
Expand Down
2 changes: 1 addition & 1 deletion pagecount/lang/pagecount.ru.lang.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package pagecount
* @version 1.20
* @version 1.21
* @author Dmitri Beliavski
* @copyright Copyright (c) seditio.by 2017-2023
*/
Expand Down
2 changes: 1 addition & 1 deletion pagecount/pagecount.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @package pagecount
* @version 1.20
* @version 1.21
* @author Dmitri Beliavski
* @copyright Copyright (c) seditio.by 2017-2023
*/
Expand Down
7 changes: 4 additions & 3 deletions pagecount/pagecount.setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Code=pagecount
Name=[SEDBY] Page Count
Description=Displays amount of site pages accoding to specified parameters
Version=1.20
Date=2017-06-27
Version=1.21
Date=2023-06-24
Category=navigation-structure
Author=Dmitri Beliavski
Copyright=&copy; 2017-2023 seditio.by
Expand All @@ -14,6 +14,7 @@
Lock_guests=12345AW
Auth_members=R
Lock_members=12345AW
Requires_modules=page
Requires_plugins=pagelist
[END_COT_EXT]
[BEGIN_COT_EXT_CONFIG]
Expand All @@ -22,7 +23,7 @@

/**
* @package pagecount
* @version 1.20
* @version 1.21
* @author Dmitri Beliavski
* @copyright Copyright (c) seditio.by 2017-2023
*/
Expand Down

0 comments on commit af95f79

Please sign in to comment.