mirror of
https://github.com/nidebr/as-stats-gui.git
synced 2025-02-20 11:23:18 +08:00
add _ in regular expression when selected kownlink
This commit is contained in:
parent
23fa0de20f
commit
02bc0fb0f7
19
gengraph.php
19
gengraph.php
@ -34,14 +34,19 @@ if(isset($_GET['selected_links'])){
|
|||||||
$reverse = array();
|
$reverse = array();
|
||||||
foreach($knownlinks as $link)
|
foreach($knownlinks as $link)
|
||||||
$reverse[$link['tag']] = array('color' => $link['color'], 'descr' => $link['descr']);
|
$reverse[$link['tag']] = array('color' => $link['color'], 'descr' => $link['descr']);
|
||||||
|
|
||||||
$links = array();
|
$links = array();
|
||||||
foreach(explode(',', $_GET['selected_links']) as $tag){
|
foreach(explode(',', $_GET['selected_links']) as $tag){
|
||||||
if (preg_match('/[^a-zA-Z0-9]/', $tag))
|
if (preg_match('/[^a-zA-Z0-9_]/', $tag))
|
||||||
continue;
|
continue;
|
||||||
$link = array('tag' => $tag,
|
|
||||||
'color' => $reverse[$tag]['color'],
|
$link = array(
|
||||||
'descr' => $reverse[$tag]['descr']);
|
'tag' => $tag,
|
||||||
$links[] = $link;
|
'color' => $reverse[$tag]['color'],
|
||||||
|
'descr' => $reverse[$tag]['descr']
|
||||||
|
);
|
||||||
|
|
||||||
|
$links[] = $link;
|
||||||
}
|
}
|
||||||
$knownlinks = $links;
|
$knownlinks = $links;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user