[Posting] Respect process_links setting
This commit is contained in:
parent
ab142ab52d
commit
9739cc5f21
|
@ -26,7 +26,6 @@ use App\Core\DB\DB;
|
||||||
use App\Core\Event;
|
use App\Core\Event;
|
||||||
use App\Core\Form;
|
use App\Core\Form;
|
||||||
use App\Core\GSFile;
|
use App\Core\GSFile;
|
||||||
use App\Util\Exception\ClientException;
|
|
||||||
use function App\Core\I18n\_m;
|
use function App\Core\I18n\_m;
|
||||||
use App\Core\Modules\Component;
|
use App\Core\Modules\Component;
|
||||||
use App\Entity\Attachment;
|
use App\Entity\Attachment;
|
||||||
|
@ -36,6 +35,7 @@ use App\Entity\Link;
|
||||||
use App\Entity\Note;
|
use App\Entity\Note;
|
||||||
use App\Entity\NoteToLink;
|
use App\Entity\NoteToLink;
|
||||||
use App\Util\Common;
|
use App\Util\Common;
|
||||||
|
use App\Util\Exception\ClientException;
|
||||||
use App\Util\Exception\InvalidFormException;
|
use App\Util\Exception\InvalidFormException;
|
||||||
use App\Util\Exception\RedirectException;
|
use App\Util\Exception\RedirectException;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
|
@ -143,6 +143,7 @@ END;
|
||||||
DB::flush();
|
DB::flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Common::config('attachments', 'process_links')) {
|
||||||
$matched_urls = [];
|
$matched_urls = [];
|
||||||
$processed_urls = false;
|
$processed_urls = false;
|
||||||
preg_match_all(self::URL_REGEX, $content, $matched_urls, PREG_SET_ORDER);
|
preg_match_all(self::URL_REGEX, $content, $matched_urls, PREG_SET_ORDER);
|
||||||
|
@ -159,6 +160,7 @@ END;
|
||||||
DB::flush();
|
DB::flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a unique representation of a file on disk
|
* Get a unique representation of a file on disk
|
||||||
|
|
Loading…
Reference in New Issue