Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezbug.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: ezbug.php 6739 2001-08-29 10:37:23Z jhe $
5 //
6 // Definition of eZBug class
7 //
8 // Created on: <27-Nov-2000 19:43:24 bf>
9 //
10 // This source file is part of Exponential Basic, publishing software.
11 //
12 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
13 //
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
27 //
28
31
69 // include_once( "classes/ezdb.php" );
70 // include_once( "ezmail/classes/ezmail.php" );
71
72 // include_once( "ezuser/classes/ezuser.php" );
73
74 // include_once( "ezbug/classes/ezbugpriority.php" );
75 // include_once( "ezbug/classes/ezbugstatus.php" );
76 // include_once( "ezimagecatalogue/classes/ezimage.php" );
77 // include_once( "ezfilemanager/classes/ezvirtualfile.php" );
78
79 class eZBug
80 {
87 function __construct( $id=-1)
88 {
89 $this->IsHandled = 0;
90 $this->IsClosed = 0;
91 $this->IsPrivate = 0;
92 $this->PriorityID = 0;
93 $this->StatusID = 0;
94 $this->OwnerID = 0;
95 $this->UserID = 0;
96 $this->ID = 0;
97
98 if ( $id != -1 )
99 {
100 $this->ID = $id;
101 $this->get( $this->ID );
102 }
103 }
104
108 function store()
109 {
110 $db =& eZDB::globalDatabase();
111
112 $name = $db->escapeString( $this->Name );
113 $description = $db->escapeString( $this->Description );
114 $useremail = $db->escapeString( $this->UserEmail );
115 $version = $db->escapeString( $this->Version );
116
117 $db->begin();
118
119 $timeStamp = (new eZDateTime())->timeStamp( true );
120
121 if ( !isset( $this->ID ) || $this->ID == 0 || $this->ID == null)
122 {
123 $db->lock( "eZBug_Bug" );
124 $this->ID = $db->nextID( "eZBug_Bug", "ID" );
125
126 $res = $db->query( "INSERT INTO eZBug_Bug
127 (ID,
128 Name,
129 Description,
130 IsHandled,
131 IsClosed,
132 PriorityID,
133 StatusID,
134 UserEmail,
135 Created,
136 UserID,
137 OwnerID,
138 Version,
139 IsPrivate)
140 VALUES
141 ('$this->ID',
142 '$name',
143 '$description',
144 '$this->IsHandled',
145 '$this->IsClosed',
146 '$this->PriorityID',
147 '$this->StatusID',
148 '$useremail',
149 '$timeStamp',
150 '$this->UserID',
151 '$this->OwnerID',
152 '$version',
153 '$this->IsPrivate')" );
154 $db->unlock();
155
156 }
157 else
158 {
159 $res = $db->query( "UPDATE eZBug_Bug SET
160 Name='$name',
161 Description='$description',
162 IsHandled='$this->IsHandled',
163 IsClosed='$this->IsClosed',
164 PriorityID='$this->PriorityID',
165 StatusID='$this->StatusID',
166 UserEmail='$useremail',
167 UserID='$this->UserID',
168 OwnerID='$this->OwnerID',
169 Version='$version',
170 IsPrivate='$this->IsPrivate'
171 WHERE ID='$this->ID'" );
172 }
173
174 if ( $res == false )
175 $db->rollback();
176 else
177 $db->commit();
178
179 return true;
180 }
181
185 function delete()
186 {
187 $db =& eZDB::globalDatabase();
188
189 if ( isset( $this->ID ) )
190 {
191 $db->begin();
192 $res[] = $db->query( "DELETE FROM eZBug_BugModuleLink WHERE BugID='$this->ID'" );
193 $res[] = $db->query( "DELETE FROM eZBug_BugCategoryLink WHERE BugID='$this->ID'" );
194 $res[] = $db->query( "DELETE FROM eZBug_Log WHERE BugID='$this->ID'" );
195 $res[] = $db->query( "DELETE FROM eZBug_Bug WHERE ID='$this->ID'" );
196 }
197 eZDB::finish( $res, $db );
198 return true;
199 }
200
204 function get( $id=-1 )
205 {
206 $db =& eZDB::globalDatabase();
207
208 if ( $id != "" )
209 {
210 $db->array_query( $module_array, "SELECT * FROM eZBug_Bug WHERE ID='$id'" );
211 if ( count( $module_array ) > 1 )
212 {
213 die( "Error: Bugs with the same ID was found in the database. This shouldent happen." );
214 }
215 else if ( count( $module_array ) == 1 )
216 {
217 $this->ID =& $module_array[0][$db->fieldName( "ID" )];
218 $this->Name =& $module_array[0][$db->fieldName( "Name" )];
219 $this->Description =& $module_array[0][$db->fieldName( "Description" )];
220 $this->UserID =& $module_array[0][$db->fieldName( "UserID" )];
221 $this->UserEmail =& $module_array[0][$db->fieldName( "UserEmail" )];
222 $this->Created =& $module_array[0][$db->fieldName( "Created" )];
223 $this->IsHandled =& $module_array[0][$db->fieldName( "IsHandled" )];
224 $this->IsClosed =& $module_array[0][$db->fieldName( "IsClosed" )];
225 $this->PriorityID =& $module_array[0][$db->fieldName( "PriorityID" )];
226 $this->StatusID =& $module_array[0][$db->fieldName( "StatusID" )];
227 $this->OwnerID =& $module_array[0][$db->fieldName( "OwnerID" )];
228 $this->IsPrivate =& $module_array[0][$db->fieldName( "IsPrivate" )];
229 $this->Version =& $module_array[0][$db->fieldName( "Version" )];
230 }
231 }
232 }
233
239 function getAll()
240 {
241 $db =& eZDB::globalDatabase();
242 $return_array = array();
243 $module_array = array();
244
245 $db->array_query( $module_array, "SELECT ID FROM eZBug_Bug ORDER BY Name" );
246
247 for ( $i = 0; $i < count( $module_array ); $i++ )
248 {
249 $return_array[$i] = new eZBug( $module_array[$i][$db->fieldName( "ID" )], 0 );
250 }
251
252 return $return_array;
253 }
254
260 function &getUnhandled()
261 {
262 $db =& eZDB::globalDatabase();
263
264 $return_array = array();
265 $module_array = array();
266
267 $db->array_query( $module_array, "SELECT ID FROM eZBug_Bug
268 WHERE IsHandled=0
269 ORDER BY Created" );
270
271 for ( $i = 0; $i < count( $module_array ); $i++ )
272 {
273 $return_array[$i] = new eZBug( $module_array[$i][$db->fieldName( "ID" )], 0 );
274 }
275
276 return $return_array;
277 }
278
279
283 function id()
284 {
285 return $this->ID;
286 }
287
291 function name( $html = true )
292 {
293 if ( $html )
294 return htmlspecialchars( $this->Name );
295 else
296 return $this->Name;
297 }
298
302 function userEmail( $html = true )
303 {
304 if ( $html )
305 return htmlspecialchars( $this->UserEmail );
306 else
307 return $this->UserEmail;
308
309 }
310
314 function description( $html = true )
315 {
316 if ( $html )
317 return htmlspecialchars( $this->Description );
318 else
319 return $this->Description;
320 }
321
327 function &created()
328 {
329 $dateTime = new eZDateTime();
330 $dateTime->setTimeStamp( $this->Created );
331
332 return $dateTime;
333 }
334
335
339 function isHandled()
340 {
341 $ret = false;
342 if ( $this->IsHandled == 1 )
343 {
344 $ret = true;
345 }
346 return $ret;
347 }
348
352 function isClosed()
353 {
354 $ret = false;
355 if ( $this->IsClosed == 1 )
356 {
357 $ret = true;
358 }
359 return $ret;
360 }
361
366 function isPrivate()
367 {
368 $ret = false;
369 if ( $this->IsPrivate == 1 )
370 {
371 $ret = true;
372 }
373 return $ret;
374 }
375
381 function user()
382 {
383 $ret = false;
384 $user = new eZUser();
385
386 if ( $user->get( $this->UserID ) )
387 $ret = $user;
388
389 return $ret;
390 }
391
397 function owner()
398 {
399 $ret = false;
400 $user = new eZUser();
401
402 if ( $user->get( $this->OwnerID ) )
403 $ret = $user;
404
405 return $ret;
406 }
407
411 function setName( $value )
412 {
413 $this->Name = $value;
414 }
415
421 function setUserEmail( $mail )
422 {
423 $ret = false;
424
425 if ( eZMail::validate( $mail ) )
426 {
427 $this->UserEmail = $mail;
428 $ret = true;
429 }
430 return $ret;
431 }
432
436 function setDescription( $value )
437 {
438 $this->Description = $value;
439 }
440
444 function setIsHandled( $value )
445 {
446 if ( $value == true )
447 {
448 $this->IsHandled = 1;
449 }
450 else
451 {
452 $this->IsHandled = 0;
453 }
454 }
455
459 function setIsCLosed( $value )
460 {
461 if ( $value == true )
462 {
463 $this->IsClosed = 1;
464 }
465 else
466 {
467 $this->IsClosed = 0;
468 }
469 }
470
474 function setUser( $user )
475 {
476 if ( is_a( $user, "eZUser" ) )
477 {
478 $this->UserID = $user->id();
479 }
480 }
481
485 function setPriority( $pri )
486 {
487 if ( is_a( $pri, "eZBugPriority" ) )
488 {
489 $this->PriorityID = $pri->id();
490 }
491 }
492
496 function setStatus( $status )
497 {
498 if ( is_a( $status, "eZBugStatus" ) )
499 {
500 $this->StatusID = $status->id();
501 }
502 }
503
508 function setOwner( $user )
509 {
510 if ( is_a( $user, "eZUser" ) )
511 {
512 $this->OwnerID = $user->id();
513 }
514 else
515 {
516 $this->OwnerID = 0;
517 }
518 }
519
524 function setIsPrivate( $priv )
525 {
526 if ( $priv )
527 {
528 $this->IsPrivate = 1;
529 }
530 else
531 {
532 $this->IsPrivate = 0;
533 }
534 }
535
539 function setVersion( $value )
540 {
541 $this->Version = $value;
542 }
543
547 function version( $asHTML = true )
548 {
549 if ( $asHTML )
550 return htmlspecialchars( $this->Version );
551 return $this->Version;
552 }
553
560 function priority()
561 {
562 $ret = false;
563
564 if ( $this->PriorityID != 0 )
565 {
566 $ret = new eZBugPriority( $this->PriorityID );
567 }
568
569 return $ret;
570 }
571
578 function status()
579 {
580 $ret = false;
581 if ( $this->StatusID != 0 )
582 {
583 $ret = new eZBugStatus( $this->StatusID );
584 }
585
586 return $ret;
587 }
588
594 function module( $IDOnly = false )
595 {
596 $db =& eZDB::globalDatabase();
597
598 $db->array_query( $module_array, "SELECT ModuleID
599 FROM eZBug_BugModuleLink
600 WHERE BugID='$this->ID'" );
601
602 $ret = false;
603 if ( count( $module_array ) == 1 )
604 {
605 $ret = $IDOnly ? $module_array[0][$db->fieldName( "ModuleID" )] :
606 new eZBugModule( $module_array[0][$db->fieldName( "ModuleID" )] );
607 }
608 return $ret;
609 }
610
616 function category()
617 {
618 $db =& eZDB::globalDatabase();
619 $db->array_query( $category_array, "SELECT CategoryID
620 FROM eZBug_BugCategoryLink
621 WHERE BugID='$this->ID'" );
622 $ret = false;
623 if ( count( $category_array ) == 1 )
624 {
625 $ret = new eZBugCategory( $category_array[0][$db->fieldName( "CategoryID" )] );
626 }
627
628 return $ret;
629 }
630
634 function removeFromCategories()
635 {
636 $db =& eZDB::globalDatabase();
637 $db->begin();
638
639 $res = $db->query( "SELECT Count(*) FROM eZBug_BugCategoryLink
640 WHERE BugID='$this->ID'" );
641
642 if ( $res != false )
643 {
644 $query = "DELETE FROM eZBug_BugCategoryLink
645 WHERE BugID='$this->ID'";
646
647 $res = $db->query( $query );
648 }
649
650 if ( $res == false )
651 $db->rollback();
652 else
653 $db->commit();
654 }
655
659 function removeFromModules()
660 {
661 $db =& eZDB::globalDatabase();
662 $db->begin();
663
664 $res = $db->query( "DELETE
665 FROM eZBug_BugModuleLink
666 WHERE BugID='$this->ID'" );
667
668 if ( $res == false )
669 $db->rollback();
670 else
671 $db->commit();
672 }
673
680 function search( $query, $offset=0, $limit=25 )
681 {
682 $db =& eZDB::globalDatabase();
683
684 $link_array = array();
685 $return_array = array();
686
687 $query = new eZQuery( array( "Name", "Description" ), $query );
688
689 $query_str = "SELECT ID FROM eZBug_Bug WHERE (" .
690 $query->buildQuery() .
691 ") ORDER BY Name LIMIT $offset, $limit";
692
693 $db->array_query( $bug_array, $query_str );
694 $ret = array();
695
696 foreach( $bug_array as $bugItem )
697 {
698 $ret[] = new eZBug( $bugItem[$db->fieldName( "ID" )] );
699 }
700 return $ret;
701 }
702
706 function searchCount( $query )
707 {
708 $db =& eZDB::globalDatabase();
709
710 $query = new eZQuery( array( "Name", "Description" ), $query );
711
712 $query_str = "SELECT COUNT(ID) as Count FROM eZBug_Bug WHERE (" .
713 $query->buildQuery() .
714 ") ";
715
716 $db->array_query( $bug_array, $query_str );
717
718 return $bug_array[0][ $db->fieldName( "Count" ) ];
719 }
720
724 function addImage( $image )
725 {
726 if ( is_a( $image, "eZImage" ) )
727 {
728 $imageID = $image->id();
729 $created = (new eZDateTime())->timeStamp( true );
730 $db =& eZDB::globalDatabase();
731 $db->begin();
732 $db->lock( "eZBug_BugImageLink" );
733 $nextID = $db->nextID( "eZBug_BugImageLink", "ID" );
734 $res = $db->query( "INSERT INTO eZBug_BugImageLink
735 (ID, BugID, ImageID, Created)
736 VALUES ('$nextID','$this->ID','$imageID', '$created')" );
737 $db->unlock();
738
739 if ( $res == false )
740 $db->rollback();
741 else
742 $db->commit();
743 }
744 }
745
749 function deleteImage( $image )
750 {
751 if ( is_a( $image, "eZImage" ) )
752 {
753 $db =& eZDB::globalDatabase();
754 $imageID = $image->id();
755 $image->delete();
756 $db->begin();
757 $res = $db->query( "DELETE FROM eZBug_BugImageLink WHERE BugID='$this->ID' AND ImageID='$imageID'" );
758 if ( $res == false )
759 $db->rollback();
760 else
761 $db->commit();
762 }
763 }
764
768 function images()
769 {
770 $db =& eZDB::globalDatabase();
771
772 $return_array = array();
773 $image_array = array();
774
775 $db->array_query( $image_array, "SELECT ImageID FROM eZBug_BugImageLink WHERE BugID='$this->ID' ORDER BY Created" );
776
777 for ( $i = 0; $i < count( $image_array ); $i++ )
778 {
779 $return_array[$i] = new eZImage( $image_array[$i][$db->fieldName( "ImageID" )], false );
780 }
781 return $return_array;
782 }
783
787 function addFile( $file )
788 {
789 if ( is_a( $file, "eZVirtualFile" ) )
790 {
791 $db =& eZDB::globalDatabase();
792
793 $fileID = $file->id();
794 $db->begin();
795 $db->lock( "eZBug_BugFileLink" );
796 $nextID = $db->nextID( "eZBug_BugFileLink", "ID" );
797 $res = $db->query( "INSERT INTO eZBug_BugFileLink
798 (ID, BugID, FileID)
799 VALUES
800 ('$nextID','$this->ID','$fileID')" );
801 $db->unlock();
802
803 if ( $res == false )
804 $db->rollback();
805 else
806 $db->commit();
807 }
808 }
809
813 function deleteFile( $file )
814 {
815 if ( is_a( $file, "eZVirtualFile" ) )
816 {
817 $db =& eZDB::globalDatabase();
818
819 $fileID = $file->id();
820 $file->delete();
821 $db->begin();
822 $res = $db->query( "DELETE FROM eZBug_BugFileLink WHERE BugID='$this->ID' AND FileID='$fileID'" );
823
824 if ( $res == false )
825 $db->rollback();
826 else
827 $db->commit();
828 }
829 }
830
834 function files()
835 {
836 $db =& eZDB::globalDatabase();
837 $return_array = array();
838 $file_array = array();
839
840 $db->array_query( $file_array, "SELECT FileID FROM eZBug_BugFileLink WHERE BugID='$this->ID' ORDER BY Created" );
841
842 for ( $i = 0; $i < count( $file_array ); $i++ )
843 {
844 $return_array[$i] = new eZVirtualFile( $file_array[$i][$db->fieldName( "FileID" )], false );
845 }
846 return $return_array;
847 }
848
853 function bugExists( $id )
854 {
855 $db =& eZDB::globalDatabase();
856 $db->array_query( $res, "SELECT ID FROM eZBug_Bug WHERE ID='$id'" );
857 return ( count( $res ) == 1 );
858 }
859
860 var $ID;
861 var $Name;
862 var $Description;
863 var $IsHandled;
864 var $IsClosed;
865 var $Created;
866 var $UserID;
867 var $UserEmail;
868 var $PriorityID;
869 var $StatusID;
870 var $OwnerID;
871 var $IsPrivate=0;
872 var $Version;
873
874 }
875
876 ?>
$i
$i
Definition: admin/adlist.php:91
$dateTime
$dateTime
Definition: authorview.php:77
$status
$status
Definition: bugedit.php:473
$pri
$pri
Definition: bugpreview.php:70
eZBugCategory
Definition: ezbugcategory.php:55
eZBugModule
Definition: ezbugmodule.php:56
eZBugPriority
Definition: ezbugpriority.php:54
eZBugStatus
Definition: ezbugstatus.php:54
eZBug
Definition: ezbug.php:80
eZBug\addImage
addImage( $image)
Definition: ezbug.php:724
eZBug\images
images()
Definition: ezbug.php:768
eZBug\$Description
$Description
Definition: ezbug.php:862
eZBug\deleteImage
deleteImage( $image)
Definition: ezbug.php:749
eZBug\setIsHandled
setIsHandled( $value)
Definition: ezbug.php:444
eZBug\created
& created()
Definition: ezbug.php:327
eZBug\$Version
$Version
Definition: ezbug.php:872
eZBug\$Name
$Name
Definition: ezbug.php:861
eZBug\id
id()
Definition: ezbug.php:283
eZBug\__construct
__construct( $id=-1)
Definition: ezbug.php:87
eZBug\setName
setName( $value)
Definition: ezbug.php:411
eZBug\$UserID
$UserID
Definition: ezbug.php:866
eZBug\removeFromModules
removeFromModules()
Definition: ezbug.php:659
eZBug\setPriority
setPriority( $pri)
Definition: ezbug.php:485
eZBug\search
search( $query, $offset=0, $limit=25)
Definition: ezbug.php:680
eZBug\$StatusID
$StatusID
Definition: ezbug.php:869
eZBug\$ID
$ID
Definition: ezbug.php:860
eZBug\store
store()
Definition: ezbug.php:108
eZBug\$UserEmail
$UserEmail
Definition: ezbug.php:867
eZBug\getUnhandled
& getUnhandled()
Definition: ezbug.php:260
eZBug\setDescription
setDescription( $value)
Definition: ezbug.php:436
eZBug\bugExists
bugExists( $id)
Definition: ezbug.php:853
eZBug\setIsCLosed
setIsCLosed( $value)
Definition: ezbug.php:459
eZBug\removeFromCategories
removeFromCategories()
Definition: ezbug.php:634
eZBug\files
files()
Definition: ezbug.php:834
eZBug\priority
priority()
Definition: ezbug.php:560
eZBug\module
module( $IDOnly=false)
Definition: ezbug.php:594
eZBug\getAll
getAll()
Definition: ezbug.php:239
eZBug\user
user()
Definition: ezbug.php:381
eZBug\setOwner
setOwner( $user)
Definition: ezbug.php:508
eZBug\deleteFile
deleteFile( $file)
Definition: ezbug.php:813
eZBug\setStatus
setStatus( $status)
Definition: ezbug.php:496
eZBug\version
version( $asHTML=true)
Definition: ezbug.php:547
eZBug\$IsPrivate
$IsPrivate
Definition: ezbug.php:871
eZBug\category
category()
Definition: ezbug.php:616
eZBug\isClosed
isClosed()
Definition: ezbug.php:352
eZBug\name
name( $html=true)
Definition: ezbug.php:291
eZBug\status
status()
Definition: ezbug.php:578
eZBug\addFile
addFile( $file)
Definition: ezbug.php:787
eZBug\isPrivate
isPrivate()
Definition: ezbug.php:366
eZBug\isHandled
isHandled()
Definition: ezbug.php:339
eZBug\setUser
setUser( $user)
Definition: ezbug.php:474
eZBug\setVersion
setVersion( $value)
Definition: ezbug.php:539
eZBug\$OwnerID
$OwnerID
Definition: ezbug.php:870
eZBug\setIsPrivate
setIsPrivate( $priv)
Definition: ezbug.php:524
eZBug\userEmail
userEmail( $html=true)
Definition: ezbug.php:302
eZBug\$IsHandled
$IsHandled
Definition: ezbug.php:863
eZBug\$IsClosed
$IsClosed
Definition: ezbug.php:864
eZBug\setUserEmail
setUserEmail( $mail)
Definition: ezbug.php:421
eZBug\searchCount
searchCount( $query)
Definition: ezbug.php:706
eZBug\description
description( $html=true)
Definition: ezbug.php:314
eZBug\$PriorityID
$PriorityID
Definition: ezbug.php:868
eZBug\owner
owner()
Definition: ezbug.php:397
eZBug\$Created
$Created
Definition: ezbug.php:865
eZDB\finish
static finish(&$resultArray, &$db)
Definition: ezdb.php:204
eZDB\globalDatabase
static & globalDatabase()
Definition: ezdb.php:134
eZDateTime
Definition: ezdatetime.php:55
eZImage
Definition: ezimage.php:95
eZMail\validate
static validate( $address)
Definition: ezmail.php:599
eZQuery
Definition: ezquery.php:54
eZUser
Definition: ezuser.php:76
eZVirtualFile
Definition: ezvirtualfile.php:42
$name
$name
Definition: companytypelist.php:194
$id
$id
Definition: companytypelist.php:193
$query
if(isset( $Year) &&!is_numeric( $Year)||isset( $Month) &&!is_numeric( $Month)) $query
Definition: entryexitpages.php:65
$version
$version
Definition: ezabout/user/datasupplier.php:29
$db
$db
Definition: ezarticle/user/authorlist.php:53
$mail
$mail
Definition: ezbulkmail/admin/maillist.php:61
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
$limit
$limit
Definition: ezimagecatalogue/admin/imagelist.php:312
$ret
$ret
Definition: ezsitemanager/admin/filelist.php:88
$res
$res
Definition: ezstats/admin/cron.php:45
$offset
$offset
Definition: ezstats/admin/cron.php:51
$link_array
$link_array
Definition: latest.php:52
Name
if($user) if(isset( $next) && $next)<?=isset($all_fields_error) &&$all_fields_error ?><?=isset($password_error) &&$password_error ?></p ><? endif;?>< form method="post">< table border="0" cellspacing="2" cellpadding="2" class="boxtext" style="font-size=13;">< tr >< td style="color:<?= isset( $error['first_name'] ) ?> First Name
Definition: step1.php:127
$category_array
$category_array
Definition: todoedit.php:604
$user
$user
Definition: user/adlist.php:39
$image
$image
Definition: user/articlelist.php:242
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.