@@ -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 {
0 commit comments