From: Adam M. <ad...@tu...> - 2002-10-07 18:01:54
|
Hello all, Below is a list or the changes that have been made to the function names in the core. These were existing functions that just needed better names to stick with the coding style we have adopted. Somef unctions have comments next to them denoting that there could be some changes to them later. Other functions fall under the "QUESTIONABLE:" category which means they will have their names changed, be merged into another function or removed entirely. Any code you write in the future will need to use these new function names. If you have any issues with a function name, please let me know and we will work something out. I will be attempting to do a massive search and replace through all our code in house to catch all these function names and get everyone up to par so I can remove the patch functions for legacy calls. I will be sure to warn everyone of this since it will require everyone to hold what they are doing until I am finished or risk massive conflicts in CVS. ATTENTION!!! If you have not done so already, please read through the core files and comment any functions you've written. Please give detailed comments! Also read over any existing comments and make sure they make sense and you can understand them (Remember to think like a new module developer when doing this. We have used these functions for months now and could probably write a module without ever looking at the core files, others do not have that advantage.). These comments are going to directly translate into the developers manual! Cheers! Adam DATABASE: --------- CHANGED: load_database() = loadDatabase() query_db() = query() quick_fetch() = quickFetch() fetchmode() = setFetchMode() make_where() = makeWhere() sql_friendly_name() = sqlFriendlyName() sql_insert() = sqlInsert() sql_select() = sqlSelect() sql_update() = sqlUpdate() sql_lock() = sqlLock() sql_unlock() = sqlUnlock() sql_delete() = sqlDelete() sql_maxvalue() = sqlMaxValue() sql_table_exists() = sqlTableExists() sql_column_exists() = sqlColumnExists() sql_create_table() = sqlCreateTable() sql_droptable() = sqlDropTable() sql_add_column() = sqlAddColumn() sql_drop_column() = sqlDropColumn() sql_import() = sqlImport() add_prefix() = addTablePrefix() QUESTIONABLE: dbReady() //Need better name here. (prepares a value for database insertion) KEEPERS: getOne() getRow() getCol() getAssoc() getAllAssoc() getAll() TEXT: ----- CHANGED: unserialize_it() = unserialize() serialize_it() = serialize() profanity_filter() = profanityFilter() //RENAME: filterProfanity? is_alpha() = isAlpha() magicstrip() = stripslashes() valid_form() = isValidInput() image_tag() = imageTag() ez_table() = ezTable() check_link() = checkLink() strip_spaces() = stripSpaces() alpha_num() = alphaNum() strip_quotes() = stripQuotes() QUESTIONABLE: alphabet() //English only....WizardBag? parse() //MERGE into re-writes of parse functions sentence() //Not sure what this is for breaker() //MERGE into re-writes of parse functions error_list() //Not sure what this is for KEEPERS: addslashes() link() ARRAY: ------ CHANGED: max_key() = maxKey() shove_assoc() = shoveAssoc() array_to_object() = arrayToObject() object_to_array() = objectToArray() drop_nulls() = dropNulls() test_post() = testPost() //No patch test_cookie() = testCookie() //No patch test_request() = testRequest() //No patch test_globals() = testGlobals() //No patch test_object() = testObject() //No patch test_array() = testArray() //No patch QUESTIONABLE: XML_it() //Not sure what this is for. ksort() //Why is this here? (use PHP provided: ksort() or reverse(ksort())) cmp() //Attached to ksort...not really needed interval() //Not sure of functionality here (used in PHPWS_Form::clock()) KEEPERS: shove() yank() paginateDataArray() CORE: ----- CHANGED: list_all_mods() = listModules() mod_dir() = getModuleDir() destroy_all_sessions() = killAllSessions() destroy_session() = killSession() set_module_info() = setModuleInfo() get_mod_info() = getModuleInfo() DATETIME: --------- CHANGED: mk_date() = mkdate() FILE: ----- CHANGED: read_dir() = readDirectory() rec_copy() = recursiveFileCopy() write_file() = writeFile() read_file() = readFile() file_copy() = fileCopy() make_thumbnail() = makeThumbnail() FORM: ----- CHANGED: make_form() = makeForm() input_radio() = formRadio() input_hidden() = formHidden() input_file() = formFile() input_text() = formTextField() input_password() = formPassword() input_textarea() = formTextArea() input_check() = formCheckBox() input_options() = formSelect() input_options() = formMultipleSelect() input_submit() = formSubmit() input_button() = formButton() input_sql_options() = formSqlSelect() QUESTIONABLE: clock() //MOVE to PHPWS_DateTime? Only function that uses interval? Not sure what this really does. --------------------------------- Adam Morton Developer - Web Technology Group Appalachian State University http://phpwebsite.appstate.edu |