You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -164,23 +164,23 @@ public static function lifecycle($event, $step)
164
164
safe_update("txp_lang", "data = 'Link Custom-Felder', owner = 'jcr_link_custom'", "name = 'jcr_link_custom' AND lang = 'de'");
165
165
}
166
166
167
-
// Migrate from NULL to '' default value
168
-
$has_nulls = safe_rows_start("*", "txp_link","`jcr_link_custom_1` IS NULL OR `jcr_link_custom_2` IS NULL OR `jcr_link_custom_3` IS NULL OR `jcr_link_custom_4` IS NULL OR `jcr_link_custom_5` IS NULL");
169
-
if (@numRows($has_nulls) > 0) {
170
-
safe_update("txp_link", "jcr_link_custom_1 = ''", "jcr_link_custom_1 IS NULL");
171
-
safe_update("txp_link", "jcr_link_custom_2 = ''", "jcr_link_custom_2 IS NULL");
172
-
safe_update("txp_link", "jcr_link_custom_3 = ''", "jcr_link_custom_3 IS NULL");
173
-
safe_update("txp_link", "jcr_link_custom_4 = ''", "jcr_link_custom_4 IS NULL");
174
-
safe_update("txp_link", "jcr_link_custom_5 = ''", "jcr_link_custom_5 IS NULL");
175
-
safe_alter(
176
-
"txp_link",
177
-
"MODIFY jcr_link_custom_1 VARCHAR(255) NOT NULL DEFAULT '',
178
-
MODIFY jcr_link_custom_2 VARCHAR(255) NOT NULL DEFAULT '',
179
-
MODIFY jcr_link_custom_3 VARCHAR(255) NOT NULL DEFAULT '',
180
-
MODIFY jcr_link_custom_4 VARCHAR(255) NOT NULL DEFAULT '',
181
-
MODIFY jcr_link_custom_5 VARCHAR(255) NOT NULL DEFAULT ''"
182
-
);
183
-
}
167
+
// Upgrade: Migrate from NULL to '' default value
168
+
$has_nulls = safe_rows_start("*", "txp_link","`jcr_link_custom_1` IS NULL OR `jcr_link_custom_2` IS NULLOR `jcr_link_custom_3` IS NULL OR `jcr_link_custom_4` ISNULL OR `jcr_link_custom_5` IS NULL");
169
+
if (@numRows($has_nulls) > 0) {
170
+
safe_update("txp_link", "jcr_link_custom_1 = ''", "jcr_link_custom_1 IS NULL");
171
+
safe_update("txp_link", "jcr_link_custom_2 = ''", "jcr_link_custom_2 IS NULL");
172
+
safe_update("txp_link", "jcr_link_custom_3 = ''", "jcr_link_custom_3 IS NULL");
173
+
safe_update("txp_link", "jcr_link_custom_4 = ''", "jcr_link_custom_4 IS NULL");
174
+
safe_update("txp_link", "jcr_link_custom_5 = ''", "jcr_link_custom_5 IS NULL");
175
+
safe_alter(
176
+
"txp_link",
177
+
"MODIFY jcr_link_custom_1 VARCHAR(255) NOT NULL DEFAULT '',
178
+
MODIFY jcr_link_custom_2 VARCHAR(255) NOT NULL DEFAULT '',
179
+
MODIFY jcr_link_custom_3 VARCHAR(255) NOT NULL DEFAULT '',
180
+
MODIFY jcr_link_custom_4 VARCHAR(255) NOT NULL DEFAULT '',
181
+
MODIFY jcr_link_custom_5 VARCHAR(255) NOT NULL DEFAULT ''"
182
+
);
183
+
}
184
184
break;
185
185
case"deleted":
186
186
// Remove columns from link table
@@ -518,7 +518,7 @@ function jcr_if_link_custom($atts, $thing = null)
518
518
Example: Use @value="english"@ to output only those links whose “language” link custom field is english. Default: none.
519
519
520
520
@match@
521
-
Match testing: exact, any, all, pattern. See the docs for “if_custom_field”:https://docs.textpattern.com/tags/if_custom_field.
521
+
Match testing: exact, any, all, pattern. See the docs for "if_custom_field":https://docs.textpattern.com/tags/if_custom_field.
0 commit comments