File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,9 @@ function view_file_exists($filename)
4040 */
4141function view_cache_safe ($ url )
4242{
43- $ myview = \Phalcon \DI ::getDefault ()->get ('view ' );
44-
45- if (!empty ($ myview ->product_hash )) {
46- return "{$ url }?v= {$ myview ->product_hash }" ;
43+ $ info = stat ('/usr/local/opnsense/www/index.php ' );
44+ if (!empty ($ info ['mtime ' ])) {
45+ return "{$ url }?v= " . substr (md5 ($ info ['mtime ' ]), 0 , 16 );
4746 }
4847
4948 return $ url ;
Original file line number Diff line number Diff line change @@ -63,10 +63,9 @@ function html_safe($text)
6363
6464function cache_safe ($ url )
6565{
66- global $ g ;
67-
68- if (!empty ($ g ['product_hash ' ])) {
69- return "{$ url }?v= {$ g ['product_hash ' ]}" ;
66+ $ info = stat ('/usr/local/opnsense/www/index.php ' );
67+ if (!empty ($ info ['mtime ' ])) {
68+ return "{$ url }?v= " . substr (md5 ($ info ['mtime ' ]), 0 , 16 );
7069 }
7170
7271 return $ url ;
You can’t perform that action at this time.
0 commit comments