Browse Source

[TASK] fix for PHP 5.4 since pullRequest #140

pull/150/head
Kanti 10 years ago
parent
commit
4842796204
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      system/admin/admin.php

+ 2
- 2
system/admin/admin.php View File

@ -68,7 +68,7 @@ function edit_post($title, $tag, $url, $content, $oldfile, $destination = null,
$post_title = $title; $post_title = $title;
$post_fi = $fi; $post_fi = $fi;
$post_vid = str_replace(["http://", "https://", "www.", "youtube", ".com", "/watch?v=", "/embed/"], "", $vid);
$post_vid = str_replace(array("http://", "https://", "www.", "youtube", ".com", "/watch?v=", "/embed/"), "", $vid);
$post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag)); $post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag));
$post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url))); $post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url)));
if ($description !== null) { if ($description !== null) {
@ -161,7 +161,7 @@ function add_post($title, $tag, $url, $content, $user, $description = null, $fi,
$post_date = date('Y-m-d-H-i-s'); $post_date = date('Y-m-d-H-i-s');
$post_title = $title; $post_title = $title;
$post_fi = $fi; $post_fi = $fi;
$post_vid = str_replace(["http://", "https://", "www.", "youtube", ".com", "/watch?v=", "/embed/"], "", $vid);
$post_vid = str_replace(array("http://", "https://", "www.", "youtube", ".com", "/watch?v=", "/embed/"), "", $vid);
$post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag)); $post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag));
$post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url))); $post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url)));
if ($description !== null) { if ($description !== null) {


Loading…
Cancel
Save