@@ -212,7 +212,7 @@ public static function getUsersSharingFile($path, $ownerUser, $includeOwner = fa
212212 if (\OCP \DB ::isError ($ result )) {
213213 \OCP \Util::writeLog ('OCP\Share ' , \OC_DB ::getErrorMessage (), \OCP \Util::ERROR );
214214 } else {
215- while ($ row = $ result ->fetchRow ()) {
215+ while ($ row = $ result ->fetch ()) {
216216 if ((int )($ row ['accepted ' ]) === Constants::STATE_REJECTED ) {
217217 $ rejected []= $ row ['parent ' ];
218218 continue ;
@@ -267,7 +267,7 @@ public static function getUsersSharingFile($path, $ownerUser, $includeOwner = fa
267267 if (\OCP \DB ::isError ($ result )) {
268268 \OCP \Util::writeLog ('OCP\Share ' , \OC_DB ::getErrorMessage (), \OCP \Util::ERROR );
269269 } else {
270- if ($ result ->fetchRow ()) {
270+ if ($ result ->fetch ()) {
271271 $ publicShare = true ;
272272 }
273273 }
@@ -288,7 +288,7 @@ public static function getUsersSharingFile($path, $ownerUser, $includeOwner = fa
288288 if (\OCP \DB ::isError ($ result )) {
289289 \OCP \Util::writeLog ('OCP\Share ' , \OC_DB ::getErrorMessage (), \OCP \Util::ERROR );
290290 } else {
291- if ($ result ->fetchRow ()) {
291+ if ($ result ->fetch ()) {
292292 $ remoteShare = true ;
293293 }
294294 }
@@ -324,7 +324,7 @@ public static function getUsersSharingFile($path, $ownerUser, $includeOwner = fa
324324 if (\OCP \DB ::isError ($ result )) {
325325 \OCP \Util::writeLog ('OCP\Share ' , \OC_DB ::getErrorMessage (), \OCP \Util::ERROR );
326326 } else {
327- while ($ row = $ result ->fetchRow ()) {
327+ while ($ row = $ result ->fetch ()) {
328328 foreach ($ fileTargets [$ row ['fileid ' ]] as $ uid => $ shareData ) {
329329 if ($ mountPath !== false ) {
330330 $ sharedPath = $ shareData ['file_target ' ];
@@ -489,7 +489,7 @@ public static function getItemSharedWithUser($itemType, $itemSource, $user, $own
489489
490490 $ result = \OC_DB ::executeAudited ($ query , $ arguments );
491491
492- while ($ row = $ result ->fetchRow ()) {
492+ while ($ row = $ result ->fetch ()) {
493493 if ($ fileDependent && !self ::isFileReachable ($ row ['path ' ], $ row ['storage_id ' ])) {
494494 continue ;
495495 }
@@ -610,7 +610,7 @@ public static function getShareByToken($token, $checkPasswordProtection = true)
610610 if ($ result === false ) {
611611 \OCP \Util::writeLog ('OCP\Share ' , \OC_DB ::getErrorMessage () . ', token= ' . $ token , \OCP \Util::ERROR );
612612 }
613- $ row = $ result ->fetchRow ();
613+ $ row = $ result ->fetch ();
614614 if ($ row === false ) {
615615 return false ;
616616 }
@@ -636,7 +636,7 @@ public static function resolveReShare($linkItem) {
636636 $ parent = $ linkItem ['parent ' ];
637637 while (isset ($ parent )) {
638638 $ query = \OC_DB ::prepare ('SELECT * FROM `*PREFIX*share` WHERE `id` = ? ' , 1 );
639- $ item = $ query ->execute ([$ parent ])->fetchRow ();
639+ $ item = $ query ->execute ([$ parent ])->fetch ();
640640 if (isset ($ item ['parent ' ])) {
641641 $ parent = $ item ['parent ' ];
642642 } else {
@@ -1144,7 +1144,7 @@ public static function unshareAll($itemType, $itemSource) {
11441144 $ result = $ query ->execute ([$ itemType , $ itemSource ]);
11451145 $ shares = [];
11461146 // Add each owner's shares to the array of all shares for this item.
1147- while ($ row = $ result ->fetchRow ()) {
1147+ while ($ row = $ result ->fetch ()) {
11481148 $ shares = \array_merge ($ shares , self ::getItems ($ itemType , $ itemSource , null , null , $ row ['uid_owner ' ]));
11491149 }
11501150 if (!empty ($ shares )) {
@@ -2024,7 +2024,7 @@ public static function getItems(
20242024 $ targets = [];
20252025 $ switchedItems = [];
20262026 $ mounts = [];
2027- while ($ row = $ result ->fetchRow ()) {
2027+ while ($ row = $ result ->fetch ()) {
20282028 self ::transformDBResults ($ row );
20292029 // Filter out duplicate group shares for users with unique targets
20302030 if ($ fileDependent && !self ::isFileReachable ($ row ['path ' ], $ row ['storage_id ' ])) {
@@ -2086,7 +2086,7 @@ public static function getItems(
20862086 \OCP \Util::ERROR
20872087 );
20882088 } else {
2089- $ parentRow = $ parentResult ->fetchRow ();
2089+ $ parentRow = $ parentResult ->fetch ();
20902090 $ tmpPath = $ parentRow ['file_target ' ];
20912091 // find the right position where the row path continues from the target path
20922092 $ pos = \strrpos ($ row ['path ' ], $ parentRow ['file_target ' ]);
@@ -2723,7 +2723,7 @@ public static function removeAllLinkShares() {
27232723 // Delete any link shares
27242724 $ query = \OC_DB ::prepare ('SELECT `id` FROM `*PREFIX*share` WHERE `share_type` = ? ' );
27252725 $ result = $ query ->execute ([self ::SHARE_TYPE_LINK ]);
2726- while ($ item = $ result ->fetchRow ()) {
2726+ while ($ item = $ result ->fetch ()) {
27272727 Helper::delete ($ item ['id ' ]);
27282728 }
27292729 }
0 commit comments