Changeset 923
- Timestamp:
- 09/18/07 16:44:42 (1 year ago)
- Files:
-
- trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisConfig.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisPageElement.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisProcessor.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/websites/memphis/stubMemphisPageElementTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisConfig.php
r887 r923 132 132 { 133 133 if (isset($this->config['parts'][$part]) == true && isset($this->config['parts'][$part]['defaultElements']) == true) { 134 $this->config['parts'][$part]['defaultElements'];134 return $this->config['parts'][$part]['defaultElements']; 135 135 } 136 136 … … 158 158 159 159 /** 160 * returns a list of configured frames 161 * 162 * @return string 163 */ 164 public function getFrames() 165 { 166 return array_keys($this->config['frames']); 167 } 168 169 /** 160 170 * returns a list of meta tags 161 171 * trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisPageElement.php
r802 r923 41 41 } 42 42 43 if (count($this->parts) == 0) { 44 return true; 45 } 46 43 47 return in_array($context['part'], $this->parts); 44 48 } trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisProcessor.php
r814 r923 147 147 { 148 148 if ($this->request->hasValue('frame') == true) { 149 $frame = $this->request->getValidatedValue(new stubPreSelectValidator(array_keys($this->config['frames'])), 'frame'); 149 $frame = $this->request->getValidatedValue(new stubPreSelectValidator(array_keys($this->config->getFrames())), 'frame'); 150 } elseif ($this->session->hasValue('net.stubbles.websites.memphis.frame') == true) { 151 $frame = $this->session->getValue('net.stubbles.websites.memphis.frame'); 150 152 } else { 151 153 $frame = $page->getProperty('frame'); trunk/src/test/php/net/stubbles/websites/memphis/stubMemphisPageElementTestCase.php
r801 r923 83 83 $context = array('part' => 'dummy'); 84 84 $this->assertFalse($this->memphisPageElement->isAvailable($this->mockRequest, $this->mockSession, $this->mockResponse)); 85 $this->assert False($this->memphisPageElement->isAvailable($this->mockRequest, $this->mockSession, $this->mockResponse, $context));85 $this->assertTrue($this->memphisPageElement->isAvailable($this->mockRequest, $this->mockSession, $this->mockResponse, $context)); 86 86 $this->memphisPageElement->setParts('foo,bar, baz'); 87 87 $this->assertFalse($this->memphisPageElement->isAvailable($this->mockRequest, $this->mockSession, $this->mockResponse, $context));
