Skip to content

Commit c86d58c

Browse files
committed
Renamed class ChecklistItem to ChecklistLine along with related functions
1 parent 069c3f9 commit c86d58c

24 files changed

Lines changed: 495 additions & 499 deletions

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ module.exports = function(grunt) {
300300
'rsc/js/src/evo_init_widget_coll_search_form.js',
301301
'rsc/js/src/evo_init_autocomplete_login.js',
302302
'rsc/js/src/evo_init_widget_poll.js',
303-
'rsc/js/src/evo_init_widget_item_checklist_items.js',
303+
'rsc/js/src/evo_init_widget_item_checklist_lines.js',
304304
'rsc/js/src/evo_init_plugin_auto_anchors.js',
305305
'rsc/js/src/evo_init_plugin_custom_tags.js',
306306
'rsc/js/src/evo_init_plugin_table_contents.js',

conf/_application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Release date (ISO)
2222
* @global string
2323
*/
24-
$app_date = '2020-06-18';
24+
$app_date = '2020-06-19';
2525

2626
/**
2727
* Is this b2evolution PRO?

inc/collections/_collections.init.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -296,21 +296,21 @@ function & get_ItemTagCache()
296296
}
297297

298298
/**
299-
* Get the ChecklistItemCache
299+
* Get the ChecklistLineCache
300300
*
301-
* @return ChecklistItemCache
301+
* @return ChecklistLineCache
302302
*/
303-
function & get_ChecklistItemCache()
303+
function & get_ChecklistLineCache()
304304
{
305-
global $ChecklistItemCache;
305+
global $ChecklistLineCache;
306306

307-
if( ! isset( $ChecklistItemCache ) )
307+
if( ! isset( $ChecklistLineCache ) )
308308
{ // Cache doesn't exist yet:
309-
load_class( 'items/model/_checklistitem.class.php', 'ChecklistItem' );
310-
$ChecklistItemCache = new DataObjectCache( 'ChecklistItem', false, 'T_items__checklist_lines', 'check_', 'check_ID', 'check_label' );
309+
load_class( 'items/model/_checklistline.class.php', 'ChecklistLine' );
310+
$ChecklistLineCache = new DataObjectCache( 'ChecklistLine', false, 'T_items__checklist_lines', 'check_', 'check_ID', 'check_label' );
311311
}
312312

313-
return $ChecklistItemCache;
313+
return $ChecklistLineCache;
314314
}
315315

316316
/**
@@ -1679,12 +1679,12 @@ function handle_htsrv_action()
16791679
exit(0);
16801680
}
16811681

1682-
case 'checklist_item':
1682+
case 'checklist_line':
16831683
global $DB;
16841684

1685-
load_class('items/model/_checklistitem.class.php', 'ChecklistItem' );
1685+
load_class('items/model/_checklistline.class.php', 'ChecklistLine' );
16861686

1687-
// Add/Update checklist item:
1687+
// Add/Update checklist line:
16881688
$item_action = param( 'item_action', 'string', 'add' );
16891689
$item_ID = param( 'item_ID', 'integer', true );
16901690
$checklist_ID = param( 'check_ID', 'integer', NULL );
@@ -1701,60 +1701,60 @@ function handle_htsrv_action()
17011701

17021702
if( empty( $checklist_ID ) )
17031703
{
1704-
$checklistItem = new ChecklistItem();
1705-
$checklistItem->set_Item( $edited_Item );
1706-
$checklistItem->set( 'label', $checklist_label );
1707-
$checklistItem->dbsave();
1704+
$checklistLine = new ChecklistLine();
1705+
$checklistLine->set_Item( $edited_Item );
1706+
$checklistLine->set( 'label', $checklist_label );
1707+
$checklistLine->dbsave();
17081708
$status = 'add';
17091709
}
17101710
else
17111711
{
1712-
$ChecklistItemCache = & get_ChecklistItemCache();
1713-
$checklistItem = & $ChecklistItemCache->get_by_ID( $checklist_ID );
1714-
if( $checklist_label != $checklistItem->label )
1712+
$ChecklistLineCache = & get_ChecklistLineCache();
1713+
$checklistLine = & $ChecklistLineCache->get_by_ID( $checklist_ID );
1714+
if( $checklist_label != $checklistLine->label )
17151715
{
1716-
$checklistItem->set( 'label', $checklist_label );
1716+
$checklistLine->set( 'label', $checklist_label );
17171717
}
1718-
$checklistItem->dbsave();
1718+
$checklistLine->dbsave();
17191719
$status = 'update';
17201720
}
17211721

17221722
$response = array(
17231723
'status' => $status,
1724-
'check_ID' => $checklistItem->ID,
1725-
'check_label' => $checklistItem->label,
1724+
'check_ID' => $checklistLine->ID,
1725+
'check_label' => $checklistLine->label,
17261726
);
17271727
}
17281728
elseif( $item_action == 'toggle_check' )
17291729
{
17301730
$checklist_checked = param( 'check_checked', 'boolean', NULL );
17311731

1732-
$ChecklistItemCache = & get_ChecklistItemCache();
1733-
$checklistItem = & $ChecklistItemCache->get_by_ID( $checklist_ID );
1732+
$ChecklistLineCache = & get_ChecklistLineCache();
1733+
$checklistLine = & $ChecklistLineCache->get_by_ID( $checklist_ID );
17341734
if( isset( $checklist_checked ) )
17351735
{
1736-
$checklistItem->set( 'checked', $checklist_checked ? 1 : 0 );
1736+
$checklistLine->set( 'checked', $checklist_checked ? 1 : 0 );
17371737
}
1738-
$checklistItem->dbsave();
1738+
$checklistLine->dbsave();
17391739
$status = 'toggle_check';
17401740

17411741
$response = array(
17421742
'status' => $status,
1743-
'check_ID' => $checklistItem->ID,
1744-
'check_checked' => $checklistItem->checked,
1743+
'check_ID' => $checklistLine->ID,
1744+
'check_checked' => $checklistLine->checked,
17451745
);
17461746
}
17471747
elseif( $item_action == 'delete' )
17481748
{
1749-
$ChecklistItemCache = & get_ChecklistItemCache();
1750-
$checklistItem = & $ChecklistItemCache->get_by_ID( $checklist_ID );
1749+
$ChecklistLineCache = & get_ChecklistLineCache();
1750+
$checklistLine = & $ChecklistLineCache->get_by_ID( $checklist_ID );
17511751

17521752
$response = array(
17531753
'status' => 'delete',
17541754
'check_ID' => $checklist_ID,
17551755
);
17561756

1757-
$checklistItem->dbdelete();
1757+
$checklistLine->dbdelete();
17581758
}
17591759
elseif( $item_action == 'reorder' )
17601760
{
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* This file implements the ChecklistItem class.
3+
* This file implements the ChecklistLine class.
44
*
55
* This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
66
* See also {@link https://github.com/b2evolution/b2evolution}.
@@ -23,16 +23,17 @@
2323
*
2424
* @package evocore
2525
*/
26-
class ChecklistItem extends DataObject
26+
class ChecklistLine extends DataObject
2727
{
2828
/**
2929
* The item (parent) of this Comment (lazy-filled).
30-
* @see ChecklistItem::get_Item()
31-
* @see ChecklistItem::set_Item()
30+
* @see ChecklistLine::get_Item()
31+
* @see ChecklistLine::set_Item()
3232
* @access protected
3333
* @var Item
3434
*/
3535
var $Item;
36+
3637
/**
3738
* The ID of the comment's Item.
3839
* @var integer
@@ -121,5 +122,4 @@ function dbinsert()
121122
return $r;
122123
}
123124
}
124-
125125
?>

inc/items/model/_itemlight.class.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ class ItemLight extends DataObject
121121
var $tags = NULL;
122122

123123
/**
124-
* Array of checklist items
124+
* Array of checklist lines
125125
*
126126
* Lazy loaded.
127-
* @see ItemLight::get_checklist_items()
127+
* @see ItemLight::get_checklist_lines()
128128
* @var array
129129
*/
130-
var $checklist_items = NULL;
130+
var $checklist_lines = NULL;
131131

132132
/**
133133
* Array of dbchanges flag to be able to check modifications, and execute update queries only when required
@@ -1908,26 +1908,26 @@ function & get_tags()
19081908

19091909

19101910
/**
1911-
* Get array of checklist items.
1911+
* Get array of checklist lines.
19121912
*
19131913
* @return array
19141914
*/
1915-
function get_checklist_items()
1915+
function get_checklist_lines()
19161916
{
19171917
global $DB;
19181918

1919-
if( ! isset( $this->checklist_items ) )
1919+
if( ! isset( $this->checklist_lines ) )
19201920
{
1921-
// Build query to get the checklist items:
1922-
$checklist_SQL = new SQL( 'Get checklist items for Item #'.$this->ID );
1923-
$checklist_SQL->SELECT( 'check_ID, check_item_ID, check_checked, check_label' );
1921+
// Build query to get the checklist lines:
1922+
$checklist_SQL = new SQL( 'Get checklist lines for Item #'.$this->ID );
1923+
$checklist_SQL->SELECT( 'check_ID, check_item_ID, check_checked, check_label, check_order' );
19241924
$checklist_SQL->FROM( 'T_items__checklist_lines' );
19251925
$checklist_SQL->WHERE( 'check_item_ID = '.$DB->quote( $this->ID ) );
19261926
$checklist_SQL->ORDER_BY( 'check_order ASC, check_ID ASC' );
1927-
$this->checklist_items = $DB->get_results( $checklist_SQL );
1927+
$this->checklist_lines = $DB->get_results( $checklist_SQL );
19281928
}
19291929

1930-
return $this->checklist_items;
1930+
return $this->checklist_lines;
19311931
}
19321932

19331933

inc/widgets/_widgets.funcs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function get_default_widgets( $coll_type = '', $context = array() )
160160
/* Sidebar Single */
161161
$default_widgets['sidebar_single'] = array(
162162
array( 1, 15000, 'item_workflow', 'coll_type' => 'forum,group,manual' ),
163-
array( 3, 16100, 'item_checklist_items', 'coll_type' => 'group' ),
163+
array( 3, 16100, 'item_checklist_lines', 'coll_type' => 'group' ),
164164
array( 5, 15000, 'coll_related_post_list', 'coll_type' => 'forum' ),
165165
array( 10, 15000, 'item_vote', 'coll_type' => 'manual' ),
166166
array( 20, 15000, 'item_tags', 'coll_type' => 'manual' ),

inc/widgets/views/_widget_list_available.view.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
'item_vote', // Voting
152152
'item_seen_by', // Seen by
153153
'item_workflow', // Workflow Properties
154-
'item_checklist_items', // Checklist Items
154+
'item_checklist_lines', // Checklist Lines
155155
'item_comment_form', // Comment Form
156156
'item_comment_feed_link', // Comment Feed Link
157157
'item_comment_notification', // Comment Notification

0 commit comments

Comments
 (0)