Skip to content

Commit 6022cd5

Browse files
committed
Fix D7 getLists
1 parent ae79045 commit 6022cd5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

snippets/d7element.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"\\$arElements = \\\\Bitrix\\\\Iblock\\\\ElementTable::getList(array(",
66
"\t\"select\" => array(\"NAME\"),",
77
"\t\"filter\" => array(\"ID\" => \"${1:id}\")",
8-
"))->fetch();",
8+
"));",
99
"",
10-
"foreach(\\$arElements as \\$arElement) {",
10+
"while ($arElement = $arElements->fetch()) {",
1111
"\tvar_export(\\$arElement);",
1212
"}"
1313
],

snippets/d7group.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"\\$arGroups = \\\\Bitrix\\\\Main\\\\GroupTable::getList(array(",
66
"\t\"select\" => array(\"NAME\"),",
77
"\t\"filter\" => array(\"ID\" => \"${1:id}\")",
8-
"))->fetch();",
8+
"));",
99
"",
10-
"foreach(\\$arGroups as \\$arGroup) {",
10+
"while ($arGroup = $arGroups->fetch()) {",
1111
"\tvar_export(\\$arGroup);",
1212
"}"
1313
],

snippets/d7section.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"\\$arSections = \\\\Bitrix\\\\Iblock\\\\SectionTable::getList(array(",
66
"\t\"select\" => array(\"NAME\"),",
77
"\t\"filter\" => array(\"ID\" => \"${1:id}\")",
8-
"))->fetch();",
8+
"));",
99
"",
10-
"foreach(\\$arSections as \\$arSection) {",
10+
"while ($arSection = $arSections->fetch()) {",
1111
"\tvar_export(\\$arSection);",
1212
"}"
1313
],

snippets/d7user.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"\\$arUsers = \\\\Bitrix\\\\Main\\\\UserTable::getList(array(",
66
"\t\"select\" => array(\"LOGIN\"),",
77
"\t\"filter\" => array(\"ID\" => \"${1:id}\")",
8-
"))->fetch();",
8+
"));",
99
"",
10-
"foreach(\\$arUsers as \\$arUser) {",
10+
"while ($arUser = $arUsers->fetch()) {",
1111
"\tvar_export(\\$arUser);",
1212
"}"
1313
],

0 commit comments

Comments
 (0)