Changeset 14085
- Timestamp:
- 12/22/07 13:33:15 (10 months ago)
- Files:
-
- trunk/midcom/cc.kaktus.pearserver/admin.php (modified) (1 diff)
- trunk/midcom/cc.kaktus.todo/handler/list.php (modified) (1 diff)
- trunk/midcom/cc.kaktus.todo/handler/new.php (modified) (1 diff)
- trunk/midcom/com.magnettechnologies.contactgrabber/config.php (modified) (4 diffs)
- trunk/midcom/com.magnettechnologies.contactgrabber/contactgrabber.php (modified) (6 diffs)
- trunk/midcom/de.linkm.fontrenderer/main.php (modified) (21 diffs)
- trunk/midcom/de.linkm.fontrenderer/midcom/interfaces.php (modified) (3 diffs)
- trunk/midcom/fi.mik.lentopaikkakisa/admin.php (modified) (2 diffs)
- trunk/midcom/fi.mik.lentopaikkakisa/flight.php (modified) (3 diffs)
- trunk/midcom/midcom.admin.folder/handler/index.php (modified) (5 diffs)
- trunk/midcom/midcom.admin.folder/midcom/interfaces.php (modified) (3 diffs)
- trunk/midcom/midcom.core/midcom/baseclasses/components/interface.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/baseclasses/components/purecode.php (modified) (2 diffs)
- trunk/midcom/midcom.core/midcom/baseclasses/components/request.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/helper/misc.php (modified) (2 diffs)
- trunk/midcom/midcom.core/midcom/services/indexer/document/datamanager.php (modified) (16 diffs)
- trunk/midcom/midcom.core/midcom/services/rcs/backend.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/services/rcs/backend/rcs.php (modified) (47 diffs)
- trunk/midcom/midcom.core/midcom/services/rcs/config.php (modified) (2 diffs)
- trunk/midcom/midcom.core/midcom/services/rcs/handler/rcs.php (modified) (14 diffs)
- trunk/midcom/midcom.helper.datamanager/datamanager.php (modified) (5 diffs)
- trunk/midcom/midcom.helper.datamanager2/widget/captcha.php (modified) (1 diff)
- trunk/midcom/midgard.admin.asgard/handler/object/rcs.php (modified) (38 diffs)
- trunk/midcom/midgard.webdav.styles/dav.php (modified) (1 diff)
- trunk/midcom/net.nemein.bannedwords/editor.php (modified) (6 diffs)
- trunk/midcom/net.nemein.bannedwords/formatters.php (modified) (1 diff)
- trunk/midcom/net.nemein.bannedwords/main.php (modified) (3 diffs)
- trunk/midcom/net.nemein.bannedwords/midcom/interfaces.php (modified) (3 diffs)
- trunk/midcom/net.nemein.bannedwords/word.php (modified) (1 diff)
- trunk/midcom/net.nemein.calendar/functions.php (modified) (1 diff)
- trunk/midcom/net.nemein.discussion/helper_email_import.php (modified) (5 diffs)
- trunk/midcom/net.nemein.discussion/post.php (modified) (21 diffs)
- trunk/midcom/net.nemein.discussion/thread.php (modified) (4 diffs)
- trunk/midcom/net.nemein.favourites/admin.php (modified) (7 diffs)
- trunk/midcom/net.nemein.favourites/favourite.php (modified) (2 diffs)
- trunk/midcom/net.nemein.favourites/midcom/interfaces.php (modified) (3 diffs)
- trunk/midcom/net.nemein.favourites/navigation.php (modified) (1 diff)
- trunk/midcom/net.nemein.favourites/viewer.php (modified) (7 diffs)
- trunk/midcom/net.nemein.featured/admin.php (modified) (6 diffs)
- trunk/midcom/net.nemein.featured/featured.php (modified) (2 diffs)
- trunk/midcom/net.nemein.featured/midcom/interfaces.php (modified) (4 diffs)
- trunk/midcom/net.nemein.featured/navigation.php (modified) (1 diff)
- trunk/midcom/net.nemein.featured/viewer.php (modified) (5 diffs)
- trunk/midcom/net.nemein.payment/handler.php (modified) (1 diff)
- trunk/midcom/net.nemein.quickpoll/option.php (modified) (1 diff)
- trunk/midcom/net.nemein.quickpoll/vote.php (modified) (2 diffs)
- trunk/midcom/net.nemein.tag/tag.php (modified) (4 diffs)
- trunk/midcom/net.nemein.tag/tag_link.php (modified) (13 diffs)
- trunk/midcom/no.bergfald.rcs/backends/aegir_rcs_functions.php (modified) (24 diffs)
- trunk/midcom/no.bergfald.rcs/backends/aegirrcs.php (modified) (35 diffs)
- trunk/midcom/no.bergfald.rcs/backends/nemein_rcs_functions.php (modified) (1 diff)
- trunk/midcom/no.bergfald.rcs/tests/test_aegirrcs.php (modified) (5 diffs)
- trunk/midcom/no.odindata.quickform2/factory.php (modified) (1 diff)
- trunk/midcom/org.maemo.calendar/calendar_midcomdba.php (modified) (1 diff)
- trunk/midcom/org.maemo.calendar/handler/ajax.php (modified) (16 diffs)
- trunk/midcom/org.maemo.gforgeprofileupdater/main.php (modified) (7 diffs)
- trunk/midcom/org.openpsa.calendar/calendar_midcomdba.php (modified) (2 diffs)
- trunk/midcom/org.openpsa.calendar/event_resource.php (modified) (1 diff)
- trunk/midcom/org.openpsa.calendar/participant_midcomdba.php (modified) (3 diffs)
- trunk/midcom/org.openpsa.calendar/resource.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contacts/buddy.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contacts/duplicates.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contacts/duplicates_merge.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contacts/group_handler.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contacts/group_midcomdba.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contacts/mfa.php (modified) (35 diffs)
- trunk/midcom/org.openpsa.contacts/person_handler.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contacts/person_midcomdba.php (modified) (5 diffs)
- trunk/midcom/org.openpsa.contacts/viewer.php (modified) (4 diffs)
- trunk/midcom/org.openpsa.directmarketing/campaign.php (modified) (2 diffs)
- trunk/midcom/org.openpsa.directmarketing/campaign_member.php (modified) (1 diff)
- trunk/midcom/org.openpsa.directmarketing/campaign_message.php (modified) (1 diff)
- trunk/midcom/org.openpsa.directmarketing/campaign_message_receipt.php (modified) (1 diff)
- trunk/midcom/org.openpsa.directmarketing/link_log.php (modified) (2 diffs)
- trunk/midcom/org.openpsa.directmarketing/query.php (modified) (1 diff)
- trunk/midcom/org.openpsa.directmarketing/support/bounce_detector.php (modified) (1 diff)
- trunk/midcom/org.openpsa.directmarketing/support/link_detector.php (modified) (1 diff)
- trunk/midcom/org.openpsa.directmarketing/viewer.php (modified) (9 diffs)
- trunk/midcom/org.openpsa.helpers/ajax.php (modified) (1 diff)
- trunk/midcom/org.openpsa.helpers/messages.php (modified) (1 diff)
- trunk/midcom/org.openpsa.helpers/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/org.openpsa.helpers/resources.php (modified) (1 diff)
- trunk/midcom/org.openpsa.helpers/schema_modifier.php (modified) (1 diff)
- trunk/midcom/org.openpsa.helpers/task_groups.php (modified) (1 diff)
- trunk/midcom/org.openpsa.helpers/tasks.php (modified) (1 diff)
- trunk/midcom/org.openpsa.helpers/vx_parser.php (modified) (2 diffs)
- trunk/midcom/org.openpsa.helpers/workgroups.php (modified) (1 diff)
- trunk/midcom/org.openpsa.jabber/admin.php (modified) (1 diff)
- trunk/midcom/org.openpsa.jabber/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/org.openpsa.products/businessarea.php (modified) (1 diff)
- trunk/midcom/org.openpsa.products/businessarea_member.php (modified) (1 diff)
- trunk/midcom/org.openpsa.products/product.php (modified) (1 diff)
- trunk/midcom/org.openpsa.products/product_member.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/admin.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/expense_midcomdba.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/hour_report_midcomdba.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/hours_widget.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/resource_midcomdba.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/task_midcomdba.php (modified) (4 diffs)
- trunk/midcom/org.openpsa.qbpager/pager.php (modified) (1 diff)
- trunk/midcom/org.openpsa.qbpager/pager_direct.php (modified) (1 diff)
- trunk/midcom/org.openpsa.sales/salesproject_deliverable.php (modified) (1 diff)
- trunk/midcom/org.routamc.gallery/handler/view.php (modified) (1 diff)
- trunk/midcom/org.routamc.gallery/midcom/interfaces.php (modified) (2 diffs)
- trunk/midcom/org.routamc.photostream/handler/api/email.php (modified) (25 diffs)
- trunk/midcom/org.routamc.photostream/handler/api/metaweblog.php (modified) (55 diffs)
- trunk/midcom/org.routamc.photostream/handler/feed.php (modified) (2 diffs)
- trunk/midcom/org.routamc.positioning/importer/plazes.php (modified) (9 diffs)
- trunk/midcom/org.routamc.statusmessage/handler/list.php (modified) (9 diffs)
- trunk/midcom/pl.olga.mnogosearch/navigation.php (modified) (2 diffs)
- trunk/midcom/pl.olga.mnogosearch/viewer.php (modified) (2 diffs)
- trunk/midcom/pl.olga.windguru/midcom/interfaces.php (modified) (2 diffs)
- trunk/midcom/se.anykey.activecalendar/activecalendar.php (modified) (1 diff)
- trunk/midcom/se.anykey.activecalendar/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/se.anykey.mmslib/midcom/interfaces.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/cc.kaktus.pearserver/admin.php
r14084 r14085 13 13 * Dummy class stub. 14 14 * 15 * @package cc.kaktus _pearserver15 * @package cc.kaktus.pearserver 16 16 */ 17 17 class cc_kaktus_pearserver_admin extends midcom_baseclasses_components_request_admin trunk/midcom/cc.kaktus.todo/handler/list.php
r14082 r14085 7 7 */ 8 8 9 /** 10 * @package cc.kaktus.todo 11 */ 9 12 class cc_kaktus_todo_handler_list extends midcom_baseclasses_components_handler 10 13 { trunk/midcom/cc.kaktus.todo/handler/new.php
r14082 r14085 7 7 */ 8 8 9 /** 10 * @package cc.kaktus.todo 11 */ 9 12 class cc_kaktus_todo_handler_new extends midcom_baseclasses_components_handler 10 13 { trunk/midcom/com.magnettechnologies.contactgrabber/config.php
r11454 r14085 1 1 <?php 2 /** 3 * @package com.magnettechnologies.contactgrabber 4 * @author The Midgard Project, http://www.midgard-project.org 5 * @copyright The Midgard Project, http://www.midgard-project.org 6 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 7 */ 2 8 3 9 /** … … 6 12 * Released 9th May, 2007 7 13 * Author: Magnet Technologies, vishal.kothari@magnettechnologies.com 8 * Credits: Janak Prajapati, Pravin Shukla, Tapan Moharana 14 * Credits: Janak Prajapati, Pravin Shukla, Tapan Moharana 9 15 * Copyright (C) 2007 10 16 … … 26 32 // Write full path to this istallation directory 27 33 // example: '/home/user/public_html/contacts' (linux) 28 // 34 // 29 35 //$DIR_PATH = "/home/uploads/public_html/contacts"; 30 36 $DIR_PATH = ""; … … 32 38 // Write the path of curl installation 33 39 // example: '/usr/local/bin/curl' (linux) 34 // 40 // 35 41 //$CURL_PATH = "/usr/local/bin/curl"; 36 42 $CURL_PATH = "/usr/bin/curl"; trunk/midcom/com.magnettechnologies.contactgrabber/contactgrabber.php
r12534 r14085 1 1 <?php 2 3 2 /** 4 * This is some kind of a wrapper for the contactcrabber. 5 */ 3 * This is some kind of a wrapper for the contactcrabber. 4 * 5 * @package com.magnettechnologies.contactgrabber 6 * @author The Midgard Project, http://www.midgard-project.org 7 * @copyright The Midgard Project, http://www.midgard-project.org 8 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 9 */ 6 10 7 11 /** 8 * Contact Grabber 12 * Contact Grabber 9 13 * Version 0.3 10 14 * Released 9th May, 2007 … … 26 30 * along with this program; if not, write to the Free Software 27 31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 32 * 33 * @package com.magnettechnologies.contactgrabber 28 34 **/ 29 30 31 35 class com_magnettechnologies_contactgrabber extends midcom_baseclasses_components_purecode 32 36 { … … 61 65 if( isset($_POST['domain']) 62 66 && isset($_POST['username']) 63 && isset($_POST['password'])) 67 && isset($_POST['password'])) 64 68 { 65 69 if($_POST['domain']=="rediff.com") … … 67 71 require("lib/rediff/grabRediff.class.php"); 68 72 $this->_email = $_POST['username']; 69 $this->_resource_obj = new rediff(); 73 $this->_resource_obj = new rediff(); 70 74 } 71 75 … … 140 144 { 141 145 midcom_show_style('search-form'); 142 146 143 147 /* 144 148 <li class="ay" id="itab_item_yahoo"><a href="#invite_yahoo"></a></li> 145 149 --- 146 <li class="ay" id="itab_item_myspace"><a href="#invite_myspace"></a></li> 150 <li class="ay" id="itab_item_myspace"><a href="#invite_myspace"></a></li> 147 151 <li class="ay" id="itab_item_hotmail"><a href="#invite_hotmail"></a></li> 148 152 ---- 149 153 150 154 <div class="tabs_content" id="invite_yahoo"> 151 155 <h2>Invite your Yahoo friends</h2> … … 182 186 <?php echo $_MIDCOM->i18n->get_string('no details are stored', 'com.magnettechnologies.contactgrabber'); ?> 183 187 </div> 184 </div> 188 </div> 185 189 <div class="tabs_content" id="invite_hotmail" style="display: none;"> 186 190 <h2>Invite your Hotmail friends</h2> trunk/midcom/de.linkm.fontrenderer/main.php
r13424 r14085 1 1 <?php 2 2 /** 3 * @package de.linkm.fontrenderer 4 * @author The Midgard Project, http://www.midgard-project.org 5 * @copyright The Midgard Project, http://www.midgard-project.org 6 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 7 */ 8 9 /** 10 * @package de.linkm.fontrenderer 11 */ 3 12 class de_linkm_fontrenderer { 4 13 … … 21 30 var $_cache_prefix; 22 31 var $_serial; 23 32 24 33 function de_linkm_fontrenderer ($config = null) { 25 34 debug_push("fontrenderer::constructor"); 26 35 27 36 if (is_null($config) ) { 28 37 debug_add("Default Constructor is not allowed. Aborting", MIDCOM_LOG_ERROR); … … 32 41 return false; 33 42 } 34 43 35 44 $this->_font = imagepsloadfont ($config["font-file"]); 36 45 if ($this->_font === false) { … … 41 50 return false; 42 51 } 43 52 44 53 if (! is_null($config["encoding-file"])) 45 54 imagepsencodefont ($this->_font, $config["encoding-file"]); 46 55 47 56 $this->fontsize = intval($config["font-size"]); 48 57 49 58 // Transform the font metrics to real pixel values 50 59 $this->bbox_left = intval(round($config["bbox-left"] * $this->fontsize / 1000)); … … 52 61 $this->bbox_below = intval(round($config["bbox-below"] * $this->fontsize / 1000)); 53 62 $this->lineheight = abs($this->bbox_above) + abs($this->bbox_below); 54 63 55 64 $this->first_indent = intval($config["first-indent"]); 56 65 $this->left_indent = intval($config["left-indent"]); 57 66 $this->_max_width = intval($config["max-width"]); 58 67 59 68 $this->_hard_wrap = $config["hard-wrap"]; 60 69 61 70 if (! mgd_snippet_exists ("/sitegroup-config/de.linkm.fontrenderer/" . $config["render-code"])) { 62 debug_add("Render Code Snippet \"/sitegroup-config/de.linkm.fontrenderer/{$config['render-code']}\" " 71 debug_add("Render Code Snippet \"/sitegroup-config/de.linkm.fontrenderer/{$config['render-code']}\" " 63 72 . "does not exists. Aborting", 64 73 MIDCOM_LOG_ERROR); … … 68 77 return false; 69 78 } 70 79 71 80 $tmp = mgd_get_snippet_by_path("/sitegroup-config/de.linkm.fontrenderer/" . $config["render-code"]); 72 81 $this->_render_code = $tmp->code; 73 82 74 83 debug_print_r("Render Code loaded:", $this->_render_code, MIDCOM_LOG_DEBUG); 75 84 76 85 if (! array_key_exists("cache-dir", $config)) { 77 86 debug_add("Setting Cache to default", MIDCOM_LOG_DEBUG); … … 93 102 return false; 94 103 } 95 104 96 105 debug_add("Executing: " . 'mkdir -p ' . escapeshellarg($this->_cache_dir), MIDCOM_LOG_DEBUG); 97 106 exec('mkdir -p ' . escapeshellarg($this->_cache_dir)); 98 107 99 108 $this->_serial = strtotime($config["serial"]); 100 109 if ($this->_serial == -1) { … … 105 114 return false; 106 115 } 107 116 108 117 $this->_text = null; 109 118 $this->_lines = null; … … 111 120 debug_pop(); 112 121 } 113 122 114 123 function _set_text ($text) { 115 124 debug_push("fontrenderer::set_text"); 116 125 117 126 $this->_lines = Array(); 118 127 $this->bbox = null; 119 128 $this->_text = trim($text); 120 129 121 130 debug_add("We have to render \"" . $this->_text . "\"", MIDCOM_LOG_DEBUG); 122 131 123 132 // Here we should wrap the text using the given rules 124 133 // and return a bounding box in like imagepsbbox does. … … 126 135 // x/y delta coordinate for each line where the text rendering starts 127 136 // the string to paint there 128 // other data like its width and the original boundingbox 129 137 // other data like its width and the original boundingbox 138 130 139 $remaining = $text; 131 140 $line = 0; 132 141 133 142 while ($remaining != "") { 134 143 debug_add("We are now looking at line $line", MIDCOM_LOG_DEBUG); 135 144 136 145 $available = $this->_max_width - $this->left_indent; 137 146 if ($line == 0) 138 147 $available -= $this->first_indent; 139 148 140 149 debug_add("Available space = $available", MIDCOM_LOG_DEBUG); 141 150 142 151 $current = $remaining; 143 152 $newremaining = ""; 144 153 $linecomplete = false; 145 154 146 155 do { 147 156 // Calculate width of the string, note that the "+2" is due to possible 148 157 // off-by-one values of imagepsbbox. 149 158 150 159 $box = imagepsbbox($current, $this->_font, $this->fontsize, 0,0,0); 151 160 $width = $box[2] - $box[0] + 2; 152 161 debug_add("The remaining string would be $width pixels long", MIDCOM_LOG_DEBUG); 153 162 154 163 if ($width < $available) { 155 164 debug_add("Which means that it fits into the available width", MIDCOM_LOG_DEBUG); 156 165 157 166 $this->_lines[$line]["string"] = $current; 158 167 $this->_lines[$line]["dx"] = $this->left_indent; … … 160 169 $this->_lines[$line]["bbox"] = $box; 161 170 $this->_lines[$line]["width"] = $width; 162 171 163 172 if ($line == 0) 164 173 $this->_lines[$line]["dx"] += $this->first_indent; 165 174 166 175 $remaining = trim($newremaining); 167 176 $line++; 168 177 $linecomplete = true; 169 178 170 179 } else { 171 180 debug_add("Which is too wide, so we'll have to compute a possible linebreak.", MIDCOM_LOG_DEBUG); 172 181 173 182 $space = strrpos ($current, " "); 174 183 $minus = strrpos ($current, "-"); 175 184 176 185 debug_add("RAW indexes: space = $space -- minus = $minus", MIDCOM_LOG_DEBUG); 177 178 // Ignore Matches to the last character of the string! 179 // The following logic will move one character to the left so 186 187 // Ignore Matches to the last character of the string! 188 // The following logic will move one character to the left so 180 189 // setting it to false should be safe. 181 190 182 191 if ($space == (strlen($current) - 1)) 183 192 $space = false; 184 193 if ($minus == (strlen($current) - 1)) 185 194 $minus = false; 186 195 187 196 debug_add("cleaned indexes: space = $space -- minus = $minus", MIDCOM_LOG_DEBUG); 188 197 189 198 if ($space === false and $minus === false) { 190 199 if (! $this->_hard_wrap) { … … 200 209 else if ($space > $minus) 201 210 $break = $space-1; // There was a space at $space and a minus at $minus, decided for $break 202 else 211 else 203 212 $break = $minus; // There was a space at $space and a minus at $minus, decided for $break 204 213 205 214 // Now $break should point to the last character that is part of 206 215 // the current line, everything behind it is the new line. 207 216 // So we build these strings 208 217 209 218 $newremaining = substr($current, $break+1) . $newremaining; 210 219 $current = substr($current, 0, $break+1); 211 220 212 221 // current string we test is now $current, new remaining string stored is $newremaining 213 222 214 223 } // if - else (width > available) 215 224 216 225 } while (! $linecomplete); 217 218 226 227 219 228 } // while remaining != "" 220 229 221 230 // Now we make a litte sanity check: 222 231 if (count($this->_lines) == 0) { … … 225 234 return null; 226 235 } 227 236 228 237 ksort($this->_lines, SORT_NUMERIC); 229 238 $this->linecount = count($this->_lines); 230 239 231 240 debug_print_r("We ended up with these " . $this->linecount . " lines:",$this->_lines, MIDCOM_LOG_DEBUG); 232 241 233 242 // The last step we have to do is to compute the real bounding box around 234 243 // the (hypothetical) text base location. This will take any indents into … … 241 250 // 242 251 // We do the same thing for the right side 243 252 244 253 $x1_corr = min($this->left_indent, 0); 245 254 246 255 $x1 = $this->_lines[0]["bbox"][0] + min(($this->first_indent + $this->left_indent), 0); 247 256 $x2 = $this->_lines[0]["bbox"][2] + $this->_lines[0]["dx"]; 248 257 249 258 debug_add("Scanning for bounding box, x1_corr = $x1_corr, initial x1, x2 = $x1, $x2", MIDCOM_LOG_DEBUG); 250 259 251 260 foreach ($this->_lines as $line => $data) { 252 261 if ($line == 0) 253 262 continue; 254 263 255 264 if (($data["bbox"][0] + $x1_corr) < $x1) 256 265 $x1 = $data["bbox"][0] + $x1_corr; 257 266 258 267 if (($data["bbox"][2] + $data["dx"]) > $x2) 259 268 $x2 = $data["bbox"][2] + $data["dx"]; 260 261 } 262 269 270 } 271 263 272 // The lower and upper boundaries are easier: 264 273 265 274 $lastline = $this->_lines[count($this->_lines)-1]; 266 275 $y1 = (-1 * $lastline["dy"]) + $lastline["bbox"][1]; 267 276 $y2 = $this->_lines[0]["bbox"][3]; 268 277 269 278 $this->bbox = Array($x1,$y1,$x2,$y2); 270 279 271 280 debug_add("Now we are finished: x1/y1 = $x1/$y1, x2/$y2 = $x2/$y2", MIDCOM_LOG_DEBUG); 272 281 debug_pop(); 273 282 return $this->bbox; 274 283 } 275 284 276 285 function draw_text ($image, $x, $y, $col_fg, $col_bg) { 277 286 foreach ($this->_lines as $line => $data) 278 287 imagepstext($image, $data["string"], $this->_font, $this->fontsize, $col_fg, $col_bg, intval($x+$data["dx"]), intval($y+$data["dy"]), 0, 0, 0, 16); 279 288 } 280 289 281 290 function _create_image () { 282 291 debug_push("fontrenderer::_create_image"); 283 292 $image = null; 284 293 285 294 debug_push("fontrenderer::_create_image::RENDER_CODE"); 286 295 eval($this->_render_code); 287 296 debug_pop(); 288 297 289 298 if (is_null($image)) { 290 299 debug_add("The Render-Code did not populate $image. Aborting!", MIDCOM_LOG_ERROR); … … 292 301 return false; 293 302 } 294 303 295 304 $filename = $this->_cache_dir . md5($this->_text) . ".png"; 296 305 debug_add("Filename: $filename"); 297 306 298 307 if (file_exists($filename)) 299 308 if (!unlink($filename)) { … … 302 311 return false; 303 312 } 304 313 305 314 debug_add("Writing image", MIDCOM_LOG_DEBUG); 306 315 imagepng ($image, $filename); 307 316 308 317 if (!file_exists($filename)) { 309 318 debug_add("Something (look for PHP messages) went wrong when writing the image. Aborting", MIDCOM_LOG_ERROR); … … 311 320 return false; 312 321 } 313 322 314 323 debug_pop(); 315 324 return true; 316 325 } 317 326 318 327 function get_image ($string) { 319 328 debug_push("fontrenderer::get_image"); 320 329 321 330 $file = md5(trim($string)) . ".png"; 322 331 $filename = $this->_cache_dir . $file; 323 332 324 333 debug_add("We should retrieve an image for the string \"" . trim($string) . "\" whose filename should be \"$filename\"", MIDCOM_LOG_INFO); 325 334 326 335 $generate = false; 327 336 328 337 if (!file_exists($filename)) { 329 338 $generate = true; … … 336 345 } 337 346 } 338 347 339 348 if ($generate) { 340 349 if (is_null($this->_set_text($string))) { … … 350 359 debug_add("File created successfully", MIDCOM_LOG_INFO); 351 360 } 352 361 353 362 $info = getimagesize($filename); 354 363 355 364 if ($info === false || $info[2] != 3) { 356 365 debug_add("This does not look like a PNG Image, getimagesize returned this:", $info, MIDCOM_LOG_ERROR); … … 358 367 return false; 359 368 } 360 369 361 370 $result = Array(); 362 371 $result["url"] = $this->_cache_prefix . $file; … … 364 373 $result["size_y"] = $info[1]; 365 374 $result["size_line"] = $info[3]; 366 375 367 376 debug_print_r("Cache Hit. Returning this:", $result, MIDCOM_LOG_DEBUG); 368 377 369 378 debug_pop(); 370 379 return $result; 371 380 } 372 381 373 382 } 374 383 trunk/midcom/de.linkm.fontrenderer/midcom/interfaces.php
r697 r14085 2 2 /** 3 3 * @package de.linkm.fontrenderer 4 * @author The Midgard Project, http://www.midgard-project.org 4 * @author The Midgard Project, http://www.midgard-project.org 5 5 * @version $Id$ 6 6 * @copyright The Midgard Project, http://www.midgard-project.org … … 10 10 /** 11 11 * fontrenderer MidCOM interface class. 12 * 12 * 13 13 * @package de.linkm.fontrenderer 14 */14 */ 15 15 class de_linkm_fontrenderer_interface extends midcom_baseclasses_components_interface 16 16 { 17 17 /** 18 18 * Constructor. 19 * 19 * 20 20 * Nothing fancy, loads all script files. 21 21 */ … … 23 23 { 24 24 parent::midcom_baseclasses_components_interface(); 25 25 26 26 $this->_component = 'de.linkm.fontrenderer'; 27 27 $this->_autoload_files = Array('main.php'); trunk/midcom/fi.mik.lentopaikkakisa/admin.php
r5568 r14085 1 1 <?php 2 3 2 /** 4 3 * @package fi.mik.lentopaikkakisa 5 * @author The Midgard Project, http://www.midgard-project.org 4 * @author The Midgard Project, http://www.midgard-project.org 6 5 * @version $Id$ 7 6 * @copyright The Midgard Project, http://www.midgard-project.org … … 11 10 /** 12 11 * Forum AIS interface class. 13 * 12 * 14 13 * @package fi.mik.lentopaikkakisa 15 14 */ 16 15 class fi_mik_lentopaikkakisa_admin extends midcom_baseclasses_components_request_admin 17 16 { 18 function fi_mik_lentopaikkakisa_admin($topic, $config) 17 function fi_mik_lentopaikkakisa_admin($topic, $config) 19 18 { 20 19 parent::midcom_baseclasses_components_request_admin($topic, $config); trunk/midcom/fi.mik.lentopaikkakisa/flight.php
r6159 r14085 1 1 <?php 2 2 /** 3 * @package fi.mik.lentopaikkakisa 4 * @author The Midgard Project, http://www.midgard-project.org 5 * @copyright The Midgard Project, http://www.midgard-project.org 6 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 7 */ 8 9 /** 3 10 * MidCOM wrapped class for access to stored queries 11 * 12 * @package fi.mik.lentopaikkakisa 4 13 */ 5 6 14 class fi_mik_flight_dba extends __fi_mik_flight_dba 7 15 { … … 10 18 return parent::__fi_mik_flight_dba($id); 11 19 } 12 20 13 21 function get_parent_guid_uncached() 14 22 { … … 20 28 return null; 21 29 } 22 30 23 31 /** 24 32 * Human-readable label for cases like Asgard navigation trunk/midcom/midcom.admin.folder/handler/index.php
r14006 r14085 1 1 <?php 2 2 /** 3 * Created on 2006-Sep-Sun4 3 * @author tarjei huse 5 4 * @package midcom.admin.folder 6 5 * @copyright The Midgard Project, http://www.midgard-project.org 7 6 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 8 * 7 * 9 8 */ 10 9 11 class midcom_admin_folder_handler_index extends midcom_baseclasses_components_handler 10 /** 11 * Created on 2006-Sep-Sun 12 * 13 * @package midcom.admin.folder 14 */ 15 class midcom_admin_folder_handler_index extends midcom_baseclasses_components_handler 12 16 { 13 17 /* … … 15 19 * See: http://www.midgard-project.org/api-docs/midcom/dev/midcom.baseclasses/midcom_baseclasses_components_handler.html 16 20 */ 17 21 18 22 /** 19 23 <
