Changeset 13736 for trunk/i.php
- Timestamp:
- Mar 26, 2012, 6:07:03 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/i.php
r13651 r13736 29 29 defined('PWG_DERIVATIVE_DIR') or define('PWG_DERIVATIVE_DIR', $conf['data_location'].'i/'); 30 30 31 @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'config/database.inc.php'); 32 33 31 34 function trigger_action() {} 32 35 function get_extension( $filename ) … … 373 376 } 374 377 378 include_once(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php'); 375 379 include_once( PHPWG_ROOT_PATH .'/include/derivative_params.inc.php'); 376 380 include_once( PHPWG_ROOT_PATH .'/include/derivative_std_params.inc.php'); 377 381 378 ImageStdParams::load_from_file(); 382 try 383 { 384 $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'], 385 $conf['db_password'], $conf['db_base']); 386 } 387 catch (Exception $e) 388 { 389 ilog("db error", $e->getMessage()); 390 } 391 list($conf['derivatives']) = pwg_db_fetch_row(pwg_query('SELECT value FROM '.$prefixeTable.'config WHERE param=\'derivatives\'')); 392 ImageStdParams::load_from_db(); 379 393 380 394 … … 429 443 && strpos($page['src_location'], 'plugins/')===false) 430 444 { 431 @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'config/database.inc.php');432 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php');433 445 try 434 446 { 435 $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],436 $conf['db_password'], $conf['db_base']);437 447 $query = 'SELECT coi, width, height FROM '.$prefixeTable.'images WHERE path=\''.$page['src_location'].'\''; 438 448 if ( ($row=pwg_db_fetch_assoc(pwg_query($query))) ) … … 444 454 $page['coi'] = $row['coi']; 445 455 } 446 mysql_close($pwg_db_link);447 456 if (!$row) 448 457 { … … 455 464 } 456 465 } 466 mysql_close($pwg_db_link); 457 467 458 468 try_switch_source($params, $src_mtime);
Note: See TracChangeset
for help on using the changeset viewer.