Bug #22849 ยป 14676_v1.diff

Administrator Admin, 2010-06-09 17:52

View differences:

t3lib/class.t3lib_iconworks.php (working copy)
151 151
	 * @see getIcon()
152 152
	 */
153 153
	public static function getIconImage($table, $row = array(), $backPath, $params = '', $shaded = FALSE) {
154
		$str = '<img'.t3lib_iconWorks::skinImg($backPath, t3lib_iconWorks::getIcon($table, $row, $shaded), 'width="18" height="16"').(trim($params)?' '.trim($params):'');
154
		$str = '<img' .
155
				self::skinImg($backPath, self::getIcon($table, $row, $shaded), 'width="18" height="16"') .
156
				(trim($params) ? ' ' . trim($params) : '');
155 157
		if (!stristr($str, 'alt="')) {
156 158
			$str.=' alt=""';
157 159
		}
......
315 317
					return 'gfx/i/no_icon_found.gif';
316 318
				}
317 319
			} else {	// Otherwise, create the icon:
318
				$theRes = t3lib_iconWorks::makeIcon($GLOBALS['BACK_PATH'].$iconfile, $string, $user, $protectSection, $absfile, $iconFileName_stateTagged);
320
				$theRes = self::makeIcon($GLOBALS['BACK_PATH'] . $iconfile, $string, $user, $protectSection, $absfile, $iconFileName_stateTagged);
319 321
				return $theRes;
320 322
			}
321 323
		} else {
......
387 389
			$temp_path = dirname(PATH_thisScript) . '/';
388 390
			if (!@is_file($temp_path . $backPath . $src)) {
389 391
				$srcOrg = preg_replace('/_i' . preg_quote($matches[2]) . '$/', $matches[2], $src);
390
				$src = t3lib_iconWorks::makeIcon($backPath . $srcOrg, 'disabled', 0, false, $temp_path . $backPath . $srcOrg, $srcBasename);
392
				$src = self::makeIcon($backPath . $srcOrg, 'disabled', 0, false, $temp_path . $backPath . $srcOrg, $srcBasename);
391 393
			}
392 394
		}
393 395

  
......
453 455
				if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'])	{
454 456

  
455 457
						// Create image pointer, if possible
456
					$im = t3lib_iconworks::imagecreatefrom($absFile);
458
					$im = self::imagecreatefrom($absFile);
457 459
					if ($im<0)	return $iconfile;
458 460

  
459 461
						// Converting to gray scale, dimming the icon:
......
476 478
							imagestring($im, 1, 1, 1, $user, $white);
477 479
						}
478 480

  
479
						$ol_im = t3lib_iconworks::imagecreatefrom($GLOBALS['BACK_PATH'].'gfx/overlay_group.gif');
481
						$ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_group.gif');
480 482
						if ($ol_im<0)	return $iconfile;
481 483

  
482
						t3lib_iconworks::imagecopyresized($im, $ol_im, 0, 0, 0, 0, imagesx($ol_im), imagesy($ol_im), imagesx($ol_im), imagesy($ol_im));
484
						self::imagecopyresized($im, $ol_im, 0, 0, 0, 0, imagesx($ol_im), imagesy($ol_im), imagesx($ol_im), imagesy($ol_im));
483 485
					}
484 486
						// Applying overlay based on mode:
485 487
					if ($mode) {
486 488
						unset($ol_im);
487 489
						switch($mode) {
488 490
							case 'deleted':
489
								$ol_im = t3lib_iconworks::imagecreatefrom($GLOBALS['BACK_PATH'].'gfx/overlay_deleted.gif');
491
								$ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_deleted.gif');
490 492
							break;
491 493
							case 'futuretiming':
492
								$ol_im = t3lib_iconworks::imagecreatefrom($GLOBALS['BACK_PATH'].'gfx/overlay_timing.gif');
494
								$ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_timing.gif');
493 495
							break;
494 496
							case 'timing':
495
								$ol_im = t3lib_iconworks::imagecreatefrom($GLOBALS['BACK_PATH'].'gfx/overlay_timing.gif');
497
								$ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_timing.gif');
496 498
							break;
497 499
							case 'hiddentiming':
498
								$ol_im = t3lib_iconworks::imagecreatefrom($GLOBALS['BACK_PATH'].'gfx/overlay_hidden_timing.gif');
500
								$ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_hidden_timing.gif');
499 501
							break;
500 502
							case 'no_icon_found':
501
								$ol_im = t3lib_iconworks::imagecreatefrom($GLOBALS['BACK_PATH'].'gfx/overlay_no_icon_found.gif');
503
								$ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_no_icon_found.gif');
502 504
							break;
503 505
							case 'disabled':
504 506
									// is already greyed - nothing more
......
506 508
							break;
507 509
							case 'hidden':
508 510
							default:
509
								$ol_im = t3lib_iconworks::imagecreatefrom($GLOBALS['BACK_PATH'].'gfx/overlay_hidden.gif');
511
								$ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_hidden.gif');
510 512
							break;
511 513
						}
512 514
						if ($ol_im<0)	return $iconfile;
513 515
						if ($ol_im) {
514
							t3lib_iconworks::imagecopyresized($im, $ol_im, 0, 0, 0, 0, imagesx($ol_im), imagesy($ol_im), imagesx($ol_im), imagesy($ol_im));
516
							self::imagecopyresized($im, $ol_im, 0, 0, 0, 0, imagesx($ol_im), imagesy($ol_im), imagesx($ol_im), imagesy($ol_im));
515 517
						}
516 518
					}
517 519
						// Protect-section icon:
518 520
					if ($protectSection) {
519
						$ol_im = t3lib_iconworks::imagecreatefrom($GLOBALS['BACK_PATH'].'gfx/overlay_sub5.gif');
521
						$ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_sub5.gif');
520 522
						if ($ol_im<0)	return $iconfile;
521
						t3lib_iconworks::imagecopyresized($im, $ol_im, 0, 0, 0, 0, imagesx($ol_im), imagesy($ol_im), imagesx($ol_im), imagesy($ol_im));
523
						self::imagecopyresized($im, $ol_im, 0, 0, 0, 0, imagesx($ol_im), imagesy($ol_im), imagesx($ol_im), imagesy($ol_im));
522 524
					}
523 525

  
524 526
						// Create the image as file, destroy GD image and return:
525
					@t3lib_iconWorks::imagemake($im, $path);
527
					@self::imagemake($im, $path);
526 528
					t3lib_div::gif_compress($path, 'IM');
527 529
					ImageDestroy($im);
528 530
					return $mainpath;
    (1-1/1)