@@ -617,13 +617,8 @@ public final function getParallelItems($label_type_filter = NULL) {
617617 * inside the given directory in the repository.
618618 *
619619 * This function is optional for VCS backends to implement, be sure to check
620- * with versioncontrol_backend_implements($repository['vcs'], 'get_directory_contents')
621- * if the particular backend actually implements it.
620+ * the return value to NULL.
622621 *
623- * @param $repository
624- * The repository that the directory item is located in.
625- * @param $directory_item
626- * The parent item of the items that should be listed.
627622 * @param $recursive
628623 * If FALSE, only the direct children of $path will be retrieved.
629624 * If TRUE, you'll get every single descendant of $path.
@@ -647,14 +642,11 @@ public final function getParallelItems($label_type_filter = NULL) {
647642 * A real-life example of such a result array can be found
648643 * in the FakeVCS example module.
649644 */
650- public function getDirectoryContents ($ repository , $ directory_item , $ recursive = FALSE ) {
651- if (!versioncontrol_is_directory_item ( $ directory_item ) ) {
645+ public function getDirectoryContents ($ recursive = FALSE ) {
646+ if (!$ this -> isDirectory () || $ this instanceof VersioncontrolItemDirectoryContents ) {
652647 return NULL ;
653648 }
654- $ contents = _versioncontrol_call_backend (
655- $ repository ['vcs ' ], 'get_directory_contents ' ,
656- array ($ repository , $ directory_item , $ recursive )
657- );
649+ $ this ->_getDirectoryContents ($ recursive );
658650 if (!isset ($ contents )) {
659651 return NULL ;
660652 }
0 commit comments