mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
feature 414 (yes, a 6 years old request): ability to define the list of
permitted characters in file/directory names for synchronization. git-svn-id: http://piwigo.org/svn/trunk@13527 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -208,7 +208,7 @@ SELECT id_uppercat, MAX(rank)+1 AS next_rank
|
||||
foreach (array_diff($fs_fulldirs, array_keys($db_fulldirs)) as $fulldir)
|
||||
{
|
||||
$dir = basename($fulldir);
|
||||
if (preg_match('/^[a-zA-Z0-9-_.]+$/', $dir))
|
||||
if (preg_match($conf['sync_chars_regex'], $dir))
|
||||
{
|
||||
$insert = array(
|
||||
'id' => $next_id++,
|
||||
@@ -374,7 +374,7 @@ SELECT id, path
|
||||
continue;
|
||||
}
|
||||
$filename = basename($path);
|
||||
if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $filename))
|
||||
if (!preg_match($conf['sync_chars_regex'], $filename))
|
||||
{
|
||||
array_push(
|
||||
$errors,
|
||||
|
||||
Reference in New Issue
Block a user