~dont_cache()
~includeonce('../config.tmpl')
~set('title','Administration du W-Fenec')
~include('../site/admin.header.tmpl','Visite l~apos()Admin')
~if(~get('is_admin')==0,~http_error(404))
~includeonce('../lib/tags.tmpl')
~defunc('wipe_tag',
~str_replace( '’', "'", ~str_replace('\\"', '"', ~str_replace("\\'", "'", ~str_replace('"', '"', ~str_replace(''', "'", ~sparam(1))))))
)
~list(~get('database'),
"SELECT id,tag FROM tags
WHERE
tags.tag LIKE '%"%'
OR tags.tag LIKE '%’%'
OR tags.tag LIKE '%'%'
OR tags.tag LIKE '%\\\\\\%'
",
'LM', {
~setl('new_tag', ~wipe_tag(~fld('tag'))),
~setl('new_tag_id', ~get_tag_id(~getl('new_tag'))),
~list(~get('database'),
"UPDATE IGNORE tags_ressources SET tag_id=~integer(~getl('new_tag_id')) WHERE tag_id=~fld('id') AND tag_id!=~getl('new_tag_id')"
),
~list(~get('database'),
"DELETE FROM tags_ressources WHERE tag_id=~fld('id') AND tag_id!=~getl('new_tag_id')"
),
' Raw-~fld('id'): ~fld('tag'), Clean-~getl('new_tag_id'): ~wipe_tag(~fld('tag')).
#~fld('id')'
},
'LL', '
~gfld('counter') done.'
)
~include("../site/admin.footer.tmpl")