Welcome Guest, Not a member yet? Register   Sign In
Carabiner 1.0: Asset Management Library
#16

[eluser]tonydewan[/eluser]
DannyD:

Thanks for the feedback! The first bug you provided comes from not setting all 3 possible attributes in your array. Your fix doesn't quite work, but something like this will:

Code:
if( is_array($dev_file) ){
            
            if( is_array($dev_file[0]) ){
            
                foreach($dev_file as $file){
                    
                    $d = $file[0];
                    $p = (isset($file[1])) ? $file[1] : '';
                    $c = (isset($file[2])) ? $file[2] : $combine;

                    $this->_asset('js', $d, $p, $c);
                
                }
                
            }else{
                
                $d = $dev_file[0];
                $p = (isset($dev_file[1])) ? $dev_file[1] : '';
                $c = (isset($dev_file[2])) ? $dev_file[2] : $combine;
                
                $this->_asset('js', $d, $p, $c);
                
            }
            
        }else{
        
            $this->_asset('js', $dev_file, $prod_file, $combine);
    
        }

Your second bug is also a great find. However, you don't need to set
Code:
$f = $f;
You can just remove that line altogether.

I'll be updating the library to include these fixes. Thanks!



umefarooq:

I haven't got access to a Windows server to test on, but I think this might fix your problem. In the function called _minify, change both lines that look like this:
Code:
$contents = file_get_contents($this->style_path.$file_ref, 'r');

to this:
Code:
$contents = file_get_contents( realpath($this->script_path.$file_ref) );

I think that will fix your problem, but I'm not sure. Let me know if it does, and I'll update the library with those fixes as well.

Note that you'll probably get the same error again, but from a different part of the library. There are four calls to file_get_contents in the _combine function, that will need a similar change.

Thanks for the feedback, everyone.


Messages In This Thread
Carabiner 1.0: Asset Management Library - by El Forum - 01-28-2009, 07:23 PM
Carabiner 1.0: Asset Management Library - by El Forum - 01-28-2009, 07:30 PM
Carabiner 1.0: Asset Management Library - by El Forum - 01-28-2009, 09:26 PM
Carabiner 1.0: Asset Management Library - by El Forum - 01-28-2009, 09:56 PM
Carabiner 1.0: Asset Management Library - by El Forum - 01-28-2009, 10:07 PM
Carabiner 1.0: Asset Management Library - by El Forum - 01-28-2009, 10:16 PM
Carabiner 1.0: Asset Management Library - by El Forum - 01-28-2009, 10:24 PM
Carabiner 1.0: Asset Management Library - by El Forum - 01-28-2009, 11:26 PM
Carabiner 1.0: Asset Management Library - by El Forum - 01-29-2009, 12:48 AM
Carabiner 1.0: Asset Management Library - by El Forum - 01-29-2009, 04:58 AM
Carabiner 1.0: Asset Management Library - by El Forum - 01-29-2009, 07:23 AM
Carabiner 1.0: Asset Management Library - by El Forum - 01-30-2009, 05:47 AM
Carabiner 1.0: Asset Management Library - by El Forum - 01-30-2009, 03:22 PM
Carabiner 1.0: Asset Management Library - by El Forum - 02-01-2009, 12:35 AM
Carabiner 1.0: Asset Management Library - by El Forum - 02-01-2009, 04:28 AM
Carabiner 1.0: Asset Management Library - by El Forum - 02-02-2009, 08:44 AM
Carabiner 1.0: Asset Management Library - by El Forum - 02-02-2009, 08:54 AM
Carabiner 1.0: Asset Management Library - by El Forum - 02-06-2009, 12:07 PM
Carabiner 1.0: Asset Management Library - by El Forum - 02-06-2009, 04:00 PM
Carabiner 1.0: Asset Management Library - by El Forum - 02-07-2009, 01:06 AM
Carabiner 1.0: Asset Management Library - by El Forum - 02-09-2009, 01:11 AM
Carabiner 1.0: Asset Management Library - by El Forum - 02-11-2009, 09:12 AM
Carabiner 1.0: Asset Management Library - by El Forum - 02-13-2009, 02:31 PM
Carabiner 1.0: Asset Management Library - by El Forum - 02-13-2009, 03:05 PM
Carabiner 1.0: Asset Management Library - by El Forum - 03-08-2009, 07:40 AM
Carabiner 1.0: Asset Management Library - by El Forum - 03-08-2009, 08:57 AM
Carabiner 1.0: Asset Management Library - by El Forum - 03-08-2009, 09:20 AM
Carabiner 1.0: Asset Management Library - by El Forum - 03-08-2009, 09:46 AM
Carabiner 1.0: Asset Management Library - by El Forum - 03-08-2009, 10:38 AM
Carabiner 1.0: Asset Management Library - by El Forum - 08-25-2009, 04:00 PM
Carabiner 1.0: Asset Management Library - by El Forum - 08-27-2009, 06:39 AM
Carabiner 1.0: Asset Management Library - by El Forum - 08-27-2009, 07:46 AM
Carabiner 1.0: Asset Management Library - by El Forum - 08-26-2010, 01:00 AM
Carabiner 1.0: Asset Management Library - by El Forum - 08-26-2010, 07:58 AM
Carabiner 1.0: Asset Management Library - by El Forum - 08-27-2010, 01:54 AM
Carabiner 1.0: Asset Management Library - by El Forum - 08-27-2010, 02:04 AM
Carabiner 1.0: Asset Management Library - by El Forum - 08-27-2010, 05:33 PM
Carabiner 1.0: Asset Management Library - by El Forum - 08-27-2010, 08:37 PM
Carabiner 1.0: Asset Management Library - by El Forum - 08-28-2010, 09:53 PM
Carabiner 1.0: Asset Management Library - by El Forum - 09-11-2010, 05:35 AM
Carabiner 1.0: Asset Management Library - by El Forum - 08-22-2012, 08:09 AM
Carabiner 1.0: Asset Management Library - by El Forum - 11-09-2012, 07:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB