summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_event.php6
-rw-r--r--modules/tag/helpers/tag_item_rest.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index 403ccd52..10075c02 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -34,7 +34,7 @@ class tag_event_Core {
if (!empty($iptc["2#025"])) {
foreach($iptc["2#025"] as $tag) {
$tag = str_replace("\0", "", $tag);
- foreach (preg_split("/,/", $tag) as $word) {
+ foreach (explode(",", $tag) as $word) {
$word = trim($word);
if (function_exists("mb_detect_encoding") && mb_detect_encoding($word) != "UTF-8") {
$word = utf8_encode($word);
@@ -82,7 +82,7 @@ class tag_event_Core {
static function item_edit_form_completed($item, $form) {
tag::clear_all($item);
- foreach (preg_split("/,/", $form->edit_item->tags->value) as $tag_name) {
+ foreach (explode(",", $form->edit_item->tags->value) as $tag_name) {
if ($tag_name) {
tag::add($item, trim($tag_name));
}
@@ -124,7 +124,7 @@ class tag_event_Core {
}
static function add_photos_form_completed($album, $form) {
- foreach (split(",", $form->add_photos->tags->value) as $tag_name) {
+ foreach (explode(",", $form->add_photos->tags->value) as $tag_name) {
$tag_name = trim($tag_name);
if ($tag_name) {
$tag = tag::add($album, $tag_name);
diff --git a/modules/tag/helpers/tag_item_rest.php b/modules/tag/helpers/tag_item_rest.php
index 672cec53..fe07fefb 100644
--- a/modules/tag/helpers/tag_item_rest.php
+++ b/modules/tag/helpers/tag_item_rest.php
@@ -34,7 +34,7 @@ class tag_item_rest_Core {
}
static function resolve($tuple) {
- list ($tag_id, $item_id) = split(",", $tuple);
+ list ($tag_id, $item_id) = explode(",", $tuple);
$tag = ORM::factory("tag", $tag_id);
$item = ORM::factory("item", $item_id);
if (!$tag->loaded() || !$item->loaded() || !$tag->has($item) || !access::can("view", $item)) {