Changeset 16815
- Timestamp:
- 07/08/08 15:46:44 (5 months ago)
- Files:
-
- trunk/midcom/midcom.core/midcom/services/auth.php (modified) (2 diffs)
- trunk/midcom/midcom.helper.search/viewer.php (modified) (1 diff)
- trunk/midcom/midcom.helper.xsspreventer/main.php (modified) (1 diff)
- trunk/midcom/midgard.admin.asgard/navigation.php (modified) (1 diff)
- trunk/midcom/org.openpsa.invoices/style/show-list-item.php (modified) (1 diff)
- trunk/midcom/org.routamc.positioning/lib/fireeagle.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.core/midcom/services/auth.php
r16607 r16815 717 717 */ 718 718 function can_do($privilege, &$content_object, $user = null) 719 { 719 { 720 720 if ( $privilege != 'midgard:read' 721 721 && $_MIDGARD['sitegroup'] != 0 … … 723 723 { 724 724 return false; 725 } 725 } 726 726 return $this->can_do_byguid($privilege, $content_object->guid, get_class($content_object), $user); 727 727 } trunk/midcom/midcom.helper.search/viewer.php
r16112 r16815 316 316 $data['shown_documents'] = $last_document_id - $first_document_id + 1; 317 317 $data['results_per_page'] = $results_per_page; 318 $data['all_results'] =& $result;318 $data['all_results'] =& $result; 319 319 $data['result'] = array_slice($result, $first_document_id, $results_per_page); 320 320 // Register GUIDs for cache engine trunk/midcom/midcom.helper.xsspreventer/main.php
r16079 r16815 39 39 return preg_replace_callback 40 40 ( 41 "%(<\s*)+(/\s*)+{$element}%i",41 "%(<\s*)+(/\s*)+{$element}%i", 42 42 create_function 43 43 ( 44 '$matches',45 'return htmlentities($matches[0]);'44 '$matches', 45 'return htmlentities($matches[0]);' 46 46 ), 47 47 $input trunk/midcom/midgard.admin.asgard/navigation.php
r16301 r16815 1 <?php1 <?php 2 2 /** 3 3 * @package midgard.admin.asgard trunk/midcom/org.openpsa.invoices/style/show-list-item.php
r16722 r16815 39 39 { 40 40 if ($_MIDCOM->auth->can_do('midgard:update', $data['invoice']) 41 && isset($data['next_marker']))41 && isset($data['next_marker'])) 42 42 { 43 43 $next_marker_url = $prefix . "invoice/mark_" . $data['next_marker'] . "/" . $data['invoice']->guid . ".html"; trunk/midcom/org.routamc.positioning/lib/fireeagle.php
r16642 r16815 74 74 75 75 function __construct($consumerKey, 76 $consumerSecret,77 $oAuthToken = null,78 $oAuthTokenSecret = null) {76 $consumerSecret, 77 $oAuthToken = null, 78 $oAuthTokenSecret = null) { 79 79 $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); 80 80 $this->consumer = new OAuthConsumer($consumerKey, $consumerSecret, NULL); … … 152 152 $r->user->best_guess = NULL; 153 153 foreach ($r->user->location_hierarchy as &$loc) { 154 $c = $loc->geometry->coordinates;155 switch ($loc->geometry->type) {156 case 'Box': // DEPRECATED157 $loc->bbox = $c;158 $loc->longitude = ($c[0][0] + $c[1][0]) / 2;159 $loc->latitude = ($c[0][1] + $c[1][1]) / 2;160 $loc->geotype = 'box';161 break;162 case 'Polygon':163 $loc->bbox = $bbox = $loc->geometry->bbox;164 $loc->longitude = ($bbox[0][0] + $bbox[1][0]) / 2;165 $loc->latitude = ($bbox[0][1] + $bbox[1][1]) / 2;166 $loc->geotype = 'box';167 break;168 case 'Point':169 list($loc->longitude, $loc->latitude) = $c;170 $loc->geotype = 'point';171 break;172 }173 if ($loc->best_guess) $r->user->best_guess = $loc; // add shortcut to get 'best guess' loc174 unset($loc);154 $c = $loc->geometry->coordinates; 155 switch ($loc->geometry->type) { 156 case 'Box': // DEPRECATED 157 $loc->bbox = $c; 158 $loc->longitude = ($c[0][0] + $c[1][0]) / 2; 159 $loc->latitude = ($c[0][1] + $c[1][1]) / 2; 160 $loc->geotype = 'box'; 161 break; 162 case 'Polygon': 163 $loc->bbox = $bbox = $loc->geometry->bbox; 164 $loc->longitude = ($bbox[0][0] + $bbox[1][0]) / 2; 165 $loc->latitude = ($bbox[0][1] + $bbox[1][1]) / 2; 166 $loc->geotype = 'box'; 167 break; 168 case 'Point': 169 list($loc->longitude, $loc->latitude) = $c; 170 $loc->geotype = 'point'; 171 break; 172 } 173 if ($loc->best_guess) $r->user->best_guess = $loc; // add shortcut to get 'best guess' loc 174 unset($loc); 175 175 } 176 176 } … … 254 254 $url_bits = parse_url($url); 255 255 if (isset($postData)) { 256 self::dump("POST ".$url_bits['path']." HTTP/1.0\nHost: ".$url_bits['host']."\nContent-Type: application/x-www-urlencoded\nContent-Length: ".strlen($postData)."\n\n$postData\n");256 self::dump("POST ".$url_bits['path']." HTTP/1.0\nHost: ".$url_bits['host']."\nContent-Type: application/x-www-urlencoded\nContent-Length: ".strlen($postData)."\n\n$postData\n"); 257 257 } else { 258 $get_url = $url_bits['path'];259 if ($url_bits['query']) $get_url .= '?' . $url_bits['query'];260 self::dump("GET $get_url HTTP/1.0\nHost: ".$url_bits['host']."\n\n");258 $get_url = $url_bits['path']; 259 if ($url_bits['query']) $get_url .= '?' . $url_bits['query']; 260 self::dump("GET $get_url HTTP/1.0\nHost: ".$url_bits['host']."\n\n"); 261 261 } 262 262 }
