GIT.Harvie.CZ
/
mirrors
/
SokoMan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4ece8e8
)
Je mozny vygooglit model jednim kliknutim, escapuje se URL v relacnich lincich
author
Thomas Mudrunka
<tomas@mudrunka.cz>
Sat, 22 Oct 2011 14:20:54 +0000
(16:20 +0200)
committer
Thomas Mudrunka
<tomas@mudrunka.cz>
Sat, 22 Oct 2011 14:20:54 +0000
(16:20 +0200)
index.php
patch
|
blob
|
blame
|
history
diff --git
a/index.php
b/index.php
index 7361d3053532e26d7fabcfa3ad96a5c668253b14..40b215fcf0d8121e33284b10d2548b4f67bd4f7f 100755
(executable)
--- a/
index.php
+++ b/
index.php
@@
-296,7
+296,8
@@
EOF;
$relations = array( //TODO: Autodetect???
'model' => array(
'model_id' => array(array('item',$where_url)),
$relations = array( //TODO: Autodetect???
'model' => array(
'model_id' => array(array('item',$where_url)),
- 'model_barcode' => array(array('store','assistant/%d?barcode=%v'))
+ 'model_barcode' => array(array('store','assistant/%d?barcode=%v')),
+ 'model_name' => array(array('google','http://google.com/search?q=%v',true))
),
'item' => array(
'item_serial' => array(array('dispose','assistant/%d?serial=%v'),array('sell','assistant/%d?serial=%v'))
),
'item' => array(
'item_serial' => array(array('dispose','assistant/%d?serial=%v'),array('sell','assistant/%d?serial=%v'))
@@
-313,10
+314,10
@@
EOF;
foreach($relations[$class][$column] as $destination) {
$destination_url = str_replace(
array('%d','%c','%v'),
foreach($relations[$class][$column] as $destination) {
$destination_url = str_replace(
array('%d','%c','%v'),
- array(
$destination[0],$column,$value
),
+ array(
urlencode($destination[0]),urlencode($column),urlencode($value)
),
$destination[1]
);
$destination[1]
);
- @$table[$id][$class.$suffix_relations] .= $this->link($destination[0], $destination_url).',';
+ @$table[$id][$class.$suffix_relations] .= $this->link($destination[0], $destination_url
, !isset($destination[2])
).',';
}
}
}
}
}
}
This page took
0.139019 seconds
and
4
git commands to generate.