X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=namespacify.sh;h=541f32f600e452087fc476122a4145a0b01d4bbc;hp=557992a844a48bfe9ca1a9fbaf9ce46ab7bb3352;hb=719ab8078dd9f802ef8d4ba965d605319248e592;hpb=646be7194f9fd096ef22f52074cf9c03d595b6ec diff --git a/namespacify.sh b/namespacify.sh index 557992a..541f32f 100644 --- a/namespacify.sh +++ b/namespacify.sh @@ -57,4 +57,4 @@ if [ "$1" = 'wordpress' ]; then echo '}' wordpress_regex='s/function db_\(send_get\|insert_ish\|update\|delete\|\)(.*{/\0\n\t$table = add_wp_table_prefix($table);/; s/\$GLOBALS\['\''wfpl_db_handle'\''\]/$GLOBALS['\''wpdb'\'']->dbh/g;' fi -cat atexit.php csv.php db.php email.php encode.php file.php file_run.php format.php http.php messages.php misc.php template.php time.php | grep -v -e '' -e '^\s*//' -e 'require_once' -e '^\s*$' | grep -v -P -e '^\s*#\s*((?!NAMESPACIFY).)*$' | sed -e "$wordpress_regex"'s/\(register_shutdown_function\|function_exists\|call_user_func_array\)(/\0'\''\\\\wfpl\\\\'\'' . /; s/^\(\s*\)# NAMESPACIFY \(.*\)/\1\2 = '\''\\\\wfpl\\\\'\'' . \2;/' +cat atexit.php csv.php db.php email.php encode.php file.php file_run.php format.php http.php messages.php misc.php template.php time.php | grep -v -e '