Changeset 25728
- Timestamp:
- Nov 26, 2013, 9:48:08 PM (10 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_category.inc.php
r25658 r25728 481 481 } 482 482 483 /** 484 * Get computed array of categories, that means cache data of all categories 485 * available for the current user (count_categories, count_images, etc.). 486 * 487 * @param array &$userdata 488 * @param int $filter_days number of recent days to filter on or null 489 * @return array 490 */ 491 function get_computed_categories(&$userdata, $filter_days=null) 492 { 493 $query = 'SELECT c.id AS cat_id, id_uppercat'; 494 // Count by date_available to avoid count null 495 $query .= ', 496 MAX(date_available) AS date_last, COUNT(date_available) AS nb_images 497 FROM '.CATEGORIES_TABLE.' as c 498 LEFT JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON ic.category_id = c.id 499 LEFT JOIN '.IMAGES_TABLE.' AS i 500 ON ic.image_id = i.id 501 AND i.level<='.$userdata['level']; 502 503 if ( isset($filter_days) ) 504 { 505 $query .= ' AND i.date_available > '.pwg_db_get_recent_period_expression($filter_days); 506 } 507 508 if ( !empty($userdata['forbidden_categories']) ) 509 { 510 $query.= ' 511 WHERE c.id NOT IN ('.$userdata['forbidden_categories'].')'; 512 } 513 514 $query.= ' 515 GROUP BY c.id'; 516 517 $result = pwg_query($query); 518 519 $userdata['last_photo_date'] = null; 520 $cats = array(); 521 while ($row = pwg_db_fetch_assoc($result)) 522 { 523 $row['user_id'] = $userdata['id']; 524 $row['nb_categories'] = 0; 525 $row['count_categories'] = 0; 526 $row['count_images'] = (int)$row['nb_images']; 527 $row['max_date_last'] = $row['date_last']; 528 if ($row['date_last'] > $userdata['last_photo_date']) 529 { 530 $userdata['last_photo_date'] = $row['date_last']; 531 } 532 533 $cats[$row['cat_id']] = $row; 534 } 535 536 foreach ($cats as $cat) 537 { 538 if ( !isset( $cat['id_uppercat'] ) ) 539 continue; 540 541 $parent = & $cats[ $cat['id_uppercat'] ]; 542 $parent['nb_categories']++; 543 544 do 545 { 546 $parent['count_images'] += $cat['nb_images']; 547 $parent['count_categories']++; 548 549 if ((empty($parent['max_date_last'])) or ($parent['max_date_last'] < $cat['date_last'])) 550 { 551 $parent['max_date_last'] = $cat['date_last']; 552 } 553 554 if ( !isset( $parent['id_uppercat'] ) ) 555 break; 556 $parent = & $cats[$parent['id_uppercat']]; 557 } 558 while (true); 559 unset($parent); 560 } 561 562 if ( isset($filter_days) ) 563 { 564 foreach ($cats as $category) 565 { 566 if (empty($category['max_date_last'])) 567 { 568 remove_computed_category($cats, $category); 569 } 570 } 571 } 572 return $cats; 573 } 574 575 /** 576 * Removes a category from computed array of categories and updates counters. 577 * 578 * @param array &$cats 579 * @param array $cat category to remove 580 */ 581 function remove_computed_category(&$cats, $cat) 582 { 583 if ( isset($cats[$cat['id_uppercat']]) ) 584 { 585 $parent = &$cats[ $cat['id_uppercat'] ]; 586 $parent['nb_categories']--; 587 588 do 589 { 590 $parent['count_images'] -= $cat['nb_images']; 591 $parent['count_categories'] -= 1+$cat['count_categories']; 592 593 if ( !isset($cats[$parent['id_uppercat']]) ) 594 { 595 break; 596 } 597 $parent = &$cats[$parent['id_uppercat']]; 598 } 599 while (true); 600 } 601 602 unset($cats[$cat['cat_id']]); 603 } 604 483 605 ?> -
trunk/include/functions_user.inc.php
r25633 r25728 22 22 // +-----------------------------------------------------------------------+ 23 23 24 // validate_mail_address: 25 // o verifies whether the given mail address has the 26 // right format. ie someone@domain.com "someone" can contain ".", "-" or 27 // even "_". Exactly as "domain". The extension doesn't have to be 28 // "com". The mail address can also be empty. 29 // o check if address could be empty 30 // o check if address is not used by a other user 31 // If the mail address doesn't correspond, an error message is returned. 32 // 24 /** 25 * @package functions\user 26 */ 27 28 29 /** 30 * Checks if an email is well formed and not already in use. 31 * 32 * @param int $user_id 33 * @param string $mail_address 34 * @return string|void error message or nothing 35 */ 33 36 function validate_mail_address($user_id, $mail_address) 34 37 { … … 63 66 } 64 67 65 // validate_login_case: 66 // o check if login is not used by a other user 67 // If the login doesn't correspond, an error message is returned. 68 // 68 /** 69 * Checks if a login is not already in use. 70 * Comparision is case insensitive. 71 * 72 * @param string $login 73 * @return string|void error message or nothing 74 */ 69 75 function validate_login_case($login) 70 76 { … … 88 94 } 89 95 /** 90 * For test on username case sensitivity 91 * 92 * @param : $username typed in by user for identification 93 * 94 * @return : $username found in database 95 * 96 * Searches for user with the same username in different case. 97 * 98 * @param string $username typically typed in by user for identification 99 * @return string $username found in database 96 100 */ 97 101 function search_case_username($username) … … 122 126 123 127 /** 124 * create a new user 128 * Creates a new user. 129 * 125 130 * @param string $login 126 131 * @param string $password 127 132 * @param string $mail_adress 128 133 * @param bool $notify_admin 129 * @param &array $errors134 * @param array &$errors populated with error messages 130 135 * @param bool $notify_user 131 * @return int| bool136 * @return int|false user id or false 132 137 */ 133 138 function register_user($login, $password, $mail_address, $notify_admin=true, &$errors = array(), $notify_user=false) … … 286 291 } 287 292 288 function build_user( $user_id, $use_cache ) 293 /** 294 * Fetches user data from database. 295 * Same that getuserdata() but with additional tests for guest. 296 * 297 * @param int $user_id 298 * @param boolean $user_cache 299 * @return array 300 */ 301 function build_user($user_id, $use_cache=true) 289 302 { 290 303 global $conf; … … 309 322 310 323 /** 311 * find informations related to the user identifier312 * 313 * @param int user identifier314 * @param boolean use_cache315 * @ paramarray316 */ 317 function getuserdata($user_id, $use_cache )324 * Finds informations related to the user identifier. 325 * 326 * @param int $user_id 327 * @param boolean $use_cache 328 * @return array 329 */ 330 function getuserdata($user_id, $use_cache=false) 318 331 { 319 332 global $conf; … … 504 517 } 505 518 506 /* 507 * deletes favorites of the current user if he's not allowed to see them 508 * 509 * @return void 519 /** 520 * Deletes favorites of the current user if he's not allowed to see them. 510 521 */ 511 522 function check_user_favorites() … … 527 538 ON f.image_id = ic.image_id 528 539 WHERE f.user_id = '.$user['id'].' 529 '.get_sql_condition_FandF 530 ( 531 array 532 ( 540 '.get_sql_condition_FandF( 541 array( 533 542 'forbidden_categories' => 'ic.category_id', 534 ),535 'AND'536 ).'543 ), 544 'AND' 545 ).' 537 546 ;'; 538 547 $authorizeds = array_from_query($query, 'image_id'); … … 558 567 559 568 /** 560 * calculates the list of forbidden categories for a given user569 * Calculates the list of forbidden categories for a given user. 561 570 * 562 571 * Calculation is based on private categories minus categories authorized to 563 572 * the groups the user belongs to minus the categories directly authorized 564 * to the user. The list contains at least -1to be compliant with queries573 * to the user. The list contains at least 0 to be compliant with queries 565 574 * such as "WHERE category_id NOT IN ($forbidden_categories)" 566 575 * 567 * @param int user_id568 * @param string user_status569 * @return string forbidden_categories576 * @param int $user_id 577 * @param string $user_status 578 * @return string comma separated ids 570 579 */ 571 580 function calculate_permissions($user_id, $user_status) … … 632 641 } 633 642 634 635 /*update counters with a category removal*/ 636 function remove_computed_category(&$cats, $cat) 637 { 638 if ( isset( $cats[$cat['id_uppercat']] ) ) 639 { 640 $parent = & $cats[ $cat['id_uppercat'] ]; 641 $parent['nb_categories']--; 642 643 do 644 { 645 646 $parent['count_images'] -= $cat['nb_images']; 647 $parent['count_categories'] -= 1+$cat['count_categories']; 648 649 if ( !isset( $cats[$parent['id_uppercat']] ) ) 650 break; 651 $parent = & $cats[$parent['id_uppercat']]; 652 } 653 while (true); 654 } 655 656 unset($cats[$cat['cat_id']]); 657 } 658 659 /** 660 * get computed array of categories 661 * 662 * @param array userdata 663 * @param int filter_days number of recent days to filter on or null 664 * @return array 665 */ 666 function get_computed_categories(&$userdata, $filter_days=null) 667 { 668 $query = 'SELECT c.id AS cat_id, id_uppercat'; 669 // Count by date_available to avoid count null 670 $query .= ', 671 MAX(date_available) AS date_last, COUNT(date_available) AS nb_images 672 FROM '.CATEGORIES_TABLE.' as c 673 LEFT JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON ic.category_id = c.id 674 LEFT JOIN '.IMAGES_TABLE.' AS i 675 ON ic.image_id = i.id 676 AND i.level<='.$userdata['level']; 677 678 if ( isset($filter_days) ) 679 { 680 $query .= ' AND i.date_available > '.pwg_db_get_recent_period_expression($filter_days); 681 } 682 683 if ( !empty($userdata['forbidden_categories']) ) 684 { 685 $query.= ' 686 WHERE c.id NOT IN ('.$userdata['forbidden_categories'].')'; 687 } 688 689 $query.= ' 690 GROUP BY c.id'; 691 692 $result = pwg_query($query); 693 694 $userdata['last_photo_date'] = null; 695 $cats = array(); 696 while ($row = pwg_db_fetch_assoc($result)) 697 { 698 $row['user_id'] = $userdata['id']; 699 $row['nb_categories'] = 0; 700 $row['count_categories'] = 0; 701 $row['count_images'] = (int)$row['nb_images']; 702 $row['max_date_last'] = $row['date_last']; 703 if ($row['date_last'] > $userdata['last_photo_date']) 704 { 705 $userdata['last_photo_date'] = $row['date_last']; 706 } 707 708 $cats[$row['cat_id']] = $row; 709 } 710 711 foreach ($cats as $cat) 712 { 713 if ( !isset( $cat['id_uppercat'] ) ) 714 continue; 715 716 $parent = & $cats[ $cat['id_uppercat'] ]; 717 $parent['nb_categories']++; 718 719 do 720 { 721 $parent['count_images'] += $cat['nb_images']; 722 $parent['count_categories']++; 723 724 if ((empty($parent['max_date_last'])) or ($parent['max_date_last'] < $cat['date_last'])) 725 { 726 $parent['max_date_last'] = $cat['date_last']; 727 } 728 729 if ( !isset( $parent['id_uppercat'] ) ) 730 break; 731 $parent = & $cats[$parent['id_uppercat']]; 732 } 733 while (true); 734 unset($parent); 735 } 736 737 if ( isset($filter_days) ) 738 { 739 foreach ($cats as $category) 740 { 741 if (empty($category['max_date_last'])) 742 { 743 remove_computed_category($cats, $category); 744 } 745 } 746 } 747 return $cats; 748 } 749 750 /** 751 * returns user identifier thanks to his name, false if not found 752 * 753 * @param string username 754 * @param int user identifier 643 /** 644 * Returns user identifier thanks to his name. 645 * 646 * @param string $username 647 * @param int|false 755 648 */ 756 649 function get_userid($username) … … 778 671 } 779 672 673 /** 674 * Returns user identifier thanks to his email. 675 * 676 * @param string $email 677 * @param int|false 678 */ 780 679 function get_userid_by_email($email) 781 680 { … … 803 702 } 804 703 805 /* 806 * Returns a array with default user value 807 * 808 * @param convert_str allows to convert string value if necessary 809 */ 810 function get_default_user_info($convert_str = true) 704 /** 705 * Returns a array with default user valuees. 706 * 707 * @param convert_str ceonferts 'true' and 'false' into booleans 708 * @return array 709 */ 710 function get_default_user_info($convert_str=true) 811 711 { 812 712 global $cache, $conf; … … 859 759 } 860 760 861 /* 862 * Returns a default user value 863 * 864 * @param value_name: name of value 865 * @param sos_value: value used if don't exist value 866 */ 867 function get_default_user_value($value_name, $sos_value) 761 /** 762 * Returns a default user value. 763 * 764 * @param string $value_name 765 * @param mixed $default 766 * @return mixed 767 */ 768 function get_default_user_value($value_name, $default) 868 769 { 869 770 $default_user = get_default_user_info(true); 870 771 if ($default_user === false or empty($default_user[$value_name])) 871 772 { 872 return $ sos_value;773 return $default; 873 774 } 874 775 else … … 878 779 } 879 780 880 /* 881 * Returns the default template value 882 * 781 /** 782 * Returns the default theme. 783 * If the default theme is not available it returns the first available one. 784 * 785 * @return string 883 786 */ 884 787 function get_default_theme() … … 891 794 892 795 // let's find the first available theme 893 $active_themes = get_pwg_themes(); 894 foreach (array_keys(get_pwg_themes()) as $theme_id) 895 { 896 return $theme_id; 897 } 898 } 899 900 /* 901 * Returns the default language value 902 * 796 $active_themes = array_keys(get_pwg_themes()); 797 return $active_themes[0]; 798 } 799 800 /** 801 * Returns the default language. 802 * 803 * @return string 903 804 */ 904 805 function get_default_language() … … 908 809 909 810 /** 910 * Returns true if the browser language value is set into param $lang 911 * 912 */ 811 * Tries to find the browser language among available languages. 812 * @todo : try to match 'fr_CA' before 'fr' 813 * 814 * @param string &$lang 815 * @return bool 816 */ 913 817 function get_browser_language(&$lang) 914 818 { … … 926 830 927 831 /** 928 * add user informations based on default values929 * 930 * @param int user_id / array of user_if931 * @param array ofvalues used to override default user values932 */ 933 function create_user_infos($ arg_id, $override_values =null)832 * Creates user informations based on default values. 833 * 834 * @param int|int[] $user_ids 835 * @param array $override_values values used to override default user values 836 */ 837 function create_user_infos($user_ids, $override_values=null) 934 838 { 935 839 global $conf; 936 840 937 if (is_array($arg_id)) 938 { 939 $user_ids = $arg_id; 940 } 941 else 942 { 943 $user_ids = array(); 944 if (is_numeric($arg_id)) 945 { 946 $user_ids[] = $arg_id; 947 } 841 if (!is_array($user_ids)) 842 { 843 $user_ids = array($user_ids); 948 844 } 949 845 … … 1000 896 1001 897 /** 1002 * returns the auto login key or false on error 1003 * @param int user_id 1004 * @param time_t time 1005 * @param string [out] username 1006 */ 898 * Returns the auto login key for an user or false if the user is not found. 899 * 900 * @param int $user_id 901 * @param int $time 902 * @param string &$username fille with corresponding username 903 * @return string|false 904 */ 1007 905 function calculate_auto_login_key($user_id, $time, &$username) 1008 906 { … … 1025 923 } 1026 924 1027 /* 1028 * Performs all required actions for user login 1029 * @param int user_id1030 * @param bool remember_me1031 * @ return void1032 */925 /** 926 * Performs all required actions for user login. 927 * 928 * @param int $user_id 929 * @param bool $remember_me 930 */ 1033 931 function log_user($user_id, $remember_me) 1034 932 { … … 1080 978 } 1081 979 1082 /* 1083 * Performs auto-connexion when cookie remember_me exists 1084 * @return true/false 1085 */ 1086 function auto_login() { 980 /** 981 * Performs auto-connection when cookie remember_me exists. 982 * 983 * @return bool 984 */ 985 function auto_login() 986 { 1087 987 global $conf; 1088 988 … … 1110 1010 1111 1011 /** 1112 * hashes a password, with the PasswordHash class from phpass security 1113 * library. We use an "pwg_" prefix because function password_hash is 1114 * planned for PHP 5.5. Code inspired from Wordpress. 1115 * 1116 * @param string $password Plain text user password to hash 1117 * @return string The hash string of the password 1012 * Hashes a password with the PasswordHash class from phpass security library. 1013 * @since 2.5 1014 * 1015 * @param string $password plain text 1016 * @return string 1118 1017 */ 1119 1018 function pwg_password_hash($password) … … 1135 1034 1136 1035 /** 1137 * Verifies a password, with the PasswordHash class from phpass security 1138 * library. We use an "pwg_" prefix because function password_verify is 1139 * planned for PHP 5.5. Code inspired from Wordpress. 1140 * 1141 * @param string $password Plain text user password to hash 1036 * Verifies a password, with the PasswordHash class from phpass security library. 1037 * If the hash is 'old' (assumed MD5) the hash is updated in database, used for 1038 * migration from Piwigo 2.4. 1039 * @since 2.5 1040 * 1041 * @param string $password plain text 1142 1042 * @param string $hash may be md5 or phpass hashed password 1143 * @param integer $ account_id only useful to update password hash from md5 to phpass1144 * @return string The hash string of the password1043 * @param integer $user_id only useful to update password hash from md5 to phpass 1044 * @return bool 1145 1045 */ 1146 1046 function pwg_password_verify($password, $hash, $user_id=null) … … 1192 1092 1193 1093 /** 1194 * Tries to login a user given username and password (must be MySql escaped) 1195 * return true on success 1094 * Tries to login a user given username and password (must be MySql escaped). 1095 * 1096 * @param string $username 1097 * @param string $password 1098 * @param bool $remember_me 1099 * @return bool 1196 1100 */ 1197 1101 function try_log_user($username, $password, $remember_me) … … 1202 1106 add_event_handler('try_log_user', 'pwg_login', EVENT_HANDLER_PRIORITY_NEUTRAL, 4); 1203 1107 1108 /** 1109 * Default method for user login, can be overwritten with 'try_log_user' trigger. 1110 * @see try_log_user() 1111 * 1112 * @param string $username 1113 * @param string $password 1114 * @param bool $remember_me 1115 * @return bool 1116 */ 1204 1117 function pwg_login($success, $username, $password, $remember_me) 1205 1118 { … … 1231 1144 } 1232 1145 1233 /** Performs all the cleanup on user logout */ 1146 /** 1147 * Performs all the cleanup on user logout. 1148 */ 1234 1149 function logout_user() 1235 1150 { … … 1248 1163 } 1249 1164 1250 /* 1251 * Return user status used in this library 1165 /** 1166 * Return user status. 1167 * 1168 * @param string $user_status used if $user not initialized 1252 1169 * @return string 1253 */1254 function get_user_status($user_status )1170 */ 1171 function get_user_status($user_status='') 1255 1172 { 1256 1173 global $user; … … 1271 1188 } 1272 1189 1273 /* 1274 * Return access_type definition of user 1275 * Test does with user status 1276 * @return bool 1277 */ 1190 /** 1191 * Return ACCESS_* value for a given $status. 1192 * 1193 * @param string $user_status used if $user not initialized 1194 * @return int one of ACCESS_* constants 1195 */ 1278 1196 function get_access_type_status($user_status='') 1279 1197 { … … 1318 1236 } 1319 1237 1320 /* 1321 * Return if user have access to access_type definition 1322 * Test does with user status 1238 /** 1239 * Returns if user has access to a particular ACCESS_* 1240 * 1241 * @return int $access_type one of ACCESS_* constants 1242 * @param string $user_status used if $user not initialized 1323 1243 * @return bool 1324 */1325 function is_autorize_status($access_type, $user_status ='')1244 */ 1245 function is_autorize_status($access_type, $user_status='') 1326 1246 { 1327 1247 return (get_access_type_status($user_status) >= $access_type); 1328 1248 } 1329 1249 1330 /* 1331 * Check if user have access to access_type definition1332 * Stop action if there are not access1333 * Test does with user status1334 * @ return none1335 */1336 function check_status($access_type, $user_status ='')1250 /** 1251 * Abord script if user has no access to a particular ACCESS_* 1252 * 1253 * @return int $access_type one of ACCESS_* constants 1254 * @param string $user_status used if $user not initialized 1255 */ 1256 function check_status($access_type, $user_status='') 1337 1257 { 1338 1258 if (!is_autorize_status($access_type, $user_status)) … … 1342 1262 } 1343 1263 1344 /* 1345 * Return if user is generic 1264 /** 1265 * Returns if user is generic. 1266 * 1267 * @param string $user_status used if $user not initialized 1346 1268 * @return bool 1347 */1348 function is_generic($user_status ='')1269 */ 1270 function is_generic($user_status='') 1349 1271 { 1350 1272 return get_user_status($user_status) == 'generic'; 1351 1273 } 1352 1274 1353 /* 1354 * Return if user is only a guest 1275 /** 1276 * Returns if user is a guest. 1277 * 1278 * @param string $user_status used if $user not initialized 1355 1279 * @return bool 1356 */1357 function is_a_guest($user_status ='')1280 */ 1281 function is_a_guest($user_status='') 1358 1282 { 1359 1283 return get_user_status($user_status) == 'guest'; 1360 1284 } 1361 1285 1362 /* 1363 * Return if user is, at least, a classic user 1286 /** 1287 * Returns if user is, at least, a classic user. 1288 * 1289 * @param string $user_status used if $user not initialized 1364 1290 * @return bool 1365 */1366 function is_classic_user($user_status ='')1291 */ 1292 function is_classic_user($user_status='') 1367 1293 { 1368 1294 return is_autorize_status(ACCESS_CLASSIC, $user_status); 1369 1295 } 1370 1296 1371 /* 1372 * Return if user is, at least, an administrator 1297 /** 1298 * Returns if user is, at least, an administrator. 1299 * 1300 * @param string $user_status used if $user not initialized 1373 1301 * @return bool 1374 */1375 function is_admin($user_status ='')1302 */ 1303 function is_admin($user_status='') 1376 1304 { 1377 1305 return is_autorize_status(ACCESS_ADMINISTRATOR, $user_status); 1378 1306 } 1379 1307 1380 /* 1381 * Return if user is, at least, a webmaster 1308 /** 1309 * Returns if user is a webmaster. 1310 * 1311 * @param string $user_status used if $user not initialized 1382 1312 * @return bool 1383 */1384 function is_webmaster($user_status ='')1313 */ 1314 function is_webmaster($user_status='') 1385 1315 { 1386 1316 return is_autorize_status(ACCESS_WEBMASTER, $user_status); 1387 1317 } 1388 1318 1389 /* 1319 /** 1390 1320 * Adviser status is depreciated from piwigo 2.2 1391 1321 * @return false 1392 */1322 */ 1393 1323 function is_adviser() 1394 1324 { … … 1399 1329 } 1400 1330 1401 /* 1402 * Return if current user can edit/delete/validate a comment 1403 * @param action edit/delete/validate 1331 /** 1332 * Returns if current user can edit/delete/validate a comment. 1333 * 1334 * @param string $action edit/delete/validate 1335 * @param int $comment_author_id 1404 1336 * @return bool 1405 1337 */ … … 1440 1372 } 1441 1373 1442 /* 1374 /** 1443 1375 * Return mail address as display text 1444 1376 * @return string 1445 */1377 */ 1446 1378 function get_email_address_as_display_text($email_address) 1447 1379 { … … 1458 1390 } 1459 1391 1460 /* 1461 * Compute sql where condition with restrict and filter data. "FandF" means 1462 * Forbidden and Filters. 1463 * 1464 * @param array condition_fields: read function body 1465 * @param string prefix_condition: prefixes sql if condition is not empty 1466 * @param boolean force_one_condition: use at least "1 = 1" 1467 * 1468 * @return string sql where/conditions 1392 /** 1393 * Compute sql WHERE condition with restrict and filter data. 1394 * "FandF" means Forbidden and Filters. 1395 * 1396 * @param array $condition_fields one witch fields apply each filter 1397 * - forbidden_categories 1398 * - visible_categories 1399 * - forbidden_images 1400 * - visible_images 1401 * @param string $prefix_condition prefixes query if condition is not empty 1402 * @param boolean $force_one_condition use at least "1 = 1" 1403 * @return string 1469 1404 */ 1470 1405 function get_sql_condition_FandF( … … 1558 1493 } 1559 1494 1560 /** @return the sql condition to show recent photos/albums based on user preferences and latest available photo.*/ 1495 /** 1496 * Returns sql WHERE condition for recent photos/albums for current user. 1497 * 1498 * @param string $db_field 1499 * @return string 1500 */ 1561 1501 function get_recent_photos_sql($db_field) 1562 1502 { … … 1572 1512 1573 1513 /** 1574 * search an available activation_key1514 * Returns a unique activation key. 1575 1515 * 1576 1516 * @return string
Note: See TracChangeset
for help on using the changeset viewer.