Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_WikiPage.php |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | } |
98 | 98 | |
99 | 99 | if ( $value != '' ) { |
100 | | - if ( $value{0} == '#' ) { |
| 100 | + if ( $value[0] == '#' ) { |
101 | 101 | if ( is_null( $this->m_contextPage ) ) { |
102 | 102 | $this->addError( wfMsgForContent( 'smw_notitle', $value ) ); |
103 | 103 | return; |
— | — | @@ -295,7 +295,7 @@ |
296 | 296 | */ |
297 | 297 | public function getWikiValue() { |
298 | 298 | return ( $this->m_fixNamespace == NS_MAIN ? $this->getPrefixedText() : $this->getText() ) . |
299 | | - ( $this->m_fragment ? "#{$this->m_fragment}" : '' ); |
| 299 | + ( $this->m_fragment != '' ? "#{$this->m_fragment}" : '' ); |
300 | 300 | } |
301 | 301 | |
302 | 302 | public function getHash() { |
— | — | @@ -425,7 +425,7 @@ |
426 | 426 | * @return string |
427 | 427 | */ |
428 | 428 | protected function getShortCaptionText() { |
429 | | - if ( $this->m_fragment != '' && $this->m_fragment{0} != '_' ) { |
| 429 | + if ( $this->m_fragment != '' && $this->m_fragment[0] != '_' ) { |
430 | 430 | $fragmentText = '#' . $this->m_fragment; |
431 | 431 | } else { |
432 | 432 | $fragmentText = ''; |
— | — | @@ -444,7 +444,7 @@ |
445 | 445 | * @return string |
446 | 446 | */ |
447 | 447 | protected function getLongCaptionText() { |
448 | | - if ( $this->m_fragment && $this->m_fragment{0} != '_' ) { |
| 448 | + if ( $this->m_fragment != '' && $this->m_fragment[0] != '_' ) { |
449 | 449 | $fragmentText = '#' . $this->m_fragment; |
450 | 450 | } else { |
451 | 451 | $fragmentText = ''; |
— | — | @@ -462,7 +462,7 @@ |
463 | 463 | */ |
464 | 464 | protected function getWikiLinkTarget() { |
465 | 465 | return str_replace( "'", ''', $this->getPrefixedText() ) . |
466 | | - ( $this->m_fragment ? "#{$this->m_fragment}" : '' ); |
| 466 | + ( $this->m_fragment != '' ? "#{$this->m_fragment}" : '' ); |
467 | 467 | } |
468 | 468 | |
469 | 469 | /** |