Changeset 26807
- Timestamp:
- Jan 16, 2014, 4:24:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r26649 r26807 22 22 // +-----------------------------------------------------------------------+ 23 23 24 include(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php'); 25 26 // The function delete_site deletes a site and call the function 27 // delete_categories for each primary category of the site 28 function delete_site( $id ) 24 /** 25 * @package functions\admin\___ 26 */ 27 28 include_once(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php'); 29 30 31 /** 32 * Deletes a site and call delete_categories for each primary category of the site 33 * 34 * @param int $id 35 */ 36 function delete_site($id) 29 37 { 30 38 // destruction of the categories of the site … … 45 53 } 46 54 47 48 // The function delete_categories deletes the categories identified by the 49 // (numeric) key of the array $ids. It also deletes (in the database) : 50 // - all the elements physically linked to the category (delete_elements, see further) 51 // - all the links between elements and this category 52 // - all the restrictions linked to the category 53 // The function works recursively. 54 // 55 // the $photo_deletion_mode is for photos virtually linked to the categorty 56 // * no_delete : delete no photo, may create orphans 57 // * delete_orphans : delete photos that are no longer linked to any category 58 // * force_delete : delete photos even if they are linked to another category 55 /** 56 * Recursively deletes one or more categories. 57 * It also deletes : 58 * - all the elements physically linked to the category (with delete_elements) 59 * - all the links between elements and this category 60 * - all the restrictions linked to the category 61 * 62 * @param int[] $ids 63 * @param string $photo_deletion_mode 64 * - no_delete : delete no photo, may create orphans 65 * - delete_orphans : delete photos that are no longer linked to any category 66 * - force_delete : delete photos even if they are linked to another category 67 */ 59 68 function delete_categories($ids, $photo_deletion_mode='no_delete') 60 69 { … … 157 166 } 158 167 159 // Deletes all files (on disk) related to given image ids 160 // @return image ids where files are deleted successfully 168 /** 169 * Deletes all files (on disk) related to given image ids. 170 * 171 * @param int[] $ids 172 * @return 0|int[] image ids where files were successfully deleted 173 */ 161 174 function delete_element_files($ids) 162 175 { … … 220 233 } 221 234 222 // The function delete_elements deletes the elements identified by the 223 // (numeric) values of the array $ids. It also deletes (in the database) : 224 // - all the comments related to elements 225 // - all the links between categories and elements 226 // - all the favorites associated to elements 227 // @return number of deleted elements 235 /** 236 * Deletes elements from database. 237 * It also deletes : 238 * - all the comments related to elements 239 * - all the links between categories/tags and elements 240 * - all the favorites/rates associated to elements 241 * - removes elements from caddie 242 * 243 * @param int[] $ids 244 * @param bool $physical_deletion 245 * @return int number of deleted elements 246 */ 228 247 function delete_elements($ids, $physical_deletion=false) 229 248 { … … 242 261 } 243 262 } 263 264 $ids_str = wordwrap(implode(', ', $ids), 80, "\n"); 244 265 245 266 // destruction of the comments on the image 246 267 $query = ' 247 268 DELETE FROM '.COMMENTS_TABLE.' 248 WHERE image_id IN ( 249 '.wordwrap(implode(', ', $ids), 80, "\n").') 269 WHERE image_id IN ('. $ids_str .') 250 270 ;'; 251 271 pwg_query($query); 252 272 253 // destruction of the links between images and this category273 // destruction of the links between images and categories 254 274 $query = ' 255 275 DELETE FROM '.IMAGE_CATEGORY_TABLE.' 256 WHERE image_id IN ( 257 '.wordwrap(implode(', ', $ids), 80, "\n").') 276 WHERE image_id IN ('. $ids_str .') 258 277 ;'; 259 278 pwg_query($query); … … 262 281 $query = ' 263 282 DELETE FROM '.IMAGE_TAG_TABLE.' 264 WHERE image_id IN ( 265 '.wordwrap(implode(', ', $ids), 80, "\n").') 283 WHERE image_id IN ('. $ids_str .') 266 284 ;'; 267 285 pwg_query($query); … … 270 288 $query = ' 271 289 DELETE FROM '.FAVORITES_TABLE.' 272 WHERE image_id IN ( 273 '.wordwrap(implode(', ', $ids), 80, "\n").') 290 WHERE image_id IN ('. $ids_str .') 274 291 ;'; 275 292 pwg_query($query); … … 278 295 $query = ' 279 296 DELETE FROM '.RATE_TABLE.' 280 WHERE element_id IN ( 281 '.wordwrap(implode(', ', $ids), 80, "\n").') 297 WHERE element_id IN ('. $ids_str .') 282 298 ;'; 283 299 pwg_query($query); 284 300 285 // destruction of the ratesassociated to this element301 // destruction of the caddie associated to this element 286 302 $query = ' 287 303 DELETE FROM '.CADDIE_TABLE.' 288 WHERE element_id IN ( 289 '.wordwrap(implode(', ', $ids), 80, "\n").') 304 WHERE element_id IN ('. $ids_str .') 290 305 ;'; 291 306 pwg_query($query); … … 294 309 $query = ' 295 310 DELETE FROM '.IMAGES_TABLE.' 296 WHERE id IN ( 297 '.wordwrap(implode(', ', $ids), 80, "\n").') 311 WHERE id IN ('. $ids_str .') 298 312 ;'; 299 313 pwg_query($query); … … 304 318 id 305 319 FROM '.CATEGORIES_TABLE.' 306 WHERE representative_picture_id IN ( 307 '.wordwrap(implode(', ', $ids), 80, "\n").') 320 WHERE representative_picture_id IN ('. $ids_str .') 308 321 ;'; 309 322 $category_ids = array_from_query($query, 'id'); … … 317 330 } 318 331 319 / / The delete_user function delete a user identified by the $user_id320 // It also deletes : 321 // - all the access linked to this user 322 // - all the links to any group 323 // - all the favorites linked to this user 324 // - calculated permissions linked to the user 325 // - all datas about notifications for the user 332 /** 333 * Deletes an user. 334 * It also deletes all related data (accesses, favorites, permissions, etc.) 335 * @todo : accept array input 336 * 337 * @param int $user_id 338 */ 326 339 function delete_user($user_id) 327 340 { … … 357 370 } 358 371 359 // destruction of the user372 // purge of sessions 360 373 $query = ' 361 374 DELETE FROM '.SESSIONS_TABLE.' … … 416 429 /** 417 430 * Verifies that the representative picture really exists in the db and 418 * picks up a random represantive if possible and based on config. 419 * 420 * @param mixed category id 421 * @returns void 431 * picks up a random representative if possible and based on config. 432 * 433 * @param 'all'|int|int[] $ids 422 434 */ 423 435 function update_category($ids = 'all') … … 486 498 487 499 /** 488 * check and repair images integrity 489 * 490 * TODO see delete_elements function to check all linked tables 500 * Checks and repairs IMAGE_CATEGORY_TABLE integrity. 501 * Removes all entries from the table which correspond to a deleted image. 491 502 */ 492 503 function images_integrity() … … 514 525 515 526 /** 516 * returns an array containing sub-directories which can be a category, 517 * recursive by default 518 * 519 * directories nammed "thumbnail", "pwg_high" or "pwg_representative" are 520 * omitted 521 * 522 * @param string $basedir 523 * @return array 527 * Returns an array containing sub-directories which are potentially 528 * a category. 529 * Directories named ".svn", "thumbnail", "pwg_high" or "pwg_representative" 530 * are omitted. 531 * 532 * @param string $basedir (eg: ./galleries) 533 * @return string[] 524 534 */ 525 535 function get_fs_directories($path, $recursive = true) 526 536 { 527 537 $dirs = array(); 538 $path = rtrim($path, '/'); 528 539 529 540 if (is_dir($path)) … … 556 567 557 568 /** 558 * order categories (update categories.rank and global_rank database fields) 559 * so that rank field are consecutive integers starting at 1 for each child 560 * @return void 569 * Orders categories (update categories.rank and global_rank database fields) 570 * so that rank field are consecutive integers starting at 1 for each child. 561 571 */ 562 572 function update_global_rank() … … 624 634 625 635 /** 626 * change the visible property on a set of categories 627 * 628 * @param array categories 629 * @param string value 630 * @return void 636 * Change the **visible** property on a set of categories. 637 * 638 * @param int[] $categories 639 * @param boolean|string $value 631 640 */ 632 641 function set_cat_visible($categories, $value) 633 642 { 634 if ( !in_array($value, array('true', 'false')))643 if ( ($value = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)) === null ) 635 644 { 636 645 trigger_error("set_cat_visible invalid param $value", E_USER_WARNING); … … 639 648 640 649 // unlocking a category => all its parent categories become unlocked 641 if ($value == 'true')650 if ($value) 642 651 { 643 652 $uppercats = get_uppercat_ids($categories); … … 649 658 } 650 659 // locking a category => all its child categories become locked 651 if ($value == 'false')660 else 652 661 { 653 662 $subcats = get_subcat_ids($categories); … … 661 670 662 671 /** 663 * change the status property on a set of categories : private or public 664 * 665 * @param array categories 666 * @param string value 667 * @return void 672 * Change the **status** property on a set of categories : private or public. 673 * 674 * @param int[] $categories 675 * @param string $value 668 676 */ 669 677 function set_cat_status($categories, $value) … … 699 707 700 708 /** 701 * returns all uppercats category ids of the given category ids702 * 703 * @param arraycat_ids704 * @return array709 * Returns all uppercats category ids of the given category ids. 710 * 711 * @param int[] $cat_ids 712 * @return int[] 705 713 */ 706 714 function get_uppercat_ids($cat_ids) … … 730 738 731 739 /** 732 * set a new random representant to the categories733 * 734 * @param arraycategories740 * Set a new random representant to the categories. 741 * 742 * @param int[] $categories 735 743 */ 736 744 function set_random_representant($categories) … … 765 773 766 774 /** 767 * returns the fulldir for each given category id768 * 769 * @param arraycat_ids770 * @return array775 * Returns the fulldir for each given category id. 776 * 777 * @param int[] intcat_ids 778 * @return string[] 771 779 */ 772 780 function get_fulldirs($cat_ids) … … 817 825 818 826 /** 819 * returns an array with all file system files according to 820 * $conf['file_ext'] 827 * Returns an array with all file system files according to $conf['file_ext'] 821 828 * 822 829 * @param string $path 823 * @param bool recursive830 * @param bool $recursive 824 831 * @return array 825 832 */ … … 903 910 904 911 /** 905 * synchronize base users list and related users list906 * 907 * compares and synchronizes base users table (USERS_TABLE) with its child912 * Synchronize base users list and related users list. 913 * 914 * Compares and synchronizes base users table (USERS_TABLE) with its child 908 915 * tables (USER_INFOS_TABLE, USER_ACCESS, USER_CACHE, USER_GROUP) : each 909 916 * base user must be present in child tables, users in child tables not 910 917 * present in base table must be deleted. 911 *912 * @return void913 918 */ 914 919 function sync_users() … … 972 977 973 978 /** 974 * updates categories.uppercats field based on categories.id + 975 * categories.id_uppercat 976 * 977 * @return void 979 * Updates categories.uppercats field based on categories.id + categories.id_uppercat 978 980 */ 979 981 function update_uppercats() … … 1011 1013 1012 1014 /** 1013 * update images.path field 1014 * 1015 * @return void 1015 * Update images.path field base on images.file and storage categories fulldirs. 1016 1016 */ 1017 1017 function update_path() … … 1037 1037 1038 1038 /** 1039 * change the parent category of the given categories. The categories are1039 * Change the parent category of the given categories. The categories are 1040 1040 * supposed virtual. 1041 1041 * 1042 * @param array category identifiers 1043 * @param int parent category identifier 1044 * @return void 1042 * @param int[] $category_ids 1043 * @param int $new_parent (-1 for root) 1045 1044 */ 1046 1045 function move_categories($category_ids, $new_parent = -1) … … 1096 1095 } 1097 1096 1098 $tables = 1099 array( 1100 USER_ACCESS_TABLE => 'user_id', 1101 GROUP_ACCESS_TABLE => 'group_id' 1102 ); 1097 $tables = array( 1098 USER_ACCESS_TABLE => 'user_id', 1099 GROUP_ACCESS_TABLE => 'group_id' 1100 ); 1103 1101 1104 1102 $query = ' … … 1176 1174 1177 1175 /** 1178 * create a virtual category 1179 * 1180 * @param string category name 1181 * @param int parent category id 1182 * @return array with ('info' and 'id') or ('error') key 1176 * Create a virtual category. 1177 * 1178 * @param string $category_name 1179 * @param int $parent_id 1180 * @param array $options 1181 * - boolean commentable 1182 * - boolean visible 1183 * - string status 1184 * - string comment 1185 * - boolean inherit 1186 * @return array ('info', 'id') or ('error') 1183 1187 */ 1184 1188 function create_virtual_category($category_name, $parent_id=null, $options=array()) … … 1323 1327 1324 1328 /** 1325 * Set tags to an image. Warning: given tags are all tags associated to the 1326 * image, not additionnal tags. 1327 * 1328 * @param array tag ids 1329 * @param int image id 1330 * @return void 1329 * Set tags to an image. 1330 * Warning: given tags are all tags associated to the image, not additionnal tags. 1331 * 1332 * @param int[] $tags 1333 * @param int $image_id 1331 1334 */ 1332 1335 function set_tags($tags, $image_id) … … 1338 1341 * Add new tags to a set of images. 1339 1342 * 1340 * @param array tag ids 1341 * @param array image ids 1342 * @return void 1343 * @param int[] $tags 1344 * @param int[] $images 1343 1345 */ 1344 1346 function add_tags($tags, $images) … … 1379 1381 1380 1382 /** 1381 * 1383 * Delete tags and tags associations. 1384 * 1385 * @param int[] $tag_ids 1382 1386 */ 1383 1387 function delete_tags($tag_ids) … … 1410 1414 } 1411 1415 1412 function tag_id_from_tag_name($tag_name) 1416 /** 1417 * Returns a tag id from its name. If nothing found, create a new tag. 1418 * 1419 * @param string $tag_name 1420 * @return int 1421 */ 1422 function tag_id_from_tag_name($tag_name, $create=true) 1413 1423 { 1414 1424 global $page; … … 1455 1465 ) 1456 1466 ); 1467 1468 invalidate_user_cache_nb_tags(); 1469 1457 1470 $page['tag_id_from_tag_name_cache'][$tag_name] = pwg_db_insert_id(TAGS_TABLE); 1458 1471 return $page['tag_id_from_tag_name_cache'][$tag_name]; … … 1465 1478 } 1466 1479 1480 /** 1481 * Set tags of images. Overwrites all existing associations. 1482 * 1483 * @param array $tags_of - keys are image ids, values are array of tag ids 1484 */ 1467 1485 function set_tags_of($tags_of) 1468 1486 { … … 1504 1522 /** 1505 1523 * Associate a list of images to a list of categories. 1506 * 1507 * The function will not duplicate links and will preserve ranks 1508 * 1509 * @param array images 1510 * @param array categories 1511 * @return void 1524 * The function will not duplicate links and will preserve ranks. 1525 * 1526 * @param int[] $images 1527 * @param int[] $categories 1512 1528 */ 1513 1529 function associate_images_to_categories($images, $categories) … … 1596 1612 * Dissociate images from all old categories except their storage category and 1597 1613 * associate to new categories. 1598 * 1599 * This function will preserve ranks 1600 * 1601 * @param array images 1602 * @param array categories 1603 * @return void 1614 * This function will preserve ranks. 1615 * 1616 * @param int[] $images 1617 * @param int[] $categories 1604 1618 */ 1605 1619 function move_images_to_categories($images, $categories) … … 1640 1654 * destination categories. 1641 1655 * 1642 * @param array sources 1643 * @param array destinations 1644 * @return void 1656 * @param int[] $sources 1657 * @param int[] $destinations 1645 1658 */ 1646 1659 function associate_categories_to_categories($sources, $destinations) … … 1664 1677 * Refer main Piwigo URLs (currently PHPWG_DOMAIN domain) 1665 1678 * 1666 * @param void 1667 * @return array like $conf['links'] 1679 * @return string[] 1668 1680 */ 1669 1681 function pwg_URL() … … 1681 1693 1682 1694 /** 1683 * Invalidates ca hed data (permissions and category counts) for all users.1695 * Invalidates cached data (permissions and category counts) for all users. 1684 1696 */ 1685 1697 function invalidate_user_cache($full = true) … … 1704 1716 } 1705 1717 1706 1718 /** 1719 * Invalidates cached tags counter for all users. 1720 */ 1707 1721 function invalidate_user_cache_nb_tags() 1708 1722 { 1709 1723 global $user; 1710 1724 unset($user['nb_available_tags']); 1725 1711 1726 $query = ' 1712 1727 UPDATE '.USER_CACHE_TABLE.' … … 1716 1731 1717 1732 /** 1718 * adds the caracter set to a create table sql query. 1719 * all CREATE TABLE queries must call this function 1720 * @param string query - the sql query 1733 * Adds the caracter set to a create table sql query. 1734 * All CREATE TABLE queries must call this function 1735 * 1736 * @param string $query 1737 * @return string 1721 1738 */ 1722 1739 function create_table_add_character_set($query) … … 1763 1780 1764 1781 /** 1765 * Returns array use on template with html_options method 1766 * @param Min and Max access to use 1767 * @return array of user access level 1782 * Returns access levels as array used on template with html_options functions. 1783 * 1784 * @param int $MinLevelAccess 1785 * @param int $MaxLevelAccess 1786 * @return array 1768 1787 */ 1769 1788 function get_user_access_level_html_options($MinLevelAccess = ACCESS_FREE, $MaxLevelAccess = ACCESS_CLOSED) … … 1778 1797 1779 1798 /** 1780 * returns a list of templates currently available in template-extension 1799 * returns a list of templates currently available in template-extension. 1781 1800 * Each .tpl file is extracted from template-extension. 1782 * @return array 1801 * 1802 * @param string $start (internal use) 1803 * @return string[] 1783 1804 */ 1784 1805 function get_extents($start='') … … 1805 1826 } 1806 1827 1828 /** 1829 * Create a new tag. 1830 * 1831 * @param string $tag_name 1832 * @return array ('id', info') or ('error') 1833 */ 1807 1834 function create_tag($tag_name) 1808 1835 { … … 1842 1869 /** 1843 1870 * Is the category accessible to the (Admin) user ? 1844 *1845 1871 * Note : if the user is not authorized to see this category, category jump 1846 1872 * will be replaced by admin cat_modify page 1847 1873 * 1848 * @param int category id to verify1874 * @param int $category_id 1849 1875 * @return bool 1850 1876 */ … … 1863 1889 1864 1890 /** 1865 * Retrieve data from external URL 1866 * 1867 * @param string $src: URL 1868 * @param global $dest: can be a file ressource or string 1891 * Retrieve data from external URL. 1892 * 1893 * @param string $src 1894 * @param string|Ressource $dest - can be a file ressource or string 1895 * @param array $get_data - data added to request url 1896 * @param array $post_data - data transmitted with POST 1897 * @param string $user_agent 1898 * @param int $step (internal use) 1869 1899 * @return bool 1870 1900 */ … … 2020 2050 } 2021 2051 2022 2023 /** 2024 * returns the groupname corresponding to the given group identifier if 2025 * exists 2026 * 2027 * @param int group_id 2028 * @return mixed 2052 /** 2053 * Returns the groupname corresponding to the given group identifier if exists. 2054 * 2055 * @param int $group_id 2056 * @return string|false 2029 2057 */ 2030 2058 function get_groupname($group_id) … … 2049 2077 2050 2078 /** 2051 * returns the username corresponding to the given user identifier if exists2052 * 2053 * @param int user_id2054 * @return mixed2079 * Returns the username corresponding to the given user identifier if exists. 2080 * 2081 * @param int $user_id 2082 * @return string|false 2055 2083 */ 2056 2084 function get_username($user_id) … … 2076 2104 } 2077 2105 2078 function get_newsletter_subscribe_base_url($language) { 2106 /** 2107 * Get url on piwigo.org for newsletter subscription 2108 * 2109 * @param string $language (unused) 2110 * @return string 2111 */ 2112 function get_newsletter_subscribe_base_url($language='en_UK') 2113 { 2079 2114 return PHPWG_URL.'/announcement/subscribe/'; 2080 2115 } 2081 2116 2082 2117 /** 2083 * Accordion menus need to know which section to open by default when 2084 * loading the page 2118 * Return admin menu id for accordion. 2119 * 2120 * @param string $menu_page 2121 * @return int 2085 2122 */ 2086 2123 function get_active_menu($menu_page) … … 2137 2174 case 'languages': 2138 2175 return 5; 2139 } 2140 return 0; 2141 } 2142 2143 /* 2144 * get tags list from SQL query (ids are surrounded by ~~, for get_tag_ids()) 2145 * @param string: query 2146 * @param boolean: only_user_language, if true, only local name is returned for multilingual tags 2176 2177 default: 2178 return 0; 2179 } 2180 } 2181 2182 /** 2183 * Get tags list from SQL query (ids are surrounded by ~~, for get_tag_ids()). 2184 * 2185 * @param string $query 2186 * @param boolean $only_user_language - if true, only local name is returned for 2187 * multilingual tags (if ExtendedDescription plugin is active) 2188 * @return array[] ('id', 'name') 2147 2189 */ 2148 2190 function get_taglist($query, $only_user_language=true) … … 2186 2228 } 2187 2229 2188 /* 2189 * get tags ids from a list of raw tags (existing tags or new tags) 2190 * @param mixed: raw_tags, array or comma separated string 2191 * @param boolean: allow_create 2230 /** 2231 * Get tags ids from a list of raw tags (existing tags or new tags). 2232 * 2233 * In $raw_tags we receive something like array('~~6~~', '~~59~~', 'New 2234 * tag', 'Another new tag') The ~~34~~ means that it is an existing 2235 * tag. We added the surrounding ~~ to permit creation of tags like "10" 2236 * or "1234" (numeric characters only) 2237 * 2238 * @param string|string[] $raw_tags - array or comma separated string 2239 * @param boolean $allow_create 2240 * @return int[] 2192 2241 */ 2193 2242 function get_tag_ids($raw_tags, $allow_create=true) 2194 2243 { 2195 // In $raw_tags we receive something like array('~~6~~', '~~59~~', 'New2196 // tag', 'Another new tag') The ~~34~~ means that it is an existing2197 // tag. I've added the surrounding ~~ to permit creation of tags like "10"2198 // or "1234" (numeric characters only)2199 2200 2244 $tag_ids = array(); 2201 2245 if (!is_array($raw_tags)) … … 2220 2264 } 2221 2265 2222 /** returns the argument_ids array with new sequenced keys based on related 2266 /** 2267 * Returns the argument_ids array with new sequenced keys based on related 2223 2268 * names. Sequence is not case sensitive. 2224 * Warning: By definition, this function breaks original keys 2225 */ 2226 function order_by_name($element_ids,$name) 2269 * Warning: By definition, this function breaks original keys. 2270 * 2271 * @param int[] $elements_ids 2272 * @param string[] $name - names of elements, indexed by ids 2273 * @return int[] 2274 */ 2275 function order_by_name($element_ids, $name) 2227 2276 { 2228 2277 $ordered_element_ids = array(); … … 2236 2285 } 2237 2286 2287 /** 2288 * Grant access to a list of categories for a list of users. 2289 * 2290 * @param int[] $category_ids 2291 * @param int[] $user_ids 2292 */ 2238 2293 function add_permission_on_category($category_ids, $user_ids) 2239 2294 { 2240 // array-ify categories and users2241 2295 if (!is_array($category_ids)) 2242 2296 { 2243 2297 $category_ids = array($category_ids); 2244 2298 } 2245 2246 2299 if (!is_array($user_ids)) 2247 2300 { … … 2295 2348 } 2296 2349 2297 2350 /** 2351 * Returns the list of admin users. 2352 * 2353 * @param boolean $include_webmaster 2354 * @return int[] 2355 */ 2298 2356 function get_admins($include_webmaster=true) 2299 2357 { … … 2315 2373 } 2316 2374 2317 /** delete all derivative files for one or several types */ 2375 /** 2376 * Delete all derivative files for one or several types 2377 * 2378 * @param 'all'|int[] $types 2379 */ 2318 2380 function clear_derivative_cache($types='all') 2319 2381 { … … 2372 2434 } 2373 2435 2436 /** 2437 * Used by clear_derivative_cache() 2438 * @ignore 2439 */ 2374 2440 function clear_derivative_cache_rec($path, $pattern) 2375 2441 { … … 2418 2484 } 2419 2485 2486 /** 2487 * Deletes derivatives of a particular element 2488 * 2489 * @param array $infos ('path'[, 'representative_ext']) 2490 * @param 'all'|int $type 2491 */ 2420 2492 function delete_element_derivatives($infos, $type='all') 2421 2493 { … … 2449 2521 2450 2522 /** 2451 * returns an array contening sub-directories, excluding ".svn"2452 * 2453 * @param string $dir 2454 * @return array2523 * Returns an array containing sub-directories, excluding ".svn" 2524 * 2525 * @param string $directory 2526 * @return string[] 2455 2527 */ 2456 2528 function get_dirs($directory) … … 2475 2547 2476 2548 /** 2477 * recursively delete a directory 2549 * Recursively delete a directory. 2550 * 2478 2551 * @param string $path 2479 2552 * @param string $trash_path, try to move the directory to this path if it cannot be delete
Note: See TracChangeset
for help on using the changeset viewer.