Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 1744010

Browse files
committed
Go through unnecessary todos.
1 parent bda9c41 commit 1744010

File tree

7 files changed

+42
-80
lines changed

7 files changed

+42
-80
lines changed

core/src/plugins/boot.conf/class.BootConfLoader.php

Lines changed: 41 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ public function _savePluginConfig($pluginId, $options)
447447
*/
448448
public function listRepositories($user = null)
449449
{
450-
// TODO: Implement listRepositories() method.
450+
return array();
451451
}
452452

453453
/**
@@ -457,7 +457,7 @@ public function listRepositories($user = null)
457457
* @return Array
458458
*/
459459
public function listRepositoriesWithCriteria($criteria, &$count = null){
460-
460+
return array();
461461
}
462462

463463
/**
@@ -468,7 +468,7 @@ public function listRepositoriesWithCriteria($criteria, &$count = null){
468468
*/
469469
public function getRepositoryById($repositoryId)
470470
{
471-
// TODO: Implement getRepositoryById() method.
471+
return null;
472472
}
473473

474474
/**
@@ -477,31 +477,28 @@ public function getRepositoryById($repositoryId)
477477
* @param String $repositorySlug
478478
* @return Repository
479479
*/
480-
public function getRepositoryByAlias($repositorySlug)
481-
{
482-
// TODO: Implement getRepositoryByAlias() method.
480+
public function getRepositoryByAlias($repositorySlug) {
481+
return null;
483482
}
484483

485484
/**
486485
* Stores a repository, new or not.
487486
*
488487
* @param Repository $repositoryObject
489488
* @param Boolean $update
490-
* @return -1 if failed
489+
* @return int -1 if failed
491490
*/
492-
public function saveRepository($repositoryObject, $update = false)
493-
{
494-
// TODO: Implement saveRepository() method.
491+
public function saveRepository($repositoryObject, $update = false) {
492+
return -1;
495493
}
496494

497495
/**
498496
* Delete a repository, given its unique ID.
499497
*
500498
* @param String $repositoryId
501499
*/
502-
public function deleteRepository($repositoryId)
503-
{
504-
// TODO: Implement deleteRepository() method.
500+
public function deleteRepository($repositoryId) {
501+
505502
}
506503

507504
/**
@@ -510,41 +507,33 @@ public function deleteRepository($repositoryId)
510507
* @param boolean $excludeReserved,
511508
* @return array AjxpRole[]
512509
*/
513-
public function listRoles($roleIds = array(), $excludeReserved = false)
514-
{
515-
// TODO: Implement listRoles() method.
510+
public function listRoles($roleIds = array(), $excludeReserved = false) {
511+
return array();
516512
}
517513

518-
public function saveRoles($roles)
519-
{
520-
// TODO: Implement saveRoles() method.
514+
public function saveRoles($roles) {
521515
}
522516

523517
/**
524518
* @param AJXP_Role $role
525519
* @param AbstractAjxpUser $userObject
526520
* @return void
527521
*/
528-
public function updateRole($role, $userObject = null)
529-
{
530-
// TODO: Implement updateRole() method.
522+
public function updateRole($role, $userObject = null) {
531523
}
532524

533525
/**
534526
* @param AJXP_Role|String $role
535527
* @return void
536528
*/
537-
public function deleteRole($role)
538-
{
539-
// TODO: Implement deleteRole() method.
529+
public function deleteRole($role) {
530+
540531
}
541532

542533
/**
543534
* Specific queries
544535
*/
545-
public function countAdminUsers()
546-
{
547-
// TODO: Implement countAdminUsers() method.
536+
public function countAdminUsers() {
548537
}
549538

550539
/**
@@ -553,9 +542,8 @@ public function countAdminUsers()
553542
* @param String $ID
554543
* @return String $ID
555544
*/
556-
public function saveBinary($context, $fileName, $ID = null)
557-
{
558-
// TODO: Implement saveBinary() method.
545+
public function saveBinary($context, $fileName, $ID = null) {
546+
return $ID;
559547
}
560548

561549
/**
@@ -564,19 +552,17 @@ public function saveBinary($context, $fileName, $ID = null)
564552
* @param Stream $outputStream
565553
* @return boolean
566554
*/
567-
public function loadBinary($context, $ID, $outputStream = null)
568-
{
569-
// TODO: Implement loadBinary() method.
555+
public function loadBinary($context, $ID, $outputStream = null) {
556+
return false;
570557
}
571558

572559
/**
573560
* @param array $context
574561
* @param String $ID
575562
* @return boolean
576563
*/
577-
public function deleteBinary($context, $ID)
578-
{
579-
// TODO: Implement deleteBinary() method.
564+
public function deleteBinary($context, $ID) {
565+
return false;
580566
}
581567

582568
/**
@@ -585,9 +571,8 @@ public function deleteBinary($context, $ID)
585571
* @param String $userId
586572
* @param Array $deletedSubUsers
587573
*/
588-
public function deleteUser($userId, &$deletedSubUsers)
589-
{
590-
// TODO: Implement deleteUser() method.
574+
public function deleteUser($userId, &$deletedSubUsers) {
575+
return array();
591576
}
592577

593578
/**
@@ -596,32 +581,28 @@ public function deleteUser($userId, &$deletedSubUsers)
596581
* @param string $userId
597582
* @return AbstractAjxpUser
598583
*/
599-
public function instantiateAbstractUserImpl($userId)
600-
{
601-
// TODO: Implement instantiateAbstractUserImpl() method.
584+
public function instantiateAbstractUserImpl($userId) {
585+
return null;
602586
}
603587

604-
public function getUserClassFileName()
605-
{
606-
// TODO: Implement getUserClassFileName() method.
588+
public function getUserClassFileName() {
589+
return "";
607590
}
608591

609592
/**
610593
* @param $userId
611594
* @return AbstractAjxpUser[]
612595
*/
613-
public function getUserChildren($userId)
614-
{
615-
// TODO: Implement getUserChildren() method.
596+
public function getUserChildren($userId) {
597+
return array();
616598
}
617599

618600
/**
619601
* @param string $repositoryId
620602
* @return array()
621603
*/
622-
public function getUsersForRepository($repositoryId)
623-
{
624-
// TODO: Implement getUsersForRepository() method.
604+
public function getUsersForRepository($repositoryId) {
605+
return array();
625606
}
626607

627608
/**
@@ -632,9 +613,7 @@ public function getUsersForRepository($repositoryId)
632613
* @return array()
633614
*/
634615
public function getRolesForRepository($repositoryId, $rolePrefix = '', $countOnly = false){
635-
636-
// TODO: Implement getUsersForRepository() method.
637-
616+
return array();
638617
}
639618

640619
/**
@@ -644,7 +623,7 @@ public function getRolesForRepository($repositoryId, $rolePrefix = '', $countOnl
644623
* @return array
645624
*/
646625
public function countUsersForRepository($repositoryId, $details = false, $admin=false){
647-
626+
return array();
648627
}
649628

650629
/**
@@ -653,47 +632,38 @@ public function countUsersForRepository($repositoryId, $details = false, $admin=
653632
* @param bool $fullTree
654633
* @return void
655634
*/
656-
public function filterUsersByGroup(&$flatUsersList, $baseGroup = "/", $fullTree = false)
657-
{
658-
// TODO: Implement filterUsersByGroup() method.
635+
public function filterUsersByGroup(&$flatUsersList, $baseGroup = "/", $fullTree = false) {
659636
}
660637

661638
/**
662639
* @param string $groupPath
663640
* @param string $groupLabel
664641
* @return mixed
665642
*/
666-
public function createGroup($groupPath, $groupLabel)
667-
{
668-
// TODO: Implement createGroup() method.
643+
public function createGroup($groupPath, $groupLabel) {
644+
return false;
669645
}
670646

671647
/**
672648
* @param $groupPath
673649
* @return void
674650
*/
675-
public function deleteGroup($groupPath)
676-
{
677-
// TODO: Implement deleteGroup() method.
651+
public function deleteGroup($groupPath) {
678652
}
679653

680654
/**
681655
* @param string $groupPath
682656
* @param string $groupLabel
683657
* @return void
684658
*/
685-
public function relabelGroup($groupPath, $groupLabel)
686-
{
687-
// TODO: Implement relabelGroup() method.
659+
public function relabelGroup($groupPath, $groupLabel) {
688660
}
689661

690662
/**
691663
* @param string $baseGroup
692664
* @return string[]
693665
*/
694-
public function getChildrenGroups($baseGroup = "/")
695-
{
696-
// TODO: Implement getChildrenGroups() method.
666+
public function getChildrenGroups($baseGroup = "/") {
697667
}
698668

699669
/**

core/src/plugins/conf.sql/class.sqlConfDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,11 +782,11 @@ public function countAdminUsers()
782782
}
783783

784784
/**
785+
* This function is useless for the SQL driver : users are by default correctly listed by group.
785786
* @param AbstractAjxpUser[] $flatUsersList
786787
* @param string $baseGroup
787788
* @param bool $fullTree
788789
* @return void
789-
* @todo
790790
*/
791791
public function filterUsersByGroup(&$flatUsersList, $baseGroup = "/", $fullTree = false)
792792
{

core/src/plugins/core.mailer/class.AjxpMailer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ public function resolveAdresses($recipients)
213213

214214
public function abstractUserToAdress(AbstractAjxpUser $user)
215215
{
216-
// TODO
217216
// SHOULD CHECK THAT THIS USER IS "AUTHORIZED" TO AVOID SPAM
218217
$userEmail = $user->personalRole->filterParameterValue("core.conf", "email", AJXP_REPO_SCOPE_ALL, "");
219218
if (empty($userEmail)) {

core/src/plugins/editor.ajxp_datagrid/class.AjxpDataGridEditor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Class.create("AjxpDataGridEditor", AbstractEditor, {
3333
},
3434

3535
destroy: function(){
36-
// TODO: Shall we destroy the SVG objects?
3736
this._lists.each(function(resultPane){
3837
resultPane.destroy();
3938
});

core/src/plugins/editor.ajxp_graphs/class.GraphsViewer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Class.create("GraphsViewer", AbstractEditor, {
3838
},
3939

4040
destroy: function(){
41-
// TODO: Shall we destroy the SVG objects?
4241
this.charts = $H();
4342
},
4443

core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ public function persistAlert(AJXP_Notification $notif)
201201

202202
/**
203203
* @abstract
204-
* @todo shall we filter this result by the permissions mask? normally no reason to set a watch on a forbidden item...
205204
* @param $userId
206205
* @param null $repositoryIdFilter
207206
* @return mixed

core/src/plugins/meta.user/class.UserMetaManager.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,6 @@ public function editMeta($actionName, $httpVars, $fileVars)
276276
public function extractMeta(&$ajxpNode, $contextNode = false, $details = false)
277277
{
278278
$metadata = $ajxpNode->retrieveMetadata("users_meta", false, AJXP_METADATA_SCOPE_GLOBAL);
279-
if (count($metadata)) {
280-
// @todo : Should be UTF8-IZED at output only !!??
281-
// array_map(array("SystemTextEncoding", "toUTF8"), $metadata);
282-
}
283279
if(empty($metadata)) $metadata = array();
284280
$ajxpNode->mergeMetadata($metadata);
285281

0 commit comments

Comments
 (0)