~eda-qa/brainbrain/main

« back to all changes in this revision

Viewing changes to dist/web/core/BrainBrain.inc

  • Committer: edA-qa mort-ora-y
  • Date: 2010-04-19 07:31:16 UTC
  • Revision ID: eda-qa@disemia.com-20100419073116-bf01if94tdkeaeeq
adding redirect support to app brainentry

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
                if( !array_key_exists( 'metaLookup', $data ) )
204
204
                        $data['metaLookup'] = array( $data['id'] );
205
205
                        
 
206
                if( !array_key_exists( 'resourceBase', $data ) )
 
207
                        $data['resourceBase'] = null;
 
208
                        
206
209
                assert( $data['id'] > 0 );
207
210
                assert( array_key_exists( 'title', $data ) );
208
211
                assert( array_key_exists( 'db', $data ) );
487
490
                $path = rawurlencode( $name );
488
491
                $path = str_replace( '%2F', '/', $path );
489
492
                
490
 
                $url = $this->entry . BrainBrain::NAMESPACE_MEDIA . BrainBrain::TAG_NAMESPACE . "resource"
491
 
                        . BrainBrain::TAG_DELIM . $path;
 
493
                if( $this->resourceBase == null )
 
494
                        $url = $this->entry . BrainBrain::NAMESPACE_MEDIA . BrainBrain::TAG_NAMESPACE . "resource"
 
495
                                . BrainBrain::TAG_DELIM . $path;
 
496
                else
 
497
                        $url = $this->resourceBase . $path;
492
498
                if( $rev != null )
493
499
                        $url .= "?rev=$rev";
494
500