Index: trunk/extensions/SemanticResultFormats/Outline/SRF_Outline.php |
— | — | @@ -199,7 +199,7 @@ |
200 | 200 | $first = true; |
201 | 201 | $field_name = $field->getPrintRequest()->getText( SMW_OUTPUT_HTML ); |
202 | 202 | if ( in_array( $field_name, $this->mOutlineProperties ) ) { |
203 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 203 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
204 | 204 | $field_val = $object->getLongWikiText( $this->mLinker ); |
205 | 205 | $item->addFieldValue( $field_name, $field_val ); |
206 | 206 | } |
Index: trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GoogleBar.php |
— | — | @@ -37,9 +37,9 @@ |
38 | 38 | $count = 0; // How many bars will they be? Needed to calculate the height of the image |
39 | 39 | $max = 0; // the biggest value. needed for scaling |
40 | 40 | while ( $row = $res->getNext() ) { |
41 | | - $name = $row[0]->getNextObject()->getShortWikiText(); |
| 41 | + $name = efSRFGetNextDV( $row[0] )->getShortWikiText(); |
42 | 42 | foreach ( $row as $field ) { |
43 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 43 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
44 | 44 | if ( $object->isNumeric() ) { // use numeric sortkey |
45 | 45 | if ( method_exists( $object, 'getValueKey' ) ) { |
46 | 46 | $nr = $object->getValueKey(); |
Index: trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GooglePie.php |
— | — | @@ -42,9 +42,9 @@ |
43 | 43 | $first = true; |
44 | 44 | $max = 0; // the biggest value. needed for scaling |
45 | 45 | while ( $row = $res->getNext() ) { |
46 | | - $name = $row[0]->getNextObject()->getShortWikiText(); |
| 46 | + $name = efSRFGetNextDV( $row[0] )->getShortWikiText(); |
47 | 47 | foreach ( $row as $field ) { |
48 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 48 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
49 | 49 | if ( $object->isNumeric() ) { // use numeric sortkey |
50 | 50 | if ( method_exists( $object, 'getValueKey' ) ) { |
51 | 51 | $nr = $object->getValueKey(); |
Index: trunk/extensions/SemanticResultFormats/GraphViz/SRF_Graph.php |
— | — | @@ -163,7 +163,7 @@ |
164 | 164 | foreach ( $row as $i => $resultArray ) { |
165 | 165 | |
166 | 166 | // Loop throught all the parts of the field value. |
167 | | - while ( ( $object = $resultArray->getNextObject() ) !== false ) { |
| 167 | + while ( ( $object = efSRFGetNextDV( $resultArray ) ) !== false ) { |
168 | 168 | $propName = $resultArray->getPrintRequest()->getLabel(); |
169 | 169 | $isName = $this->m_nameProperty ? ( $i != 0 && $this->m_nameProperty === $propName ) : $i == 0; |
170 | 170 | |
Index: trunk/extensions/SemanticResultFormats/Exhibit/SRF_Exhibit.php |
— | — | @@ -34,12 +34,13 @@ |
35 | 35 | $row = $res->getNext(); |
36 | 36 | if ( $row != null ) { |
37 | 37 | $tmp = clone $row[0]; |
38 | | - $object = $tmp->getNextObject(); |
| 38 | + $object = efSRFGetNextDV( $tmp ); |
| 39 | + |
39 | 40 | if ( $object instanceof SMWWikiPageValue ) { |
40 | 41 | $value = $object->getPrefixedText(); |
41 | | - if ( strpos( $value, ":" ) ) { |
42 | | - $value = explode( ":", $value, 2 ); |
43 | | - return $value[0] . ":"; |
| 42 | + if ( strpos( $value, ':' ) ) { |
| 43 | + $value = explode( ':', $value, 2 ); |
| 44 | + return $value[0] . ':'; |
44 | 45 | } |
45 | 46 | } |
46 | 47 | return ""; |
— | — | @@ -383,7 +384,7 @@ |
384 | 385 | foreach ( $row as $field ) { |
385 | 386 | $result .= "\t\t<td>"; |
386 | 387 | $textstack = array(); |
387 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 388 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
388 | 389 | switch( $object->getTypeID() ) { |
389 | 390 | case '_wpg': |
390 | 391 | $textstack[] = $object->getLongText( $outputmode, $this->getLinker( 0 ) ); |
Index: trunk/extensions/SemanticResultFormats/Gallery/SRF_Gallery.php |
— | — | @@ -79,14 +79,14 @@ |
80 | 80 | |
81 | 81 | for ( $i = 0, $n = count( $row ); $i < $n; $i++ ) { // Properties |
82 | 82 | if ( $row[$i]->getPrintRequest()->getLabel() == $imageProperty ) { |
83 | | - while ( ( $obj = $row[$i]->getNextObject() ) !== false ) { // Property values |
| 83 | + while ( ( $obj = efSRFGetNextDV( $row[$i] ) ) !== false ) { // Property values |
84 | 84 | if ( $obj->getTypeID() == '_wpg' ) { |
85 | 85 | $images[] = $obj->getTitle(); |
86 | 86 | } |
87 | 87 | } |
88 | 88 | } |
89 | 89 | else if ( $row[$i]->getPrintRequest()->getLabel() == $captionProperty ) { |
90 | | - while ( ( $obj = $row[$i]->getNextObject() ) !== false ) { // Property values |
| 90 | + while ( ( $obj = efSRFGetNextDV( $row[$i] ) ) !== false ) { // Property values |
91 | 91 | $captions[] = $obj->getShortText( SMW_OUTPUT_HTML, $this->getLinker( true ) ); |
92 | 92 | } |
93 | 93 | } |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | protected function addImagePages( SMWQueryResult $results, ImageGallery &$ig ) { |
117 | 117 | while ( $row = $results->getNext() ) { |
118 | 118 | $firstField = $row[0]; |
119 | | - $nextObject = $firstField->getNextObject(); |
| 119 | + $nextObject = efSRFGetNextDV( $firstField ); |
120 | 120 | |
121 | 121 | if ( $nextObject !== false ) { |
122 | 122 | $imgTitle = $nextObject->getTitle(); |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | |
125 | 125 | // Is there a property queried for display with ?property |
126 | 126 | if ( isset( $row[1] ) ) { |
127 | | - $imgCaption = $row[1]->getNextObject(); |
| 127 | + $imgCaption = efSRFGetNextDV( $row[1] ); |
128 | 128 | if ( is_object( $imgCaption ) ) { |
129 | 129 | $imgCaption = $imgCaption->getShortText( SMW_OUTPUT_HTML, $this->getLinker( true ) ); |
130 | 130 | } |
Index: trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | |
127 | 127 | while ( /* array of SMWResultArray */ $row = $results->getNext() ) { // Objects (pages) |
128 | 128 | for ( $i = 0, $n = count( $row ); $i < $n; $i++ ) { // Properties |
129 | | - while ( ( $obj = $row[$i]->getNextObject() ) !== false ) { // Property values |
| 129 | + while ( ( $obj = efSRFGetNextDV( $row[$i] ) ) !== false ) { // Property values |
130 | 130 | |
131 | 131 | // If the main object should not be included, skip it. |
132 | 132 | // The isMainObject method was added in SMW 1.5.6, so this can only be done correctly if it's available. |
Index: trunk/extensions/SemanticResultFormats/Ploticus/SRF_Ploticus.php |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | $row_items = array(); |
147 | 147 | foreach ( $row as $field ) { |
148 | 148 | $growing = array(); |
149 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 149 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
150 | 150 | $text = Sanitizer::decodeCharReferences( $object->getXSDValue() ); |
151 | 151 | // decode: CSV knows nothing of possible HTML entities |
152 | 152 | $growing[] = $text; |
Index: trunk/extensions/SemanticResultFormats/Timeline/SRF_Timeline.php |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | $date_value = $pr->getData()->getXSDValue(); |
174 | 174 | } |
175 | 175 | |
176 | | - while ( ( $object = $field->getNextObject() ) !== false ) { // Loop over property values |
| 176 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { // Loop over property values |
177 | 177 | $event = $this->handlePropertyValue( |
178 | 178 | $object, $outputmode, $pr, $first_col, $hastitle, $hastime, |
179 | 179 | $first_value, $isEventline, $curmeta, $curdata, $date_value, $output |
Index: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | $pr = $field->getPrintRequest(); |
78 | 78 | $text .= '|' . ( $i + 1 ) . '='; |
79 | 79 | |
80 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 80 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
81 | 81 | if ( $object->getTypeID() == '_dat' ) { |
82 | 82 | $text .= $object->getLongWikiText(); |
83 | 83 | } elseif ( $object->getTypeID() == '_wpg' ) { // use shorter "LongText" for wikipage |
— | — | @@ -107,7 +107,7 @@ |
108 | 108 | // for this property |
109 | 109 | $textForProperty = ''; |
110 | 110 | |
111 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 111 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
112 | 112 | if ( $object->getTypeID() == '_dat' ) { |
113 | 113 | // don't add date values to the display |
114 | 114 | } elseif ( $object->getTypeID() == '_wpg' ) { // use shorter "LongText" for wikipage |
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotPie.php |
— | — | @@ -117,10 +117,10 @@ |
118 | 118 | $pie_data = array(); |
119 | 119 | // print all result rows |
120 | 120 | while ( $row = $res->getNext() ) { |
121 | | - $name = $row[0]->getNextObject()->getShortWikiText(); |
| 121 | + $name = efSRFGetNextDV( $row[0] )->getShortWikiText(); |
122 | 122 | $name = str_replace( "'", "\'", $name ); |
123 | 123 | foreach ( $row as $field ) { |
124 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 124 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
125 | 125 | if ( $object->isNumeric() ) { // use numeric sortkey |
126 | 126 | if ( method_exists( $object, 'getValueKey' ) ) { |
127 | 127 | $nr = $object->getValueKey(); |
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotBar.php |
— | — | @@ -151,10 +151,10 @@ |
152 | 152 | $max_number = 0; |
153 | 153 | $min_number = 0; |
154 | 154 | while ( $row = $res->getNext() ) { |
155 | | - $name = $row[0]->getNextObject()->getShortWikiText(); |
| 155 | + $name = efSRFGetNextDV( $row[0] )->getShortWikiText(); |
156 | 156 | $name = str_replace( "'", "\'", $name ); |
157 | 157 | foreach ( $row as $field ) { |
158 | | - while ( ( $object = $field->getNextObject() ) !== false ) { |
| 158 | + while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
159 | 159 | if ( $object->isNumeric() ) { // use numeric sortkey |
160 | 160 | if ( method_exists( $object, 'getValueKey' ) ) { |
161 | 161 | $nr = $object->getValueKey(); |