Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 71.92 KB | None | 0 0
  1. Tylko w symfony/: CHANGELOG
  2. [GIT] diff -r symfony/CHANGELOG.md symfony1/CHANGELOG.md
  3. 3a4,12
  4. > 02/08/2017: Version 1.5.10
  5. > --------------------------
  6. >
  7. > * Add support of Throwables #144
  8. > * Fixed return type in PHPDoc #151
  9. > * Fix `sfEventLogger`: add priority and event.name overriding #160
  10. > * Don't try to autoload a trait if it's already been declared #162
  11. > * Fix/php 7.2 deprecation warnings #163
  12. >
  13. Tylko w symfony/: COPYRIGHT
  14. Tylko w symfony/data/web/sf/sf_web_debug: .gitkeep
  15. Tylko w symfony/data/web/sf/sf_web_debug/images: .gitkeep
  16. Tylko w symfony1/: .git
  17.  
  18.  
  19. [GIT] diff -r symfony/lib/action/sfAction.class.php symfony1/lib/action/sfAction.class.php
  20. 119c119
  21. < return $this->redirect('@error_404');
  22. ---
  23. > return $this->redirect('/'.sfConfig::get('sf_error_404_module').'/'.sfConfig::get('sf_error_404_action'));
  24. 141c141
  25. < throw new sfStopException('Forward to ' . $module . '/' . $action);
  26. ---
  27. > throw new sfStopException();
  28. 207c207
  29. < throw new sfStopException('Redirect ' . $statusCode . ' to ' . (is_array($url) ? $url['sf_route'] : $url));
  30. ---
  31. > throw new sfStopException();
  32.  
  33.  
  34. diff -r symfony/lib/autoload/sfAutoload.class.php symfony1/lib/autoload/sfAutoload.class.php
  35. 188d187
  36. < $time = sfTimerManager::getTimer('sfAutoload->loadClass()');
  37. 192c191
  38. < if (class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false))
  39. ---
  40. > if (class_exists($class, false) || interface_exists($class, false) || (function_exists('trait_exists') && trait_exists($class, false)))
  41. 194d192
  42. < $time->addTime();
  43. 213,216d210
  44. < catch (Error $e)
  45. < {
  46. < sfException::createFromError($e)->printStackTrace();
  47. < }
  48. 218d211
  49. < $time->addTime();
  50. 243,246d235
  51. < catch (Error $e)
  52. < {
  53. < sfException::createFromError($e)->printStackTrace();
  54. < }
  55. 248d236
  56. < $time->addTime();
  57. 252d239
  58. < $time->addTime();
  59.  
  60.  
  61. diff -r symfony/lib/autoload/sfCoreAutoload.class.php symfony1/lib/autoload/sfCoreAutoload.class.php
  62. 14c14
  63. < define('SYMFONY_VERSION', '1.5.10-dev');
  64. ---
  65. > define('SYMFONY_VERSION', '1.5.11-dev');
  66.  
  67.  
  68. diff -r symfony/lib/autoload/sfSimpleAutoload.class.php symfony1/lib/autoload/sfSimpleAutoload.class.php
  69. 135,138d134
  70. < catch (Error $e)
  71. < {
  72. < sfException::createFromError($e)->printStackTrace();
  73. < }
  74. 172d167
  75. < chmod($this->cacheFile, 0666);
  76.  
  77.  
  78. diff -r symfony/lib/cache/sfMemcacheCache.class.php symfony1/lib/cache/sfMemcacheCache.class.php
  79. 226c226,229
  80. < foreach ($this->memcache->get(array_map(create_function('$k', 'return "'.$this->getOption('prefix').'".$k;'), $keys)) as $key => $value)
  81. ---
  82. > $prefix = $this->getOption('prefix');
  83. > $prefixed_keys = array_map(function($k) use ($prefix) { return $prefix . $k; }, $keys);
  84. >
  85. > foreach ($this->memcache->get($prefixed_keys) as $key => $value)
  86. 228c231
  87. < $values[str_replace($this->getOption('prefix'), '', $key)] = $value;
  88. ---
  89. > $values[str_replace($prefix, '', $key)] = $value;
  90.  
  91.  
  92. diff -r symfony/lib/cache/sfSQLiteCache.class.php symfony1/lib/cache/sfSQLiteCache.class.php
  93. 57c57
  94. < * @inheritdoc
  95. ---
  96. > * @inheritdo
  97.  
  98.  
  99. diff -r symfony/lib/command/cli.php symfony1/lib/command/cli.php
  100. 20,24c20,25
  101. < require_once(__DIR__.'/../autoload/sfCoreAutoload.class.php');
  102. < require_once(__DIR__.'/../../../../FrontController.class.php');
  103. < sfCoreAutoload::register();
  104. < } else {
  105. < require_once $autoload;
  106. ---
  107. > require_once(__DIR__.'/../autoload/sfCoreAutoload.class.php');
  108. > sfCoreAutoload::register();
  109. > }
  110. > else
  111. > {
  112. > require_once $autoload;
  113. 34,35d34
  114. <
  115. < NewRelicInsights::saveAll();
  116. 39,43d37
  117. < if (class_exists('CliErrorHandler', true))
  118. < {
  119. < CliErrorHandler::handleException($e);
  120. < }
  121. <
  122.  
  123.  
  124. diff -r symfony/lib/command/sfCommandApplication.class.php symfony1/lib/command/sfCommandApplication.class.php
  125. 608c608,613
  126. < register_shutdown_function(create_function('', 'fclose(STDIN); fclose(STDOUT); fclose(STDERR); return true;'));
  127. ---
  128. > register_shutdown_function(function() {
  129. > fclose(STDIN);
  130. > fclose(STDOUT);
  131. > fclose(STDERR);
  132. > return true;
  133. > });
  134.  
  135.  
  136. diff -r symfony/lib/command/sfCommandLogger.class.php symfony1/lib/command/sfCommandLogger.class.php
  137. 21,25d20
  138. < * Ignore this log level when coming from 'application.log' listener and $this->level is set to the same value.
  139. < */
  140. < const IGNORE_APPLICATION_LOG_LEVEL = sfLogger::INFO;
  141. <
  142. < /**
  143. 54,58d48
  144. <
  145. < if (self::IGNORE_APPLICATION_LOG_LEVEL == $this->getLogLevel() && self::IGNORE_APPLICATION_LOG_LEVEL == $priority)
  146. < {
  147. < return;
  148. < }
  149.  
  150.  
  151. diff -r symfony/lib/command/sfCommandManager.class.php symfony1/lib/command/sfCommandManager.class.php
  152. 117,128c117,119
  153. < if (version_compare(PHP_VERSION, '5.5.0', '>='))
  154. < {
  155. < $arguments = preg_replace_callback(
  156. < '/(\'|")(.+?)\\1/',
  157. < function($matches){return str_replace(' ', '=PLACEHOLDER=', $matches[2]);},
  158. < $arguments);
  159. < }
  160. < else
  161. < {
  162. < $arguments = preg_replace('/(\'|")(.+?)\\1/e', "str_replace(' ', '=PLACEHOLDER=', '\\2')", $arguments);
  163. < }
  164. <
  165. ---
  166. > $arguments = preg_replace_callback('/(\'|")(.+?)\\1/', function ($match) {
  167. > return str_replace(' ', '=PLACEHOLDER=', $match[2]);
  168. > }, $arguments);
  169.  
  170.  
  171. diff -r symfony/lib/config/config/filters.yml symfony1/lib/config/config/filters.yml
  172. 17,19c17,18
  173. < # cache filter execution check moved to sfCacheFilter
  174. < # param:
  175. < # condition: %SF_CACHE%
  176. ---
  177. > param:
  178. > condition: %SF_CACHE%
  179.  
  180.  
  181. diff -r symfony/lib/config/sfApplicationConfiguration.class.php symfony1/lib/config/sfApplicationConfiguration.class.php
  182. 146,156c146
  183. < if ($this->isDebug())
  184. < {
  185. < if ('stderr' != ini_get('display_errors'))
  186. < {
  187. < ini_set('display_errors', 'on');
  188. < }
  189. < }
  190. < else
  191. < {
  192. < ini_set('display_errors', 'off');
  193. < }
  194. ---
  195. > ini_set('display_errors', $this->isDebug() ? 'on' : 'off');
  196.  
  197.  
  198. diff -r symfony/lib/config/sfConfigCache.class.php symfony1/lib/config/sfConfigCache.class.php
  199. 150a151,152
  200. > if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled'))
  201. > {
  202. 151a154
  203. > }
  204. 158,159d160
  205. < $timer->addTime();
  206. <
  207. 176,177d176
  208. < $timer->addTime();
  209. <
  210. 200a200,202
  211. > if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled'))
  212. > {
  213. > /** @var $timer sfTimer */
  214. 201a204
  215. > }
  216.  
  217.  
  218. diff -r symfony/lib/config/sfConfigHandler.class.php symfony1/lib/config/sfConfigHandler.class.php
  219. 80c80
  220. < array_walk_recursive($value, create_function('&$value', '$value = sfToolkit::replaceConstants($value);'));
  221. ---
  222. > array_walk_recursive($value, function(& $value) { $value = sfToolkit::replaceConstants($value); });
  223. 101c101
  224. < array_walk_recursive($path, create_function('&$path', '$path = sfConfigHandler::replacePath($path);'));
  225. ---
  226. > array_walk_recursive($path, function(&$path) { $path = sfConfigHandler::replacePath($path); });
  227.  
  228.  
  229. diff -r symfony/lib/config/sfFactoryConfigHandler.class.php symfony1/lib/config/sfFactoryConfigHandler.class.php
  230. 42d41
  231. < $names = array();
  232. 91d89
  233. < $names[] = 'controller';
  234. 97d94
  235. < $names[] = 'request';
  236. 102d98
  237. < $names[] = 'response1';
  238. 105d100
  239. < $names[] = 'response2';
  240. 118d112
  241. < $names[] = 'storage';
  242. 123d116
  243. < $names[] = 'user';
  244. 137d129
  245. < $names[] = 'view_cache';
  246. 159d150
  247. < $names[] = 'i18n';
  248. 182d172
  249. < $names[] = 'routing';
  250. 226d215
  251. < $names[] = 'logger';
  252. 237d225
  253. < $names[] = 'mailer';
  254. 240,246c228,233
  255. < case 'service_container':
  256. < $instances[] = (
  257. < "\$class = require \$this->configuration->getConfigCache()->checkConfig('config/services.yml', true);\n".
  258. < "\$this->setServiceContainerConfiguration(array('class' => \$class));\n"
  259. < );
  260. < $names[] = 'service_container';
  261. < break;
  262. ---
  263. > case 'service_container':
  264. > $instances[] = (
  265. > "\$class = require \$this->configuration->getConfigCache()->checkConfig('config/services.yml', true);\n".
  266. > "\$this->setServiceContainerConfiguration(array('class' => \$class));\n"
  267. > );
  268. > break;
  269. 250,276d236
  270. < $it1 = <<<TEXT
  271. <
  272. < \$global_f_times = array();
  273. < \$global_f_times['includes']['start'] = microtime(true);
  274. <
  275. < TEXT;
  276. < $it2 = <<<TEXT
  277. <
  278. < \$global_f_times['includes']['stop'] = microtime(true);
  279. <
  280. < TEXT;
  281. <
  282. < foreach ($instances as $i_id => $i_text)
  283. < {
  284. < $t1 = <<<TEXT
  285. <
  286. < \$global_f_times['{$names[$i_id]}']['start'] = microtime(true);
  287. <
  288. < TEXT;
  289. < $t2 = <<<TEXT
  290. <
  291. < \$global_f_times['{$names[$i_id]}']['stop'] = microtime(true);
  292. <
  293. < TEXT;
  294. < $instances[$i_id] = $t1 . $i_text . $t2;
  295. < }
  296. <
  297. 278c238
  298. < return sprintf("<?php\n".
  299. ---
  300. > $retval = sprintf("<?php\n".
  301. 280,282c240,241
  302. < "// date: %s\n%s\n%s\n\$GLOBALS['global_f_times'] = \$global_f_times;\n",
  303. < date('Y/m/d H:i:s'),
  304. < $it1 . implode("\n", $includes) . $it2,
  305. ---
  306. > "// date: %s\n%s\n%s\n",
  307. > date('Y/m/d H:i:s'), implode("\n", $includes),
  308. 283a243,244
  309. >
  310. > return $retval;
  311.  
  312.  
  313. diff -r symfony/lib/config/sfRoutingConfigHandler.class.php symfony1/lib/config/sfRoutingConfigHandler.class.php
  314. 45c45
  315. < $data[] = $this->createRouteWithAdditionalStuff($name, $route);
  316. ---
  317. > $data[] = sprintf('$this->routes[\'%s\'] = %s;', $name, var_export(serialize($route), true));
  318. 55,68d54
  319. < protected function createRouteWithAdditionalStuff($name, sfRoute $route)
  320. < {
  321. < if ($route->getPrependRoute())
  322. < {
  323. < $result = sprintf('$this->prependRawLazyRoute(\'%s\', new myLazyRoute(%s));', $name, var_export(serialize($route), true));
  324. < }
  325. < else
  326. < {
  327. < $result = sprintf('$this->routes[\'%s\'] = new myLazyRoute(%s);', $name, var_export(serialize($route), true));
  328. < }
  329. <
  330. < return $result;
  331. < }
  332. <
  333. 113c99
  334. < $params['url'] ? $params['url'] : '/',
  335. ---
  336. > $params['url'] ?: '/',
  337.  
  338.  
  339. diff -r symfony/lib/config/sfViewConfigHandler.class.php symfony1/lib/config/sfViewConfigHandler.class.php
  340. 264c264
  341. < $sub_assets = array();
  342. ---
  343. > $position = '';
  344. 267,270c267,269
  345. < foreach ($asset as $key => $options)
  346. < {
  347. < $sub_asset = array();
  348. < $sub_asset['key'] = $key;
  349. ---
  350. > reset($asset);
  351. > $key = key($asset);
  352. > $options = $asset[$key];
  353. 273c272
  354. < $sub_asset['position'] = $options['position'];
  355. ---
  356. > $position = $options['position'];
  357. 276,282d274
  358. < else
  359. < {
  360. < $sub_asset['position'] = '';
  361. < }
  362. < $sub_asset['options'] = $options;
  363. < $sub_assets[] = $sub_asset;
  364. < }
  365. 286,290c278,279
  366. < $sub_asset = array();
  367. < $sub_asset['key'] = $asset;
  368. < $sub_asset['position'] = '';
  369. < $sub_asset['options'] = array();
  370. < $sub_assets[] = $sub_asset;
  371. ---
  372. > $key = $asset;
  373. > $options = array();
  374. 293,295c282
  375. < foreach ($sub_assets as $sub_asset)
  376. < {
  377. < if ('-*' == $sub_asset['key'])
  378. ---
  379. > if ('-*' == $key)
  380. 299c286
  381. < else if ('-' == $sub_asset['key'][0])
  382. ---
  383. > else if ('-' == $key[0])
  384. 301c288
  385. < unset($tmp[substr($sub_asset['key'], 1)]);
  386. ---
  387. > unset($tmp[substr($key, 1)]);
  388. 305,306c292
  389. < $tmp[$sub_asset['key']] = sprintf(" \$response->add%s('%s', '%s', %s);", $type, $sub_asset['key'], $sub_asset['position'], str_replace("\n", '', var_export($sub_asset['options'], true)));
  390. < }
  391. ---
  392. > $tmp[$key] = sprintf(" \$response->add%s('%s', '%s', %s);", $type, $key, $position, str_replace("\n", '', var_export($options, true)));
  393.  
  394.  
  395. diff -r symfony/lib/controller/sfFrontWebController.class.php symfony1/lib/controller/sfFrontWebController.class.php
  396. 59,62d58
  397. < catch (Error $e)
  398. < {
  399. < sfException::createFromError($e)->printStackTrace();
  400. < }
  401.  
  402.  
  403. diff -r symfony/lib/debug/sfWebDebug.class.php symfony1/lib/debug/sfWebDebug.class.php
  404. 44a45,49
  405. > if (!isset($this->options['image_root_path']))
  406. > {
  407. > $this->options['image_root_path'] = '';
  408. > }
  409. >
  410. 59a65
  411. > $this->setPanel('symfony_version', new sfWebDebugPanelSymfonyVersion($this));
  412. 205c211
  413. < $panel->getTitleUrl() ? $panel->getTitleUrl() : '#',
  414. ---
  415. > $panel->getTitleUrl() ?: '#',
  416. 226c232
  417. < <a href="#" onclick="sfWebDebugToggleMenu(); return false;"><img src="' . myDataImages::MINIMIZE_ICON_GRAY . '" alt="Debug toolbar" /></a>
  418. ---
  419. > <a href="#" onclick="sfWebDebugToggleMenu(); return false;"><img src="'.$this->options['image_root_path'].'/sf.png" alt="Debug toolbar" /></a>
  420. 231c237
  421. < <a href="#" onclick="document.getElementById(\'sfWebDebug\').style.display=\'none\'; return false;"><img src="' . myDataImages::CLOSE_ICON_GRAY . '" alt="Close" /></a>
  422. ---
  423. > <a href="#" onclick="document.getElementById(\'sfWebDebug\').style.display=\'none\'; return false;"><img src="'.$this->options['image_root_path'].'/close.png" alt="Close" /></a>
  424. 435d440
  425. < min-height: 0px;
  426. 737,746d741
  427. < .sfWebDebugCache *
  428. < {
  429. < box-sizing: border-box;
  430. < vertical-align: middle;
  431. < }
  432. < .sfWebDebugCache img
  433. < {
  434. < display: inline;
  435. < }
  436. <
  437. 789c784
  438. < list-style: number;
  439. ---
  440. > list-style: decimal;
  441. 823,830d817
  442. < }
  443. <
  444. < #sfWebDebugstatisticDetails h4
  445. < {
  446. < text-transform: uppercase;
  447. < color: #000000;
  448. < text-decoration: underline;
  449. <
  450.  
  451.  
  452. diff -r symfony/lib/debug/sfWebDebugPanelCache.class.php symfony1/lib/debug/sfWebDebugPanelCache.class.php
  453. 24c24
  454. < return '<img src="' . myDataImages::RELOAD_ICON . '" alt="Reload" />';
  455. ---
  456. > return '<img src="'.$this->webDebug->getOption('image_root_path').'/reload.png" alt="Reload" />';
  457.  
  458.  
  459. diff -r symfony/lib/debug/sfWebDebugPanel.class.php symfony1/lib/debug/sfWebDebugPanel.class.php
  460. 95c95
  461. < return '<a href="#" onclick="sfWebDebugToggle(\''.$element.'\'); return false;" title="'.$title.'"><img src="' . myDataImages::UP_DOWN_TOGGLE_ICON . '" alt="'.$title.'"/></a>';
  462. ---
  463. > return '<a href="#" onclick="sfWebDebugToggle(\''.$element.'\'); return false;" title="'.$title.'"><img src="'.$this->webDebug->getOption('image_root_path').'/toggle.gif" alt="'.$title.'"/></a>';
  464.  
  465.  
  466. diff -r symfony/lib/debug/sfWebDebugPanelConfig.class.php symfony1/lib/debug/sfWebDebugPanelConfig.class.php
  467. 23c23
  468. < return '<img src="' . myDataImages::GEAR_ICON . '" alt="Config" /> config';
  469. ---
  470. > return '<img src="'.$this->webDebug->getOption('image_root_path').'/config.png" alt="Config" /> config';
  471.  
  472.  
  473. diff -r symfony/lib/debug/sfWebDebugPanelLogs.class.php symfony1/lib/debug/sfWebDebugPanelLogs.class.php
  474. 21,26d20
  475. < public $icons_prio = array(
  476. < 'error' => myDataImages::RED_FLAG_ICON,
  477. < 'warning' => myDataImages::YELLOW_FLAG_ICON,
  478. < 'info' => myDataImages::GREEN_FLAG_ICON
  479. < );
  480. <
  481. 29c23
  482. < return '<img src="' . myDataImages::PENCIL_ICON_GRAY . '" alt="Log" /> logs';
  483. ---
  484. > return '<img src="'.$this->webDebug->getOption('image_root_path').'/log.png" alt="Log" /> logs';
  485. 64c58
  486. < '<img src="' . $this->icons_prio[$priority] . '" alt="'.ucfirst($priority).'"/>',
  487. ---
  488. > '<img src="'.$this->webDebug->getOption('image_root_path').'/'.$priority.'.png" alt="'.ucfirst($priority).'"/>',
  489. 82,84c76,78
  490. < <li><a href="#" onclick="sfWebDebugShowOnlyLogLines(\'info\'); return false;"><img src="' . myDataImages::GREEN_FLAG_ICON . '" alt="Show only infos" /></a></li>
  491. < <li><a href="#" onclick="sfWebDebugShowOnlyLogLines(\'warning\'); return false;"><img src="' . myDataImages::YELLOW_FLAG_ICON . '" alt="Show only warnings" /></a></li>
  492. < <li><a href="#" onclick="sfWebDebugShowOnlyLogLines(\'error\'); return false;"><img src="' . myDataImages::RED_FLAG_ICON . '" alt="Show only errors" /></a></li>
  493. ---
  494. > <li><a href="#" onclick="sfWebDebugShowOnlyLogLines(\'info\'); return false;"><img src="'.$this->webDebug->getOption('image_root_path').'/info.png" alt="Show only infos" /></a></li>
  495. > <li><a href="#" onclick="sfWebDebugShowOnlyLogLines(\'warning\'); return false;"><img src="'.$this->webDebug->getOption('image_root_path').'/warning.png" alt="Show only warnings" /></a></li>
  496. > <li><a href="#" onclick="sfWebDebugShowOnlyLogLines(\'error\'); return false;"><img src="'.$this->webDebug->getOption('image_root_path').'/error.png" alt="Show only errors" /></a></li>
  497.  
  498.  
  499. diff -r symfony/lib/debug/sfWebDebugPanelMailer.class.php symfony1/lib/debug/sfWebDebugPanelMailer.class.php
  500. 40c40
  501. < return '<img src="' . myDataImages::E_MAIL_ICON . '" alt="Emailer" /> '.$logger->countMessages();
  502. ---
  503. > return '<img src="'.$this->webDebug->getOption('image_root_path').'/email.png" alt="Emailer" /> '.$logger->countMessages();
  504.  
  505.  
  506. diff -r symfony/lib/debug/sfWebDebugPanelMemory.class.php symfony1/lib/debug/sfWebDebugPanelMemory.class.php
  507. 25c25
  508. < return '<img src="' . myDataImages::MINI_APP_WINDOW_ICON . '" alt="Memory" /> '.$totalMemory.' KB';
  509. ---
  510. > return '<img src="'.$this->webDebug->getOption('image_root_path').'/memory.png" alt="Memory" /> '.$totalMemory.' KB';
  511.  
  512.  
  513. diff -r symfony/lib/debug/sfWebDebugPanelTimer.class.php symfony1/lib/debug/sfWebDebugPanelTimer.class.php
  514. 38c38
  515. < return '<img src="' . myDataImages::WALL_CLOCK_ICON_GRAY . '" alt="Time" /> '.$this->getTotalTime().' ms';
  516. ---
  517. > return '<img src="'.$this->webDebug->getOption('image_root_path').'/time.png" alt="Time" /> '.$this->getTotalTime().' ms';
  518.  
  519.  
  520. diff -r symfony/lib/debug/sfWebDebugPanelView.class.php symfony1/lib/debug/sfWebDebugPanelView.class.php
  521. 102c102
  522. < return '<img src="' . myDataImages::PAPER_SHEET_ICON . '" alt="View Layer" /> view';
  523. ---
  524. > return '<img src="'.$this->webDebug->getOption('image_root_path').'/view.png" alt="View Layer" /> view';
  525. Tylko w symfony/lib: event_dispatcher
  526.  
  527.  
  528. diff -r symfony/lib/exception/data/exception.html.php symfony1/lib/exception/data/exception.html.php
  529. 40,42d39
  530. <
  531. < <?php if (!empty($visualAid)) echo $visualAid; ?>
  532. <
  533.  
  534.  
  535. diff -r symfony/lib/exception/sfException.class.php symfony1/lib/exception/sfException.class.php
  536. 48,56d47
  537. < static public function createFromError(Error $e)
  538. < {
  539. < $exception = new sfException($e->getMessage());
  540. < $exception->setWrappedException($e);
  541. < self::$lastException = $e;
  542. <
  543. < return $exception;
  544. < }
  545. <
  546. 119,123d109
  547. <
  548. < if (class_exists('FrontController', false) && FrontController::getPerformanceMonitor())
  549. < {
  550. < FrontController::getPerformanceMonitor()->monitorExceptions($this);
  551. < }
  552.  
  553.  
  554. diff -r symfony/lib/exception/sfStopException.class.php symfony1/lib/exception/sfStopException.class.php
  555. 26,29d25
  556. < if (class_exists('FrontController', false) && FrontController::getPerformanceMonitor())
  557. < {
  558. < FrontController::getPerformanceMonitor()->monitorExceptions($this);
  559. < }
  560.  
  561.  
  562. diff -r symfony/lib/filter/sfBasicSecurityFilter.class.php symfony1/lib/filter/sfBasicSecurityFilter.class.php
  563. 84c84
  564. < throw new sfStopException('Forward to secure action.');
  565. ---
  566. > throw new sfStopException();
  567. 96c96
  568. < throw new sfStopException('Forward to login action.');
  569. ---
  570. > throw new sfStopException();
  571.  
  572.  
  573. diff -r symfony/lib/form/sfForm.class.php symfony1/lib/form/sfForm.class.php
  574. 936c936
  575. < $secret = $this->localCSRFSecret ? $this->localCSRFSecret : self::$CSRFSecret;
  576. ---
  577. > $secret = $this->localCSRFSecret ?: self::$CSRFSecret;
  578.  
  579.  
  580. diff -r symfony/lib/generator/sfModelGeneratorConfiguration.class.php symfony1/lib/generator/sfModelGeneratorConfiguration.class.php
  581. 103c103
  582. < 'actions' => $this->getNewActions() ? $this->getNewActions() : $this->getFormActions(),
  583. ---
  584. > 'actions' => $this->getNewActions() ?: $this->getFormActions(),
  585. 108c108
  586. < 'actions' => $this->getEditActions() ? $this->getEditActions() : $this->getFormActions(),
  587. ---
  588. > 'actions' => $this->getEditActions() ?: $this->getFormActions(),
  589.  
  590.  
  591. diff -r symfony/lib/helper/AssetHelper.php symfony1/lib/helper/AssetHelper.php
  592. 291c291
  593. < * - file name without extension, like "logo", that gets expanded to "/images/logoOferty-net-20120808.png"
  594. ---
  595. > * - file name without extension, like "logo", that gets expanded to "/images/logo.png"
  596. 301,367c301
  597. < if ('data:' == substr($source, 0, 5))
  598. < {
  599. < return $source;
  600. < }
  601. <
  602. < $path = _compute_public_path($source, sfConfig::get('sf_web_images_dir_name', 'images'), 'png', false);
  603. < if (strpos($path,'http://') === 0)
  604. < {
  605. < return $path;
  606. < }
  607. < else
  608. < {
  609. < return static_path(substr($path, 1),$absolute);
  610. < }
  611. < }
  612. <
  613. < /**
  614. < * Add static domain to path.
  615. < *
  616. < * @param string $path
  617. < * @param bool $absolute
  618. < *
  619. < * @return string
  620. < */
  621. < function static_path($path, $absolute = false)
  622. < {
  623. < if (sfConfig::get('app_static_domain'))
  624. < {
  625. < if (!myTools::isServerEnvironmentProd())
  626. < {
  627. < $url = sfContext::getInstance()->getRequest()->getUriPrefix();
  628. <
  629. < $static_host = sfConfig::get('app_static_domain');
  630. <
  631. < if (strpos($url, $static_host) === false)
  632. < {
  633. < $site_name = mb_strtolower(sfConfig::get('app_site_name'));
  634. <
  635. < $url = str_replace(array('www.', $site_name), array('', $static_host), $url) . '/';
  636. < }
  637. < else
  638. < {
  639. < $url = str_replace('www.', '', $url) . '/';
  640. < }
  641. < }
  642. < else
  643. < {
  644. < $request = sfContext::getInstance()->getRequest();
  645. <
  646. < $url = 'http' . ($request->isSecure() ? 's' : '') . '://' . sfConfig::get('app_static_domain') . '/';
  647. < }
  648. < }
  649. < else
  650. < {
  651. < if ($absolute)
  652. < {
  653. < $request = sfContext::getInstance()->getRequest();
  654. <
  655. < $url = 'http'.($request->isSecure() ? 's' : '').'://'.$request->getHost().'/';
  656. < }
  657. < else
  658. < {
  659. < $url = '/';
  660. < }
  661. < }
  662. <
  663. < return $url . ltrim($path, '/');
  664. ---
  665. > return _compute_public_path($source, sfConfig::get('sf_web_images_dir_name', 'images'), 'png', $absolute);
  666. 440,444d373
  667. < if (!isset($options['alt']))
  668. < {
  669. < $options['alt'] = '';
  670. < }
  671. <
  672. 448c377
  673. < function image_lazy_load_tag($source, $image_alt, $tag_attributes = array(), $options = array())
  674. ---
  675. > function _compute_public_path($source, $dir, $ext, $absolute = false)
  676. 450c379
  677. < if (empty($image_alt))
  678. ---
  679. > if (strpos($source, '://') || strpos($source, '//') === 0)
  680. 452,460c381
  681. < $error_msg = "image_lazy_load_tag: cannot create image without alt attribute.";
  682. < if (myTools::isServerEnvironmentDev())
  683. < {
  684. < throw new AdsSystemException($error_msg);
  685. < }
  686. < else
  687. < {
  688. < myDebug::log($error_msg, sfLogger::ERR);
  689. < }
  690. ---
  691. > return $source;
  692. 463,469c384,386
  693. < if (!myTools::isReEsiCacheRequest() && UserAgentInfoPeer::getMy()->isBot())
  694. < {
  695. < unset($options['auto_add_class']);
  696. < $options['alt'] = $image_alt;
  697. < return image_tag($source, $options);
  698. < }
  699. < else
  700. ---
  701. > $request = sfContext::getInstance()->getRequest();
  702. > $sf_relative_url_root = $request->getRelativeUrlRoot();
  703. > if (0 !== strpos($source, '/'))
  704. 471,498c388
  705. < $tag_attributes['alt'] = $image_alt;
  706. < $tag_attributes['src'] = image_path('/t.gif');
  707. <
  708. < if (!isset($options['raw_name']))
  709. < {
  710. < $tag_attributes['data-original'] = image_path($source, isset($options['absolute']) ? $options['absolute'] : false);
  711. < }
  712. < else
  713. < {
  714. < $tag_attributes['data-original'] = $source;
  715. < }
  716. <
  717. < if (!isset($options['auto_add_class']) || $options['auto_add_class'])
  718. < {
  719. < if (empty($tag_attributes['class']))
  720. < {
  721. < $tag_attributes['class'] = 'lazy';
  722. <
  723. < }
  724. < else
  725. < {
  726. < $tag_attributes['class'] .= ' lazy';
  727. < }
  728. < }
  729. <
  730. < ksort($tag_attributes);
  731. <
  732. < return tag('img', $tag_attributes, false);
  733. ---
  734. > $source = $sf_relative_url_root.'/'.$dir.'/'.$source;
  735. 500d389
  736. < }
  737. 502,504c391,392
  738. < function _compute_public_path($source, $dir, $ext, $absolute = false)
  739. < {
  740. < if (strpos($source, '://') || 0 === strpos($source, '//'))
  741. ---
  742. > $query_string = '';
  743. > if (false !== $pos = strpos($source, '?'))
  744. 506c394,395
  745. < return $source;
  746. ---
  747. > $query_string = substr($source, $pos);
  748. > $source = substr($source, 0, $pos);
  749. 509,512c398
  750. < $request = sfContext::getInstance()->getRequest();
  751. < $query_string = '';
  752. <
  753. < if ( class_exists('myAssetic') && 0 === strpos($source, myAssetic::ASSETS_PREFIX))
  754. ---
  755. > if (false === strpos(basename($source), '.'))
  756. 514,515c400
  757. < $source = substr($source, strlen(myAssetic::ASSETS_PREFIX));
  758. < $source = myAssetic::getAsseticFile($source, $ext);
  759. ---
  760. > $source .= '.'.$ext;
  761. 517c402,403
  762. < else
  763. ---
  764. >
  765. > if ($sf_relative_url_root && 0 !== strpos($source, $sf_relative_url_root))
  766. 519,540c405
  767. < $sf_relative_url_root = $request->getRelativeUrlRoot();
  768. < if (0 !== strpos($source, '/'))
  769. < {
  770. < $source = $sf_relative_url_root.'/'.$dir.'/'.$source;
  771. < }
  772. <
  773. < $query_string = '';
  774. < if (false !== $pos = strpos($source, '?'))
  775. < {
  776. < $query_string = substr($source, $pos);
  777. < $source = substr($source, 0, $pos);
  778. < }
  779. <
  780. < if (false === strpos(basename($source), '.'))
  781. < {
  782. < $source .= '.'.$ext;
  783. < }
  784. <
  785. < if ($sf_relative_url_root && 0 !== strpos($source, $sf_relative_url_root))
  786. < {
  787. < $source = $sf_relative_url_root.$source;
  788. < }
  789. ---
  790. > $source = $sf_relative_url_root.$source;
  791. 547,550d411
  792. < elseif ('?refresh' == $query_string)
  793. < {
  794. < $query_string = _get_file_mtime_qs($source);
  795. < }
  796. 556,569d416
  797. < * Return the given file modification time (if it's possible) as a query string.
  798. < *
  799. < * @param string $source
  800. < *
  801. < * @return string the file mtime with '?' at the beginning; '?0' means a failure to read the time
  802. < */
  803. < function _get_file_mtime_qs($source)
  804. < {
  805. < $mtime = (int) @filemtime(sfConfig::get('sf_web_dir') . $source);
  806. <
  807. < return '?' . $mtime;
  808. < }
  809. <
  810. < /**
  811. 596,607d442
  812. <
  813. < if ('robots' == $name)
  814. < {
  815. < if (false !== stripos($content, 'noindex'))
  816. < {
  817. < myDebug::setMonitoringVariable('is_noindex', true);
  818. < }
  819. < if (false !== stripos($content, 'nofollow'))
  820. < {
  821. < myDebug::setMonitoringVariable('is_nofollow', true);
  822. < }
  823. < }
  824. 683,715d517
  825. < function include_javascripts_async()
  826. < {
  827. < $response = sfContext::getInstance()->getResponse();
  828. < sfConfig::set('symfony.asset.javascripts_included', true);
  829. <
  830. < $lib = array();
  831. < foreach ($response->getJavascriptsForAsync() as $file => $options)
  832. < {
  833. < $lib[] = javascript_path($file);
  834. < }
  835. <
  836. < if (empty($lib))
  837. < {
  838. < return;
  839. < }
  840. <
  841. < if (myTools::isServerEnvironmentDev() && myTools::getRequest()->isDebugJsSequenceRequest())
  842. < {
  843. < $js = "VSL.loadLibs(['" . implode("','", $lib) . "'], 1000);";
  844. < }
  845. < else
  846. < {
  847. < $js = "VSL.loadLibs(['" . implode("','", $lib) . "']);";
  848. < }
  849. <
  850. < if (myTools::isServerEnvironmentDev())
  851. < {
  852. < $js .= "\nVSL.setJsSequenceNumber('{$response->getJsSequenceNumber()}');";
  853. < }
  854. <
  855. < echo javascript_tag($js);
  856. < }
  857. <
  858. 723c525
  859. < sfContext::getInstance()->getResponse()->clearJavascripts();
  860. ---
  861. > sfContext::getInstance()->getResponse()->clearJavascripts();
  862. 759c561
  863. < /** Clear all stylesheets of the response object.
  864. ---
  865. > /* Clear all stylesheets of the response object.
  866. 765,789c567
  867. < sfContext::getInstance()->getResponse()->clearStylesheets();
  868. < }
  869. <
  870. < function include_stylesheets_async()
  871. < {
  872. < $response = sfContext::getInstance()->getResponse();
  873. < sfConfig::set('symfony.asset.stylesheets_included', true);
  874. <
  875. < $js = '';
  876. < foreach ($response->getStylesheets() as $file => $options) {
  877. < $source = stylesheet_path($file);
  878. < $js .= "VSL.loadCSS('$source');\n";
  879. < }
  880. <
  881. < echo javascript_tag($js);
  882. < }
  883. <
  884. < function include_inline_stylesheet($source)
  885. < {
  886. < if ( class_exists('myAssetic') && 0 === strpos($source, myAssetic::ASSETS_PREFIX)) {
  887. < $asset_name = substr($source, strlen(myAssetic::ASSETS_PREFIX));
  888. < $assetic = Assetic::getInstance()->getAsset($asset_name, Assetic::TYPE_CSS);
  889. <
  890. < echo content_tag('style', $assetic->dump(), array('type' => 'text/css'));
  891. < }
  892. ---
  893. > sfContext::getInstance()->getResponse()->clearStylesheets();
  894.  
  895.  
  896. diff -r symfony/lib/helper/DateHelper.php symfony1/lib/helper/DateHelper.php
  897. 70c70
  898. < $to_time = $to_time? $to_time: time();
  899. ---
  900. > $to_time = $to_time ?: time();
  901.  
  902.  
  903. diff -r symfony/lib/helper/JavascriptBaseHelper.php symfony1/lib/helper/JavascriptBaseHelper.php
  904. 82c82
  905. < return content_tag('script', $content, array('type' => 'text/javascript'));
  906. ---
  907. > return content_tag('script', javascript_cdata_section($content), array('type' => 'text/javascript'));
  908. 95,137d94
  909. < function javascript_tag_async($content = null, $required_objects = array(), $sync_mode = false)
  910. < {
  911. < if (null !== $content)
  912. < {
  913. < return content_tag('script', get_javascript_async($content, $required_objects, $sync_mode), array('type' => 'text/javascript'));
  914. < }
  915. < else
  916. < {
  917. < ob_start();
  918. < }
  919. < }
  920. <
  921. < function get_javascript_async($content = null, $required_objects = array(), $sync_mode = false)
  922. < {
  923. < if ($sync_mode)
  924. < {
  925. < $js_sync_mode = ',1';
  926. < }
  927. < else
  928. < {
  929. < $js_sync_mode = '';
  930. < }
  931. <
  932. < if (!empty($required_objects) && !is_array($required_objects))
  933. < {
  934. < if (in_array($required_objects, array('$', 'jQuery')))
  935. < {
  936. < return "VSR.runWhen$(function(){ $content }{$js_sync_mode});";
  937. < }
  938. <
  939. < $required_objects = array($required_objects);
  940. < }
  941. <
  942. < $js_required_objects = json_encode($required_objects);
  943. <
  944. < return "VSR.run(function(){ $content }, {$js_required_objects}{$js_sync_mode});";
  945. < }
  946. <
  947. < function end_javascript_async_tag()
  948. < {
  949. < echo javascript_async(ob_get_clean());
  950. < }
  951. <
  952. 191,192c148
  953. < * @param array $options
  954. < * @param bool $add_quotation_marks
  955. ---
  956. > * @param array
  957. 195,210c151
  958. < function options_for_javascript($options, $add_quotation_marks = false)
  959. < {
  960. < $opts = array();
  961. < foreach ($options as $key => $value) {
  962. < if (is_array($value)) {
  963. < $value = options_for_javascript($value, $add_quotation_marks);
  964. < }
  965. <
  966. < $opts[] = ($add_quotation_marks?'\'':'').$key.($add_quotation_marks?'\'':'').":".boolean_for_javascript($value);
  967. < }
  968. < sort($opts);
  969. <
  970. < return '{'.implode(', ', $opts).'}';
  971. < }
  972. <
  973. < function options_for_javascript_v2($options)
  974. ---
  975. > function options_for_javascript($options)
  976. 213d153
  977. <
  978. 216,220d155
  979. < if (strpos($key, ' ')!==false)
  980. < {
  981. < $key = '\''.$key.'\'';
  982. < }
  983. <
  984. 223,226c158
  985. < $value = options_for_javascript_v2($value);
  986. < }
  987. < else if (is_int($value))
  988. < {
  989. ---
  990. > $value = options_for_javascript($value);
  991. 228,236d159
  992. < else if (is_bool($value))
  993. < {
  994. < $value = boolean_for_javascript($value);
  995. < }
  996. < else
  997. < {
  998. < $value = '\''.$value.'\'';
  999. < }
  1000. <
  1001.  
  1002.  
  1003. diff -r symfony/lib/helper/NumberHelper.php symfony1/lib/helper/NumberHelper.php
  1004. 3,6c3,8
  1005. < throw new sfException('Do not use NumberHelper, use myTools:formatNumber()');
  1006. <
  1007. < /**
  1008. < * Do not use NumberHelper, use myTools:formatNumber()
  1009. ---
  1010. > /*
  1011. > * This file is part of the symfony package.
  1012. > * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  1013. > *
  1014. > * For the full copyright and license information, please view the LICENSE
  1015. > * file that was distributed with this source code.
  1016. 8d9
  1017. < function format_number($number, $culture = null) {}
  1018. 11c12,17
  1019. < * Do not use NumberHelper, use myTools:formatNumber()
  1020. ---
  1021. > * NumberHelper.
  1022. > *
  1023. > * @package symfony
  1024. > * @subpackage helper
  1025. > * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  1026. > * @version SVN: $Id$
  1027. 13c19,47
  1028. < function format_currency($amount, $currency = null, $culture = null) {}
  1029. ---
  1030. >
  1031. > function format_number($number, $culture = null)
  1032. > {
  1033. > if (null === $number)
  1034. > {
  1035. > return null;
  1036. > }
  1037. >
  1038. > $numberFormat = new sfNumberFormat(_current_language($culture));
  1039. >
  1040. > return $numberFormat->format($number);
  1041. > }
  1042. >
  1043. > function format_currency($amount, $currency = null, $culture = null)
  1044. > {
  1045. > if (null === $amount)
  1046. > {
  1047. > return null;
  1048. > }
  1049. >
  1050. > $numberFormat = new sfNumberFormat(_current_language($culture));
  1051. >
  1052. > return $numberFormat->format($amount, 'c', $currency);
  1053. > }
  1054. >
  1055. > function _current_language($culture)
  1056. > {
  1057. > return $culture ?: sfContext::getInstance()->getUser()->getCulture();
  1058. > }
  1059.  
  1060.  
  1061. diff -r symfony/lib/helper/TagHelper.php symfony1/lib/helper/TagHelper.php
  1062. 110,114d109
  1063. < if ('class' === $key && empty($value))
  1064. < {
  1065. < continue;
  1066. < }
  1067. <
  1068.  
  1069.  
  1070. diff -r symfony/lib/helper/TextHelper.php symfony1/lib/helper/TextHelper.php
  1071. 281,286c281,288
  1072. < $callback_function = '
  1073. < if (preg_match("/<a\s/i", $matches[1]))
  1074. < {
  1075. < return $matches[0];
  1076. < }
  1077. < ';
  1078. ---
  1079. > $callback_function = function($matches) use ($href_options, $truncate, $truncate_len, $pad) {
  1080. > if (preg_match("/<a\s/i", $matches[1]))
  1081. > {
  1082. > return $matches[0];
  1083. > }
  1084. >
  1085. > $text = $matches[2] . $matches[3];
  1086. > $href = ($matches[2] == "www." ? "http://www." : $matches[2]) . $matches[3];
  1087. 288,291c290
  1088. < if ($truncate)
  1089. < {
  1090. < $callback_function .= '
  1091. < else if (strlen($matches[2].$matches[3]) > '.$truncate_len.')
  1092. ---
  1093. > if ($truncate && strlen($text) > $truncate_len)
  1094. 293c292
  1095. < return $matches[1].\'<a href="\'.($matches[2] == "www." ? "http://www." : $matches[2]).$matches[3].\'"'.$href_options.'>\'.substr($matches[2].$matches[3], 0, '.$truncate_len.').\''.$pad.'</a>\'.$matches[4];
  1096. ---
  1097. > $text = substr($text, 0, $truncate_len).$pad;
  1098. 295,296d293
  1099. < ';
  1100. < }
  1101. 298,303c295,296
  1102. < $callback_function .= '
  1103. < else
  1104. < {
  1105. < return $matches[1].\'<a href="\'.($matches[2] == "www." ? "http://www." : $matches[2]).$matches[3].\'"'.$href_options.'>\'.$matches[2].$matches[3].\'</a>\'.$matches[4];
  1106. < }
  1107. < ';
  1108. ---
  1109. > return sprintf('%s<a href="%s"%s>%s</a>%s', $matches[1], $href, $href_options, $text, $matches[4]);
  1110. > };
  1111. 307c300
  1112. < create_function('$matches', $callback_function),
  1113. ---
  1114. > $callback_function,
  1115.  
  1116.  
  1117. diff -r symfony/lib/helper/UrlHelper.php symfony1/lib/helper/UrlHelper.php
  1118. 30,56d29
  1119. < function link_to_path($name, $path, $options = array())
  1120. < {
  1121. < if (!function_exists('_parse_attributes'))
  1122. < {
  1123. < myTools::useHelper('Tag');
  1124. < }
  1125. < $html_options = _parse_attributes($options);
  1126. <
  1127. < $html_options = _convert_options_to_javascript($html_options);
  1128. <
  1129. < $html_options['href'] = $path;
  1130. <
  1131. < if (isset($html_options['query_string']))
  1132. < {
  1133. < $html_options['href'] .= '?'.$html_options['query_string'];
  1134. < unset($html_options['query_string']);
  1135. < }
  1136. <
  1137. < if (isset($html_options['anchor']))
  1138. < {
  1139. < $html_options['href'] .= '#'.$html_options['anchor'];
  1140. < unset($html_options['anchor']);
  1141. < }
  1142. <
  1143. < return content_tag('a', $name, $html_options);
  1144. < }
  1145. <
  1146. 62,65d34
  1147. < if (!function_exists('_parse_attributes'))
  1148. < {
  1149. < myTools::loadHelpers(['Tag']);
  1150. < }
  1151.  
  1152.  
  1153. diff -r symfony/lib/i18n/sfDateFormat.class.php symfony1/lib/i18n/sfDateFormat.class.php
  1154. 50d49
  1155. < 'N' => 'nmon',
  1156. 493,525d491
  1157. < }
  1158. < }
  1159. <
  1160. < /**
  1161. < * Gets the standalone month.
  1162. < * "N" will return integer 1 through 12
  1163. < * "NN" will return integer 1 through 12 padded with 0 to two characters width
  1164. < * "NNN" will return the abrreviated month name, e.g. "Jan"
  1165. < * "NNNN" will return the month name, e.g. "January"
  1166. < * "NNNNN" will return the narrow month name, e.g. "J"
  1167. < *
  1168. < * @param array $date getdate format.
  1169. < * @param string $pattern a pattern.
  1170. < * @return string month name
  1171. < */
  1172. < protected function getNmon($date, $pattern = 'N')
  1173. < {
  1174. < $month = $date['mon'];
  1175. <
  1176. < switch ($pattern)
  1177. < {
  1178. < case 'N':
  1179. < return $month;
  1180. < case 'NN':
  1181. < return str_pad($month, 2, '0', STR_PAD_LEFT);
  1182. < case 'NNN':
  1183. < return $this->formatInfo->AbbreviatedMonthNames[$month - 1];
  1184. < case 'NNNN':
  1185. < return $this->formatInfo->StandaloneMonthNames[$month - 1];
  1186. < case 'NNNNN':
  1187. < return $this->formatInfo->NarrowMonthNames[$month - 1];
  1188. < default:
  1189. < throw new sfException('The pattern for month is "N", "NN", "NNN", "NNNN", "NNNNN".');
  1190.  
  1191.  
  1192. diff -r symfony/lib/i18n/sfDateTimeFormatInfo.class.php symfony1/lib/i18n/sfDateTimeFormatInfo.class.php
  1193. 336,364d335
  1194. < * A one-dimensional array of type String containing the
  1195. < * culture-specific full names of the months. The array for
  1196. < * InvariantInfo contains "January", "February", "March", "April",
  1197. < * "May", "June", "July", "August", "September", "October", "November",
  1198. < * and "December"
  1199. < *
  1200. < * @return array month names.
  1201. < */
  1202. < function getStandaloneMonthNames()
  1203. < {
  1204. < return $this->data['monthNames']['stand-alone']['wide'];
  1205. < }
  1206. <
  1207. < /**
  1208. < * Sets the month names. The value should be
  1209. < * an array of string starting with Janurary and ends in December.
  1210. < * For example,
  1211. < * <code>array("January", "February", "March", "April", "May", "June",
  1212. < * "July", "August", "September","October","November","December");</code>
  1213. < *
  1214. < * @param array $value month names.
  1215. < */
  1216. < function setStandaloneMonthNames($value)
  1217. < {
  1218. < $this->data['monthNames']['stand-alone']['wide'] = $value;
  1219. < }
  1220. <
  1221. <
  1222. < /**
  1223.  
  1224.  
  1225. diff -r symfony/lib/i18n/sfMessageFormat.class.php symfony1/lib/i18n/sfMessageFormat.class.php
  1226. 139d138
  1227. < $time = sfTimerManager::getTimer('load i18n data');
  1228. 145d143
  1229. < $time->addTime();
  1230.  
  1231.  
  1232. diff -r symfony/lib/i18n/sfMessageSource_File.class.php symfony1/lib/i18n/sfMessageSource_File.class.php
  1233. 162c162
  1234. < $dir = $dir ? $dir : $this->getSource($variant);
  1235. ---
  1236. > $dir = $dir ?: $this->getSource($variant);
  1237.  
  1238.  
  1239. diff -r symfony/lib/i18n/sfMessageSource_MySQL.class.php symfony1/lib/i18n/sfMessageSource_MySQL.class.php
  1240. 150c150
  1241. < $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost';
  1242. ---
  1243. > $dbhost = $dsninfo['hostspec'] ?: 'localhost';
  1244.  
  1245.  
  1246. diff -r symfony/lib/log/sfStreamLogger.class.php symfony1/lib/log/sfStreamLogger.class.php
  1247. 22c22,23
  1248. < protected $stream = null;
  1249. ---
  1250. > protected
  1251. > $stream = null;
  1252.  
  1253.  
  1254. diff -r symfony/lib/mailer/sfMailer.class.php symfony1/lib/mailer/sfMailer.class.php
  1255. 325,329d324
  1256. <
  1257. < static public function initialize()
  1258. < {
  1259. < require_once sfConfig::get('sf_symfony_lib_dir').'/vendor/swiftmailer/swift_init.php';
  1260. < }
  1261.  
  1262.  
  1263. diff -r symfony/lib/plugins/sfDoctrinePlugin/lib/debug/sfWebDebugPanelDoctrine.class.php symfony1/lib/plugins/sfDoctrinePlugin/lib/debug/sfWebDebugPanelDoctrine.class.php
  1264. 32c32
  1265. < return '<img src="' . myDataImages::DATABASE_ICON . '" alt="SQL queries" /> '.count($events);
  1266. ---
  1267. > return '<img src="'.$this->webDebug->getOption('image_root_path').'/database.png" alt="SQL queries" /> '.count($events);
  1268. 120,123c120
  1269. < $query = implode(
  1270. < var_export(is_scalar($param) ?$param : (string) $param, true),
  1271. < explode('?', $query, 2)
  1272. < );
  1273. ---
  1274. > $query = join(var_export(is_scalar($param) ? $param : (string) $param, true), explode('?', $query, 2));
  1275.  
  1276.  
  1277. diff -r symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDeleteModelFilesTask.class.php symfony1/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDeleteModelFilesTask.class.php
  1278. 79c79
  1279. < array_map(create_function('$v', 'return \' - \'.sfDebug::shortenFilePath($v);'), $files),
  1280. ---
  1281. > array_map(function($v) { return ' - '.sfDebug::shortenFilePath($v); }, $files),
  1282. 103c103
  1283. < *
  1284. ---
  1285. > *
  1286. 106c106
  1287. < *
  1288. ---
  1289. > *
  1290.  
  1291.  
  1292. diff -r symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDropDbTask.class.php symfony1/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDropDbTask.class.php
  1293. 76c76
  1294. < array_map(create_function('$v', 'return \' - \'.$v;'), array_keys($databases)),
  1295. ---
  1296. > array_map(function($v) { return ' - '.$v; }, array_keys($databases)),
  1297.  
  1298.  
  1299. diff -r symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php symfony1/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php
  1300. 140c140
  1301. < array_map(create_function('$e', 'return \' - \'.$e->getMessage();'), $migration->getErrors())
  1302. ---
  1303. > array_map(function($e) { return ' - '.$e->getMessage(); }, $migration->getErrors())
  1304. Tylko w symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine: Doctrine
  1305. Tylko w symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine: Doctrine.php
  1306. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/apps/backend: i18n
  1307. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/apps/frontend: i18n
  1308. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures: cache
  1309. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/data: database1.sqlite
  1310. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/data: database2.sqlite
  1311. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/data: database3.sqlite
  1312. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/data: database3.sqlite-journal
  1313. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/lib/filter/doctrine: base
  1314. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/lib/form/doctrine: base
  1315. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/lib: migration
  1316. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/lib/model/doctrine: base
  1317. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures: log
  1318. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures/plugins: .gitkeep
  1319. Tylko w symfony/lib/plugins/sfDoctrinePlugin/test/functional/fixtures: test
  1320. Tylko w symfony/lib/plugins: sfPropelPlugin
  1321.  
  1322.  
  1323. diff -r symfony/lib/request/sfWebRequest.class.php symfony1/lib/request/sfWebRequest.class.php
  1324. 284c284
  1325. < $pathInfo = preg_replace('/^'.preg_quote($uri_prefix, '/').'/','', rawurldecode($pathArray['REQUEST_URI']));
  1326. ---
  1327. > $pathInfo = preg_replace('/^'.preg_quote($uri_prefix, '/').'/','',$pathArray['REQUEST_URI']);
  1328.  
  1329.  
  1330. diff -r symfony/lib/response/sfWebResponse.class.php symfony1/lib/response/sfWebResponse.class.php
  1331. 368c368
  1332. < setcookie($cookie['name'], $cookie['value'], $cookie['expire'], $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httpOnly']);
  1333. ---
  1334. > setrawcookie($cookie['name'], $cookie['value'], $cookie['expire'], $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httpOnly']);
  1335.  
  1336.  
  1337. diff -r symfony/lib/routing/sfPatternRouting.class.php symfony1/lib/routing/sfPatternRouting.class.php
  1338. 30d29
  1339. < protected $lazy_routes_counter = 0;
  1340. 83,84c82
  1341. < $time = sfTimerManager::getTimer('sfPatternRouting->loadConfiguration()');
  1342. < if ($this->options['load_configuration'] && $config = $this->getConfigFilename())
  1343. ---
  1344. > if ($this->options['load_configuration'] && $config = $this->getConfigFileName())
  1345. 90d87
  1346. < $time->addTime();
  1347. 229,250d225
  1348. < /**
  1349. < * Prepend myLazyRoute to the array of ALL routes (not limited to the currently parsed file).
  1350. < *
  1351. < * Preserves order of prepended routes - all routes with 'prepend_route: true' will have
  1352. < * the same order in the routing as in the file, but they will be moved to the beginning.
  1353. < *
  1354. < * @param string $name
  1355. < * @param myLazyRoute $route
  1356. < */
  1357. < public function prependRawLazyRoute($name, myLazyRoute $route)
  1358. < {
  1359. < $this->routes = array_merge(
  1360. < array_slice($this->routes, 0, $this->lazy_routes_counter),
  1361. < array(
  1362. < $name => $route
  1363. < ),
  1364. < array_slice($this->routes, $this->lazy_routes_counter)
  1365. < );
  1366. <
  1367. < $this->lazy_routes_counter++;
  1368. < }
  1369. <
  1370. 448,453c423
  1371. < $this->currentInternalUri = $this->getUpdatedInternalUri($name, $parameters);
  1372. < }
  1373. <
  1374. < public function getUpdatedInternalUri($name, array $parameters)
  1375. < {
  1376. < $internalUri = array('@'.$name, $parameters['module'].'/'.$parameters['action']);
  1377. ---
  1378. > $internalUri = array('@'.$this->currentRouteName, $parameters['module'].'/'.$parameters['action']);
  1379. 467c437
  1380. < return array($internalUri[0].$params, $internalUri[1].$params);
  1381. ---
  1382. > $this->currentInternalUri = array($internalUri[0].$params, $internalUri[1].$params);
  1383. 564,606c534
  1384. < $all_params = $parameters;
  1385. <
  1386. < if (array_key_exists('module', $parameters))
  1387. < {
  1388. < $module = $parameters['module'];
  1389. < unset($parameters['module']);
  1390. < }
  1391. < else
  1392. < {
  1393. < $module = '<no module specified>';
  1394. < }
  1395. <
  1396. < if (array_key_exists('action', $parameters))
  1397. < {
  1398. < $action = $parameters['action'];
  1399. < unset($parameters['action']);
  1400. < }
  1401. < else
  1402. < {
  1403. < $action = '<no action specified>';
  1404. < }
  1405. <
  1406. < if (empty($parameters))
  1407. < {
  1408. < $message = "$module/$action";
  1409. < }
  1410. < else
  1411. < {
  1412. < foreach ($parameters as $param_name => $value)
  1413. < {
  1414. < if (is_object($value))
  1415. < {
  1416. < $value = '<object ' . get_class($value) . '>';
  1417. < }
  1418. <
  1419. < $parameters[$param_name] = "$param_name=$value";
  1420. < }
  1421. <
  1422. < $message = "$module/$action?" . implode('&', $parameters);
  1423. < }
  1424. <
  1425. < // you have used a 'module/action' style url. Fix it!
  1426. < if (in_array(sfConfig::get('sf_app'), array('oferty', 'domy', 'bezposrednie')))
  1427. ---
  1428. > foreach ($this->routes as $name => $route)
  1429. 608,620c536
  1430. < $error_message = "Using non-named routing rules is illegal. A route '$message' was called";
  1431. < if (sfContext::hasInstance())
  1432. < {
  1433. < $request_object = sfContext::getInstance()->getRequest();
  1434. <
  1435. < if ($request_object instanceof sfWebRequest)
  1436. < {
  1437. < $error_message .= ' in ' . $request_object->getUri();
  1438. < }
  1439. < }
  1440. < $error_message .= '.';
  1441. < trigger_error($error_message, E_USER_WARNING);
  1442. < }
  1443. ---
  1444. > $route = $this->getRoute($name);
  1445. 622,625c538
  1446. < $this->ensureDefaultParametersAreSet();
  1447. < foreach ($this->routes as $route)
  1448. < {
  1449. < if ($route->matchesParameters($all_params, $this->options['context']))
  1450. ---
  1451. > if ($route->matchesParameters($parameters, $this->options['context']))
  1452.  
  1453.  
  1454. diff -r symfony/lib/routing/sfRoute.class.php symfony1/lib/routing/sfRoute.class.php
  1455. 42,43d41
  1456. < protected $prepend_route = false;
  1457. <
  1458. 62,63d59
  1459. < $this->setPrependRoute($defaults, $options);
  1460. <
  1461. 93,117d88
  1462. < public function getPrependRoute()
  1463. < {
  1464. < return $this->prepend_route;
  1465. < }
  1466. <
  1467. < protected function setPrependRoute($defaults, $options)
  1468. < {
  1469. < if (isset($options['prepend_route']))
  1470. < {
  1471. < if (true === $options['prepend_route'])
  1472. < {
  1473. < $this->prepend_route = true;
  1474. < }
  1475. < unset($options['prepend_route']);
  1476. < }
  1477. < elseif (isset($defaults['re_esi_cache_request']) && $defaults['re_esi_cache_request'])
  1478. < {
  1479. < $this->prepend_route = true;
  1480. < }
  1481. < else
  1482. < {
  1483. < // nothing
  1484. < }
  1485. < }
  1486. <
  1487. 728c699
  1488. < $preg_quote_hash = create_function('$a', 'return preg_quote($a, \'#\');');
  1489. ---
  1490. > $preg_quote_hash = function($a) { return preg_quote($a, '#'); };
  1491. 738c709
  1492. < $preg_quote_hash_53 = create_function('$a', 'return str_replace(\'-\', \'\-\', preg_quote($a, \'#\'));');
  1493. ---
  1494. > $preg_quote_hash_53 = function($a) { return str_replace('-', '\-', preg_quote($a, '#')); };
  1495.  
  1496.  
  1497. diff -r symfony/lib/storage/sfSessionStorage.class.php symfony1/lib/storage/sfSessionStorage.class.php
  1498. 95,98c95
  1499. < if (!session_start())
  1500. < {
  1501. < myDebug::log('Problem with start session using `session_start()`.', sfLogger::ERR);
  1502. < }
  1503. ---
  1504. > session_start();
  1505.  
  1506.  
  1507. diff -r symfony/lib/task/cache/sfCacheClearTask.class.php symfony1/lib/task/cache/sfCacheClearTask.class.php
  1508. 24,26d23
  1509. < protected $type = null;
  1510. < protected $server_env = null;
  1511. <
  1512. 67,68c64,65
  1513. < The built-in types are: [config|COMMENT], [i18n|COMMENT], [routing|COMMENT], [module|COMMENT],
  1514. < [template|COMMENT] and [assetic|COMMENT].
  1515. ---
  1516. > The built-in types are: [config|COMMENT], [i18n|COMMENT], [routing|COMMENT], [module|COMMENT]
  1517. > and [template|COMMENT].
  1518. 86,88d82
  1519. < $this->type = $options['type'];
  1520. < $this->server_env = null === $this->getEnvironment() ? @file_get_contents('server_env') : $this->getEnvironment();
  1521. <
  1522. 150d143
  1523. < $this->clearAsseticCache($appConfiguration);
  1524. 202,223d194
  1525. < }
  1526. < }
  1527. <
  1528. < public function clearAsseticCache(sfApplicationConfiguration $appConfiguration)
  1529. < {
  1530. < if ($this->server_env != 'dev' && 'assetic' != $this->type)
  1531. < {
  1532. < return;
  1533. < }
  1534. <
  1535. < $assetic_types = array(
  1536. < Assetic::TYPE_CSS,
  1537. < Assetic::TYPE_JS,
  1538. < Assetic::TYPE_JSON,
  1539. < Assetic::TYPE_STATIC_STORAGE
  1540. < );
  1541. <
  1542. < $removed = myAssetic::removeAllCompressedFiles();
  1543. <
  1544. < foreach ($removed as $file)
  1545. < {
  1546. < $this->logSection(is_link($file) ? 'link-' : 'file-', $file);
  1547.  
  1548.  
  1549. diff -r symfony/lib/task/generator/sfGenerateAppTask.class.php symfony1/lib/task/generator/sfGenerateAppTask.class.php
  1550. 98,103d97
  1551. < sfConfig::set('sf_web_dir', sfConfig::get('sf_web_dir') . DIRECTORY_SEPARATOR . $app);
  1552. < if (!is_dir(sfConfig::get('sf_web_dir')))
  1553. < {
  1554. < $this->getFilesystem()->mkdirs(sfConfig::get('sf_web_dir'));
  1555. < }
  1556. <
  1557.  
  1558.  
  1559. diff -r symfony/lib/task/generator/sfGenerateProjectTask.class.php symfony1/lib/task/generator/sfGenerateProjectTask.class.php
  1560. 62,65c62
  1561. < By default, the task configures Doctrine as the ORM. If you want to use
  1562. < Propel, use the [--orm|COMMENT] option:
  1563. <
  1564. < [./symfony generate:project blog --orm=Propel|INFO]
  1565. ---
  1566. > By default, the task configures Doctrine as the ORM.
  1567. 93c90
  1568. < if (!in_array(strtolower($options['orm']), array('propel', 'doctrine', 'none')))
  1569. ---
  1570. > if (!in_array(strtolower($options['orm']), array('doctrine', 'none')))
  1571. 129c126
  1572. < if (in_array($options['orm'], array('Doctrine', 'Propel')))
  1573. ---
  1574. > if ('Doctrine' === $options['orm'])
  1575. Tylko w symfony/lib/task/generator/skeleton/app/app/lib: .sf
  1576. Tylko w symfony/lib/task/generator/skeleton/app: lib
  1577.  
  1578.  
  1579. diff -r symfony/lib/task/help/sfListTask.class.php symfony1/lib/task/help/sfListTask.class.php
  1580. 157c157
  1581. < $namespaceArrayXML[$task->getNamespace()]->setAttribute('id', $task->getNamespace() ? $task->getNamespace() : '_global');
  1582. ---
  1583. > $namespaceArrayXML[$task->getNamespace()]->setAttribute('id', $task->getNamespace() ?: '_global');
  1584.  
  1585.  
  1586. diff -r symfony/lib/task/project/sfProjectPermissionsTask.class.php symfony1/lib/task/project/sfProjectPermissionsTask.class.php
  1587. 6c6
  1588. < *
  1589. ---
  1590. > *
  1591. 25,27d24
  1592. < public static $apps_for_locationTop = array('domy', 'oferty', 'morizon', 'morizon_mobile', 'nportal', 'morizon_wp', 'noweinwestycje');
  1593. < public static $apps_for_assetic = array('admin', 'oferty', 'oferty_mobile', 'domy', 'domy_mobile', 'morizon', 'morizon_mobile', 'noweinwestycje', 'bezposrednie', 'komercyjne', 'nieruchomosci', 'nportal', 'morizon_wp');
  1594. <
  1595. 57,61d53
  1596. < $this->chmod('plugins/StaticCachePlugin/web/locations', 0777);
  1597. < $this->chmod('plugins/StaticCachePlugin/web/post', 0777);
  1598. < $this->chmod('plugins/StaticCachePlugin/web/property_add', 0777);
  1599. < $this->chmod('cache_thumbnails/QRcode', 0777);
  1600. < $this->chmod(sfConfig::get('sf_data_dir') . '/property_cpv', 0777);
  1601. 67,69d58
  1602. < 'plugins/StaticCachePlugin/web/locations',
  1603. < 'plugins/StaticCachePlugin/web/post',
  1604. < 'plugins/StaticCachePlugin/web/property_add'
  1605. 81,108d69
  1606. < $this->chmod('cache_thumbnails', 0777);
  1607. < $this->chmod('log_my', 0777);
  1608. < $this->chmod('log_cron', 0777);
  1609. <
  1610. < // for locationTop
  1611. < foreach (self::$apps_for_locationTop as $app)
  1612. < {
  1613. < $this->chmod('web/'.$app.'/js/loc', 0777);
  1614. < }
  1615. <
  1616. < // for assetic
  1617. < foreach (self::$apps_for_assetic as $app)
  1618. < {
  1619. < $this->chmod('web/'.$app.'/js/auto', 0777);
  1620. < $this->chmod('web/'.$app.'/css/auto', 0777);
  1621. < }
  1622. <
  1623. < $this->chmod('web/morizon/json/auto', 0777);
  1624. < $this->chmod('web/morizon_wp/json/auto', 0777);
  1625. <
  1626. < $event_folder = EventMonitorProvider::getInstance()->getDirectory();
  1627. < if (!file_exists($event_folder))
  1628. < {
  1629. < mkdir($event_folder);
  1630. < }
  1631. <
  1632. < $this->chmod($event_folder, 0777);
  1633. <
  1634. 114c75
  1635. < array_map(create_function('$f', 'return \' - \'.sfDebug::shortenFilePath($f);'), $this->failed)
  1636. ---
  1637. > array_map(function($f) { return ' - '.sfDebug::shortenFilePath($f); }, $this->failed)
  1638. 121c82
  1639. < *
  1640. ---
  1641. > *
  1642. 125c86
  1643. < *
  1644. ---
  1645. > *
  1646. 151c112
  1647. < *
  1648. ---
  1649. > *
  1650.  
  1651.  
  1652. diff -r symfony/lib/task/sfBaseTask.class.php symfony1/lib/task/sfBaseTask.class.php
  1653. 21,27d20
  1654. < const AUTO_ENV = '_auto_';
  1655. <
  1656. < const RETURN_VALUE_OK = 0;
  1657. < const RETURN_VALUE_EXCEPTION = 1;
  1658. < const RETURN_VALUE_ERROR = 255;
  1659. < const RETURN_VALUE_NOT_FINISHED = 2;
  1660. <
  1661. 30c23
  1662. < $pluginManager = null,
  1663. ---
  1664. > $pluginManager = null,
  1665. 33,37d25
  1666. < /**
  1667. < * @var Services
  1668. < */
  1669. < protected $services;
  1670. <
  1671. 62c50
  1672. < $env = $this->detectEnvironment($commandManager);
  1673. ---
  1674. > $env = $commandManager->getOptionSet()->hasOption('env') ? $commandManager->getOptionValue('env') : 'test';
  1675. 76,81d63
  1676. < else
  1677. < {
  1678. < $this->environment = false;
  1679. <
  1680. < $application = null;
  1681. < }
  1682. 88,95d69
  1683. < myTools::setSessionOffRequest();
  1684. <
  1685. < $monitor = MonitorTaskListPeer::monitorStart($this->configuration, $this->getFullName(), $this->getEnvironment(), $application);
  1686. < if (function_exists('newrelic_name_transaction'))
  1687. < {
  1688. < newrelic_name_transaction('/re.frontend/' . $this->getFullName());
  1689. < }
  1690. <
  1691. 98,99d71
  1692. < $monitor->monitorEnd();
  1693. <
  1694. 103,149d74
  1695. < }
  1696. <
  1697. < protected $environment = null;
  1698. <
  1699. < protected function getEnvironment()
  1700. < {
  1701. < return $this->environment;
  1702. < }
  1703. <
  1704. < protected function detectEnvironment(sfCommandManager $commandManager)
  1705. < {
  1706. < if (null === $this->environment)
  1707. < {
  1708. < $env = $commandManager->getOptionSet()->hasOption('env') ? $commandManager->getOptionValue('env') : self::AUTO_ENV;
  1709. <
  1710. < $server_env = ProjectConfiguration::getServerEnvironment();
  1711. <
  1712. < if (self::AUTO_ENV == $env)
  1713. < {
  1714. < switch ($server_env)
  1715. < {
  1716. < case ProjectConfiguration::SERVER_ENV_PROD: $env = 'prod'; break;
  1717. < case ProjectConfiguration::SERVER_ENV_RC: $env = 'rc'; break;
  1718. < case ProjectConfiguration::SERVER_ENV_DEV: $env = 'dev'; break;
  1719. < default:
  1720. < throw new Exception("Server environment $server_env not implemented here.");
  1721. < }
  1722. < }
  1723. < elseif (ProjectConfiguration::SERVER_ENV_PROD == $server_env)
  1724. < {
  1725. < if ('prod' != $env)
  1726. < {
  1727. < $this->logSection('WARNING', "You are using non-prod environment `$env` on production site. Consider using `_auto_` environment option or --env switch.", 200);
  1728. < }
  1729. < }
  1730. < else
  1731. < {
  1732. < if ('prod' == $env)
  1733. < {
  1734. < throw new sfException("Production environment cannot be used on dev or rc machines. Use --env switch or set environment option to `_auto_`.");
  1735. < }
  1736. < }
  1737. <
  1738. < $this->environment = $env;
  1739. < }
  1740. <
  1741. < return $this->environment;
  1742.  
  1743.  
  1744. diff -r symfony/lib/task/sfCommandApplicationTask.class.php symfony1/lib/task/sfCommandApplicationTask.class.php
  1745. 143,148d142
  1746. < /* old way
  1747. < require_once sfConfig::get('sf_symfony_lib_dir').'/vendor/swiftmailer/classes/Swift.php';
  1748. < Swift::registerAutoload();
  1749. < sfMailer::initialize();
  1750. < */
  1751. <
  1752.  
  1753.  
  1754. diff -r symfony/lib/task/sfTask.class.php symfony1/lib/task/sfTask.class.php
  1755. 482c482
  1756. < return $ret ? $ret : $default;
  1757. ---
  1758. > return $ret ?: $default;
  1759. 591c591
  1760. < $taskXML->setAttribute('namespace', $this->getNamespace() ? $this->getNamespace() : '_global');
  1761. ---
  1762. > $taskXML->setAttribute('namespace', $this->getNamespace() ?: '_global');
  1763.  
  1764.  
  1765. diff -r symfony/lib/util/sfBrowserBase.class.php symfony1/lib/util/sfBrowserBase.class.php
  1766. 804c804
  1767. < $method = strtolower(isset($options['method']) ? $options['method'] : ($item->getAttribute('method') ? $item->getAttribute('method') : 'get'));
  1768. ---
  1769. > $method = strtolower(isset($options['method']) ? $options['method'] : ($item->getAttribute('method') ?: 'get'));
  1770. 930c930
  1771. < $tmps = array_filter(preg_split('/(\[ | \[\] | \])/x', $name), create_function('$s', 'return $s !== "";'));
  1772. ---
  1773. > $tmps = array_filter(preg_split('/(\[ | \[\] | \])/x', $name), function($s) { return $s !== ''; });
  1774.  
  1775.  
  1776. diff -r symfony/lib/util/sfContext.class.php symfony1/lib/util/sfContext.class.php
  1777. 92,95d91
  1778. < catch (Error $e)
  1779. < {
  1780. < sfException::createFromError($e)->printStackTrace();
  1781. < }
  1782.  
  1783.  
  1784. diff -r symfony/lib/util/sfDomCssSelector.class.php symfony1/lib/util/sfDomCssSelector.class.php
  1785. 164c164
  1786. < $tagName = $matches[1] ? $matches[1] : '*';
  1787. ---
  1788. > $tagName = $matches[1] ?: '*';
  1789. 543c543
  1790. < return array('selector' => $matches[1], 'parameter' => isset($matches[3]) ? ($matches[3] ? $matches[3] : $matches[4]) : '');
  1791. ---
  1792. > return array('selector' => $matches[1], 'parameter' => isset($matches[3]) ? ($matches[3] ?: $matches[4]) : '');
  1793.  
  1794.  
  1795. diff -r symfony/lib/util/sfToolkit.class.php symfony1/lib/util/sfToolkit.class.php
  1796. 511c511
  1797. < $path = getenv('PATH') ? getenv('PATH') : getenv('Path');
  1798. ---
  1799. > $path = getenv('PATH') ?: getenv('Path');
  1800.  
  1801.  
  1802. diff -r symfony/lib/validator/sfValidatorChoice.class.php symfony1/lib/validator/sfValidatorChoice.class.php
  1803. 165,169d164
  1804. < if (is_array($value))
  1805. < {
  1806. < return false;
  1807. < }
  1808. <
  1809.  
  1810.  
  1811. diff -r symfony/lib/validator/sfValidatorDate.class.php symfony1/lib/validator/sfValidatorDate.class.php
  1812. 72c72
  1813. < if (!preg_match($regex, $value, $matches))
  1814. ---
  1815. > if (!preg_match($regex, $value, $match))
  1816. 74c74
  1817. < throw new sfValidatorError($this, 'bad_format', array('value' => $value, 'date_format' => $this->getOption('date_format_error') ? $this->getOption('date_format_error') : $this->getOption('date_format')));
  1818. ---
  1819. > throw new sfValidatorError($this, 'bad_format', array('value' => $value, 'date_format' => $this->getOption('date_format_error') ?: $this->getOption('date_format')));
  1820. 77,85c77
  1821. < if (count($matches) == 1)
  1822. < {
  1823. < $value = $matches[0];
  1824. < }
  1825. < else
  1826. < {
  1827. < unset($matches[0]);
  1828. < $value = $matches;
  1829. < }
  1830. ---
  1831. > $value = $match;
  1832.  
  1833.  
  1834. diff -r symfony/lib/validator/sfValidatorErrorSchema.class.php symfony1/lib/validator/sfValidatorErrorSchema.class.php
  1835. 286,287c286,287
  1836. < array_map(create_function('$e', 'return $e->getCode();'), $this->globalErrors),
  1837. < array_map(create_function('$n,$e', 'return $n.\' [\'.$e->getCode().\']\';'), array_keys($this->namedErrors), array_values($this->namedErrors))
  1838. ---
  1839. > array_map(function($e) { /** @var $e sfValidatorError */ return $e->getCode(); }, $this->globalErrors),
  1840. > array_map(function($n, $e) { /** @var $e sfValidatorError */ return $n.' ['.$e->getCode().']'; }, array_keys($this->namedErrors), array_values($this->namedErrors))
  1841. 297,298c297,298
  1842. < array_map(create_function('$e', 'return $e->getMessage();'), $this->globalErrors),
  1843. < array_map(create_function('$n,$e', 'return $n.\' [\'.$e->getMessage().\']\';'), array_keys($this->namedErrors), array_values($this->namedErrors))
  1844. ---
  1845. > array_map(function($e) { /** @var $e sfValidatorError */ return $e->getMessage(); }, $this->globalErrors),
  1846. > array_map(function($n, $e) { /** @var $e sfValidatorError */ return $n.' ['.$e->getMessage().']'; }, array_keys($this->namedErrors), array_values($this->namedErrors))
  1847.  
  1848.  
  1849. diff -r symfony/lib/validator/sfValidatorFromDescription.class.php symfony1/lib/validator/sfValidatorFromDescription.class.php
  1850. 297c297
  1851. < return sprintf('new %s(%s)', $this->class, implode(', ', array_map(create_function('$a', 'return var_export($a, true);'), $this->arguments)));
  1852. ---
  1853. > return sprintf('new %s(%s)', $this->class, implode(', ', array_map(function($a) { return var_export($a, true); }, $this->arguments)));
  1854. 356c356
  1855. < implode(', ', array_map(create_function('$a', 'return var_export($a, true);'), $this->arguments))
  1856. ---
  1857. > implode(', ', array_map(function($a) { return var_export($a, true); }, $this->arguments))
  1858. Tylko w symfony/lib/validator: sfValidatorSchemaForEach.class.php
  1859.  
  1860.  
  1861. diff -r symfony/lib/validator/sfValidatorString.class.php symfony1/lib/validator/sfValidatorString.class.php
  1862. 21,23d20
  1863. <
  1864. < protected $search = array("\t","\n","\r\n","\0","\v");
  1865. <
  1866. 51,52d47
  1867. <
  1868. < $this->setMessage('invalid', '"%value%" is not a string.');
  1869. 60,65c55
  1870. < if (is_array($value) || is_object($value))
  1871. < {
  1872. < throw new sfValidatorError($this, 'invalid', array('value' => $value));
  1873. < }
  1874. <
  1875. < $clean = str_replace($this->search,'',(string) $value);
  1876. ---
  1877. > $clean = (string) $value;
  1878.  
  1879.  
  1880. diff -r symfony/lib/vendor/lime/lime.php symfony1/lib/vendor/lime/lime.php
  1881. 818,821d817
  1882. <
  1883. < /**
  1884. < * @var lime_output
  1885. < */
  1886. 838,839c834
  1887. < 'custom' => false,
  1888. < 'test_path' => sys_get_temp_dir(),
  1889. ---
  1890. > 'test_path' => sys_get_temp_dir(),
  1891. 923,924d917
  1892. < $this->output->echoln('');
  1893. <
  1894. 945,946d937
  1895. < $output_contents = '';
  1896. <
  1897. 950,953d940
  1898. < if ($this->options['custom'])
  1899. < {
  1900. < $output_contents = ob_get_contents();
  1901. < }
  1902. 961,965c948
  1903. < $stats['output'] = array(array('file' => $file, 'tests' => array(), 'stats' => array('plan' => 1, 'total' => 1, 'failed' => array(0), 'passed' => array(), 'skipped' => array())));
  1904. < }
  1905. < else
  1906. < {
  1907. < $output_contents = '';
  1908. ---
  1909. > $stats['output'] = array(array('file' => $file, 'tests' => array(), 'stats' => array('plan' => 1, 'total' => 1, 'failed' => array(0), 'passed' => array(), 'skipped' => array(), 'errors' => array())));
  1910. 1034,1067c1017
  1911. < if ($this->options['custom'])
  1912. < {
  1913. < $tests_details = $stats['output'][0]['tests'];
  1914. <
  1915. < $tests_ok = array();
  1916. < foreach ($tests_details as $test_no => $test_data)
  1917. < {
  1918. < if ($test_data['status'])
  1919. < {
  1920. < $tests_ok[] = $test_no;
  1921. < }
  1922. < }
  1923. <
  1924. < if ($tests_ok)
  1925. < {
  1926. < $this->output->echoln(sprintf(" Tests ok: %s", implode(', ', $tests_ok)));
  1927. < }
  1928. <
  1929. < foreach ($tests_details as $test_no => $test_data)
  1930. < {
  1931. < if (!$test_data['status'])
  1932. < {
  1933. < $this->output->echoln(sprintf(" %d: %s => %s",
  1934. < $test_no,
  1935. < trim($test_data['message']),
  1936. < empty($test_data['error']) ? 'failed' : preg_replace('/[\s\n]+/', ' ', str_replace("\n", ' ', trim($test_data['error'])))
  1937. < ));
  1938. < }
  1939. < }
  1940. < }
  1941. < else
  1942. < {
  1943. < $this->output->echoln(sprintf(" Failed tests: %s", implode(', ', $file_stats['failed'])));
  1944. < }
  1945. ---
  1946. > $this->output->echoln(sprintf(" Failed tests: %s", implode(', ', $file_stats['failed'])));
  1947. 1070,1075d1019
  1948. < if ($output_contents)
  1949. < {
  1950. < echo "\n------------ DEBUG ------------\n$output_contents\n------------ END ------------\n\n";
  1951. < throw new sfException("Test crashed, see debug message.");
  1952. < }
  1953. <
  1954. 1094c1038,1043
  1955. < if (!$this->options['custom'])
  1956. ---
  1957. > $format = "%-30s %4s %5s %5s %5s %s";
  1958. > $this->output->echoln(sprintf($format, 'Failed Test', 'Stat', 'Total', 'Fail', 'Errors', 'List of Failed'));
  1959. > $this->output->echoln("--------------------------------------------------------------------------");
  1960. > foreach ($this->stats['files'] as $file => $stat)
  1961. > {
  1962. > if (!in_array($file, $this->stats['failed_files']))
  1963. 1096,1115c1045,1047
  1964. < $format = "%-30s %4s %5s %5s %5s %s";
  1965. < $this->output->echoln(sprintf($format, 'Failed Test', 'Stat', 'Total', 'Fail', 'Errors', 'List of Failed'));
  1966. < $this->output->echoln("--------------------------------------------------------------------------");
  1967. < foreach ($this->stats['files'] as $file => $stat)
  1968. < {
  1969. < if (!in_array($file, $this->stats['failed_files']))
  1970. < {
  1971. < continue;
  1972. < }
  1973. < $relative_file = $this->get_relative_file($file);
  1974. <
  1975. < if (isset($stat['output'][0]))
  1976. < {
  1977. < $this->output->echoln(sprintf($format, substr($relative_file, -min(30, strlen($relative_file))), $stat['status_code'], count($stat['output'][0]['stats']['failed']) + count($stat['output'][0]['stats']['passed']), count($stat['output'][0]['stats']['failed']), count($stat['output'][0]['stats']['errors']), implode(' ', $stat['output'][0]['stats']['failed'])));
  1978. < }
  1979. < else
  1980. < {
  1981. < $this->output->echoln(sprintf($format, substr($relative_file, -min(30, strlen($relative_file))), $stat['status_code'], '', '', ''));
  1982. < }
  1983. < }
  1984. ---
  1985. > continue;
  1986. > }
  1987. > $relative_file = $this->get_relative_file($file);
  1988. 1117,1118c1049,1057
  1989. < $this->output->echoln('');
  1990. < }
  1991. ---
  1992. > if (isset($stat['output'][0]))
  1993. > {
  1994. > $this->output->echoln(sprintf($format, substr($relative_file, -min(30, strlen($relative_file))), $stat['status_code'], count($stat['output'][0]['stats']['failed']) + count($stat['output'][0]['stats']['passed']), count($stat['output'][0]['stats']['failed']), count($stat['output'][0]['stats']['errors']), implode(' ', $stat['output'][0]['stats']['failed'])));
  1995. > }
  1996. > else
  1997. > {
  1998. > $this->output->echoln(sprintf($format, substr($relative_file, -min(30, strlen($relative_file))), $stat['status_code'], '', '', ''));
  1999. > }
  2000. > }
  2001. 1131,1132d1069
  2002. < $this->output->echoln('');
  2003. <
  2004. 1162,1163d1098
  2005. <
  2006. < $this->output->echoln('');
  2007. Tylko w symfony/lib/vendor/swiftmailer: classes
  2008. Tylko w symfony/lib/vendor/swiftmailer: dependency_maps
  2009. Tylko w symfony/lib/vendor/swiftmailer: mime_types.php
  2010. Tylko w symfony/lib/vendor/swiftmailer: preferences.php
  2011. Tylko w symfony/lib/vendor/swiftmailer: swift_init.php
  2012. Tylko w symfony/lib/vendor/swiftmailer: swift_required_pear.php
  2013. Tylko w symfony/lib/vendor/swiftmailer: swift_required.php
  2014.  
  2015.  
  2016. diff -r symfony/lib/view/sfPartialView.class.php symfony1/lib/view/sfPartialView.class.php
  2017. 93,97d92
  2018. < if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled'))
  2019. < {
  2020. < $timer->addTime();
  2021. < }
  2022. <
  2023.  
  2024.  
  2025. diff -r symfony/lib/view/sfViewCacheManager.class.php symfony1/lib/view/sfViewCacheManager.class.php
  2026. 288,294c288
  2027. <
  2028. < /**
  2029. < * Zmiana kodowania parametrów dla cache-a akcji
  2030. < * https://intranet.melog.com/mantis/view.php?id=3076289
  2031. < * @author rlalak
  2032. < */
  2033. < /* foreach ($params as $key => $value)
  2034. ---
  2035. > foreach ($params as $key => $value)
  2036. 297,298c291
  2037. < } */
  2038. < $cacheKey .= '/' . $this->computeCacheKey($params);
  2039. ---
  2040. > }
  2041. 1049c1042
  2042. < <div style="height: 16px; padding: 2px"><a href="#" onclick="sfWebDebugToggle(\'sub_main_info_'.$id.'\'); return false;"><strong>cache information</strong></a>&nbsp;<a href="#" onclick="sfWebDebugToggle(\'sub_main_'.$id.'\'); document.getElementById(\'main_'.$id.'\').style.border = \'none\'; return false;">'.image_tag(myDataImages::CLOSE_ICON_GRAY, array('alt' => 'close')).'</a>&nbsp;</div>
  2043. ---
  2044. > <div style="height: 16px; padding: 2px"><a href="#" onclick="sfWebDebugToggle(\'sub_main_info_'.$id.'\'); return false;"><strong>cache information</strong></a>&nbsp;<a href="#" onclick="sfWebDebugToggle(\'sub_main_'.$id.'\'); document.getElementById(\'main_'.$id.'\').style.border = \'none\'; return false;">'.image_tag(sfConfig::get('sf_web_debug_web_dir').'/images/close.png', array('alt' => 'close')).'</a>&nbsp;</div>
  2045.  
  2046.  
  2047. diff -r symfony/lib/widget/sfWidget.class.php symfony1/lib/widget/sfWidget.class.php
  2048. 365c365
  2049. < return self::fixDoubleEscape(htmlspecialchars(!is_array($value) ? (string) $value : null, ENT_QUOTES, self::getCharset()));
  2050. ---
  2051. > return self::fixDoubleEscape(htmlspecialchars((string) $value, ENT_QUOTES, self::getCharset()));
  2052.  
  2053.  
  2054. diff -r symfony/lib/widget/sfWidgetFormInput.class.php symfony1/lib/widget/sfWidgetFormInput.class.php
  2055. 55,62d54
  2056. < // https://intranet.melog.com/mantis/view.php?id=4399613
  2057. < if(! array_key_exists('class', $attributes))
  2058. < {
  2059. < $attributes['class'] = '';
  2060. < }
  2061. < $attributes['class'] .= ' custom'.ucfirst(strtolower($this->getOption('type')));
  2062. < $attributes['class'] = trim($attributes['class']);
  2063. <
  2064. Tylko w symfony/lib/widget: sfWidgetFormSchemaForEach.class.php
  2065.  
  2066.  
  2067. diff -r symfony/lib/widget/sfWidgetFormSelectCheckbox.class.php symfony1/lib/widget/sfWidgetFormSelectCheckbox.class.php
  2068. 64,71d63
  2069. < // https://intranet.melog.com/mantis/view.php?id=4399613
  2070. < if(! array_key_exists('class', $attributes))
  2071. < {
  2072. < $attributes['class'] = '';
  2073. < }
  2074. < $attributes['class'] .= ' customCheckbox';
  2075. < $attributes['class'] = trim($attributes['class']);
  2076. <
  2077.  
  2078.  
  2079. diff -r symfony/lib/widget/sfWidgetFormSelectRadio.class.php symfony1/lib/widget/sfWidgetFormSelectRadio.class.php
  2080. 64,71d63
  2081. < // https://intranet.melog.com/mantis/view.php?id=4399613
  2082. < if(! array_key_exists('class', $attributes))
  2083. < {
  2084. < $attributes['class'] = '';
  2085. < }
  2086. < $attributes['class'] .= ' customRadio';
  2087. < $attributes['class'] = trim($attributes['class']);
  2088. <
  2089. 108c100
  2090. < if ((string)$key == (string)($value === false ? 0 : (is_array($value) ? end($value) : $value)))
  2091. ---
  2092. > if ((string) $key == (string) ($value === false ? 0 : $value))
  2093. Tylko w symfony/lib/yaml: sfYamlDumper.php
  2094. Tylko w symfony/lib/yaml: sfYamlInline.php
  2095. Tylko w symfony/lib/yaml: sfYamlParser.php
  2096. Tylko w symfony/lib/yaml: sfYaml.php
  2097. Tylko w symfony/: LICENSE
  2098. Tylko w symfony/: README
  2099.  
  2100.  
  2101. diff -r symfony/test/bin/loc.php symfony1/test/bin/loc.php
  2102. 29,30d28
  2103. < $root_dir.'/lib/plugins/sfPropelPlugin/test/unit',
  2104. < $root_dir.'/lib/plugins/sfPropelPlugin/test/functional',
  2105. Tylko w symfony/test/functional/fixtures/apps/cache: i18n
  2106. Tylko w symfony/test/functional/fixtures/apps/cache/modules/cache: lib
  2107. Tylko w symfony/test/functional/fixtures/apps/cache/modules/nocache: lib
  2108. Tylko w symfony/test/functional/fixtures/apps/frontend: i18n
  2109. Tylko w symfony/test/functional/fixtures/apps/i18n/modules/i18n: config
  2110. Tylko w symfony/test/functional/fixtures: cache
  2111. Tylko w symfony/test/functional/fixtures/config: propel.ini
  2112. Tylko w symfony/test/functional/fixtures/data: sql
  2113. Tylko w symfony/test/functional/fixtures: log
  2114. Tylko w symfony/test/other/fixtures: propel
  2115. Tylko w symfony/test/other/fixtures/task: aTask.class.php
  2116. Tylko w symfony/test/other/fixtures/task: zTask.class.php
  2117.  
  2118.  
  2119. diff -r symfony/test/unit/addon/sfPagerTest.php symfony1/test/unit/addon/sfPagerTest.php
  2120. 43c43
  2121. < $t->is($countRuns, $pager->count(), '->rewind will allow reiterating');
  2122. ---
  2123. > $t->is($countRuns, $pager->count(), '->rewind will allow reiterating');
  2124. Tylko w symfony/test/unit/validator: sfValidatorSchemaForEachTest.php
  2125. Tylko w symfony/test/unit/widget: sfWidgetFormSchemaForEachTest.php
  2126.  
  2127.  
  2128. diff -r symfony/.travis.yml symfony1/.travis.yml
  2129. 10c10
  2130. < - hhvm
  2131. ---
  2132. > - 7.2
  2133. 17d16
  2134. < - php: hhvm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement