]> git.mxchange.org Git - friendica.git/commitdiff
New worker to fix empty icid
authorMichael <heluecht@pirati.ca>
Fri, 29 Jun 2018 06:24:18 +0000 (06:24 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 29 Jun 2018 06:24:18 +0000 (06:24 +0000)
src/Worker/SetItemContentID.php [new file with mode: 0644]

diff --git a/src/Worker/SetItemContentID.php b/src/Worker/SetItemContentID.php
new file mode 100644 (file)
index 0000000..96863b3
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+/**
+ * @file src/Worker/SetItemContentID.php
+ * @brief This script sets the "icid" value in the item table if it couldn't set before.
+ *
+ * This script is started from mod/item.php to fix timing problems.
+ */
+
+namespace Friendica\Worker;
+
+use Friendica\Model\Item;
+
+class SetItemContentID {
+       public static function execute($uri = '') {
+               if (empty($uri)) {
+                       return;
+               }
+
+               Item::setICIDforURI($uri);
+       }
+}