- Timestamp:
- Nov 29, 2009, 1:35:19 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/cat_modify.php
r4367 r4385 243 243 244 244 'CAT_STATUS' => $category['status'], 245 'CAT_VISIBLE' => $category['visible'],246 'CAT_COMMENTABLE' => $category['commentable'],247 'CAT_UPLOADABLE' => $category['uploadable'],245 'CAT_VISIBLE' => boolean_to_string($category['visible']), 246 'CAT_COMMENTABLE' => boolean_to_string($category['commentable']), 247 'CAT_UPLOADABLE' => boolean_to_string($category['uploadable']), 248 248 249 249 'IMG_ORDER_DEFAULT' => empty($category['image_order']) ? -
trunk/admin/include/c13y_internal.class.php
r4325 r4385 39 39 function c13y_version($c13y) 40 40 { 41 global $conf; 42 41 43 $check_list = array(); 42 44 … … 44 46 45 47 $db_version = pwg_get_db_version(); 46 $check_list[] = array('type' => 'MySQL', 'current' => $db_version, 'required' => REQUIRED_MYSQL_VERSION); 48 $check_list[] = array('type' => $conf['dblayer'], 49 'current' => $db_version, 50 'required' => constant('REQUIRED_'.strtoupper($conf['dblayer']).'_VERSION') 51 ); 47 52 48 53 foreach ($check_list as $elem) -
trunk/admin/include/functions.php
r4334 r4385 417 417 { 418 418 $query = ' 419 SELECT id, i f(id_uppercat is null,\'\',id_uppercat) AS id_uppercat, uppercats, rank, global_rank419 SELECT id, id_uppercat, uppercats, rank, global_rank 420 420 FROM '.CATEGORIES_TABLE.' 421 421 ORDER BY id_uppercat,rank,name'; -
trunk/admin/include/plugins.class.php
r4034 r4385 81 81 { 82 82 $query = ' 83 INSERT INTO ' . PLUGINS_TABLE . ' (id,version) VALUES ( "'84 . $plugin_id . ' ","' . $this->fs_plugins[$plugin_id]['version'] . '"83 INSERT INTO ' . PLUGINS_TABLE . ' (id,version) VALUES (\'' 84 . $plugin_id . '\',\'' . $this->fs_plugins[$plugin_id]['version'] . '\' 85 85 )'; 86 86 pwg_query($query); … … 111 111 $query = ' 112 112 UPDATE ' . PLUGINS_TABLE . ' 113 SET state= "active", version="'.$this->fs_plugins[$plugin_id]['version'].'"114 WHERE id= "' . $plugin_id . '"';113 SET state=\'active\', version=\''.$this->fs_plugins[$plugin_id]['version'].'\' 114 WHERE id=\'' . $plugin_id . '\''; 115 115 pwg_query($query); 116 116 } … … 127 127 } 128 128 $query = ' 129 UPDATE ' . PLUGINS_TABLE . ' SET state= "inactive" WHERE id="' . $plugin_id . '"';129 UPDATE ' . PLUGINS_TABLE . ' SET state=\'inactive\' WHERE id=\'' . $plugin_id . '\''; 130 130 pwg_query($query); 131 131 if (file_exists($file_to_include)) … … 145 145 } 146 146 $query = ' 147 DELETE FROM ' . PLUGINS_TABLE . ' WHERE id= "' . $plugin_id . '"';147 DELETE FROM ' . PLUGINS_TABLE . ' WHERE id=\'' . $plugin_id . '\''; 148 148 pwg_query($query); 149 149 if (file_exists($file_to_include)) -
trunk/admin/intro.php
r4325 r4385 197 197 'OS' => PHP_OS, 198 198 'PHP_VERSION' => phpversion(), 199 'DB_ENGINE' => 'MySQL',199 'DB_ENGINE' => $conf['dblayer'], 200 200 'DB_VERSION' => $db_version, 201 201 'DB_ELEMENTS' => l10n_dec('%d element', '%d elements', $nb_elements), -
trunk/comments.php
r4367 r4385 322 322 WHERE '.implode(' 323 323 AND ', $page['where_clauses']).' 324 GROUP BY comment_id 324 GROUP BY comment_id, com.image_id, ic.category_id, com.author, 325 com.author_id, com.date, com.content, com.validated 325 326 ORDER BY '.$page['sort_by'].' '.$page['sort_order']; 326 327 if ('all' != $page['items_number']) -
trunk/include/common.inc.php
r4325 r4385 93 93 include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); 94 94 @include(PHPWG_ROOT_PATH. 'include/config_local.inc.php'); 95 include(PHPWG_ROOT_PATH .'include/dblayer/functions_ mysql.inc.php');95 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php'); 96 96 97 97 if(isset($conf['show_php_errors']) && !empty($conf['show_php_errors'])) -
trunk/include/dblayer/functions_mysql.inc.php
r4367 r4385 539 539 } 540 540 541 /** 542 * 543 * interval and date functions 544 * 545 */ 546 547 548 function pwg_db_get_recent_period_expression($period, $date='CURRENT_DATE') 549 { 550 if ($date!='CURRENT_DATE') 551 { 552 $date = '\''.$date.'\''; 553 } 554 555 return 'SUBDATE('.$date.',INTERVAL '.$period.' DAY)'; 556 } 557 558 function pwg_db_get_recent_period($period, $date='CURRENT_DATE') 559 { 560 $query = ' 561 SELECT '.pwg_db_get_recent_period_expression($period); 562 list($d) = pwg_db_fetch_row(pwg_query($query)); 563 564 return $d; 565 } 566 567 function pwg_db_get_date_YYYYMM($date) 568 { 569 return 'DATE_FORMAT('.$date.', \'%Y%m\')'; 570 } 571 572 function pwg_db_get_date_MMDD($date) 573 { 574 return 'DATE_FORMAT('.$date.', \'%m%d\')'; 575 } 576 577 function pwg_db_get_year($date) 578 { 579 return 'YEAR('.$date.')'; 580 } 581 582 function pwg_db_get_month($date) 583 { 584 return 'MONTH('.$date.')'; 585 } 586 587 function pwg_db_get_week($date, $mode=null) 588 { 589 if ($mode) 590 { 591 return 'WEEK('.$date.', '.$mode.')'; 592 } 593 else 594 { 595 return 'WEEK('.$date.')'; 596 } 597 } 598 599 function pwg_db_get_dayofmonth($date) 600 { 601 return 'DAYOFMONTH('.$date.')'; 602 } 603 604 function pwg_db_get_dayofweek($date) 605 { 606 return 'DAYOFWEEK('.$date.')'; 607 } 608 609 function pwg_db_get_weekday($date) 610 { 611 return 'WEEKDAY('.$date.')'; 612 } 613 541 614 // my_error returns (or send to standard output) the message concerning the 542 615 // error occured for the last mysql query. -
trunk/include/functions_calendar.inc.php
r3282 r4385 259 259 if ($must_show_list) 260 260 { 261 $query = 'SELECT DISTINCT(id)';261 $query = 'SELECT id'; 262 262 $query .= $calendar->inner_sql.' 263 263 '.$calendar->get_date_where(); … … 285 285 '.$order_by; 286 286 } 287 $page['items'] 287 $page['items'] = array_from_query($query, 'id'); 288 288 } 289 289 pwg_debug('end initialize_calendar'); 290 290 } 291 292 291 ?> -
trunk/include/functions_user.inc.php
r4367 r4385 643 643 644 644 $query.= ' 645 GROUP BY c.id ';645 GROUP BY c.id, c.global_rank'; 646 646 647 647 $result = pwg_query($query); -
trunk/include/section_init.inc.php
r4367 r4385 123 123 124 124 $page = array_merge( $page, parse_section_url( $tokens, $next_token) ); 125 125 126 if ( !isset($page['section']) ) 126 127 { … … 157 158 } 158 159 159 160 160 $page = array_merge( $page, parse_well_known_params_url( $tokens, $next_token) ); 161 162 163 161 if ( script_basename()=='picture' and 'categories'==$page['section'] and 164 162 !isset($page['category']) and !isset($page['chronology_field']) ) -
trunk/install.php
r4326 r4385 293 293 $step = 2; 294 294 $file_content = '<?php 295 $conf[\'dblayer\'] = \'mysql\'; 295 296 $conf[\'db_base\'] = \''.$dbname.'\'; 296 297 $conf[\'db_user\'] = \''.$dbuser.'\'; -
trunk/random.php
r4367 r4385 39 39 40 40 $query = ' 41 SELECT DISTINCT(id)41 SELECT id 42 42 FROM '.IMAGES_TABLE.' 43 43 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id -
trunk/upgrade.php
r4325 r4385 44 44 include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); 45 45 @include(PHPWG_ROOT_PATH. 'include/config_local.inc.php'); 46 include(PHPWG_ROOT_PATH .'include/dblayer/functions_ mysql.inc.php');46 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php'); 47 47 48 48 prepare_conf_upgrade(); -
trunk/upgrade_feed.php
r4325 r4385 36 36 include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); 37 37 @include(PHPWG_ROOT_PATH. 'include/config_local.inc.php'); 38 include(PHPWG_ROOT_PATH .'include/dblayer/functions_ mysql.inc.php');38 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php'); 39 39 40 40 // +-----------------------------------------------------------------------+
Note: See TracChangeset
for help on using the changeset viewer.