From 15c0535cbcc2a719b6984a82c1d3d0ec3350f10f Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 30 Apr 2005 14:28:07 +0000 Subject: [PATCH] - new queue invocation method git-svn-id: file:///svn/phpbb/trunk@5136 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/common.php | 24 ++---- phpBB/cron.php | 75 +++++++++++++++++++ phpBB/language/en/admin.php | 63 +++++++++++++++- phpBB/language/en/ucp.php | 2 +- .../subSilver/template/overall_footer.html | 2 +- 5 files changed, 145 insertions(+), 21 deletions(-) create mode 100644 phpBB/cron.php diff --git a/phpBB/common.php b/phpBB/common.php index 17a2ca10a1..b845460e16 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -36,6 +36,12 @@ if (@ini_get('register_globals')) } } +if (defined('IN_CRON')) +{ + chdir($phpbb_root_path); + $phpbb_root_path = getcwd() . '/'; +} + require($phpbb_root_path . 'config.'.$phpEx); if (!defined('PHPBB_INSTALLED')) @@ -291,24 +297,6 @@ else unset($cached_config); } -// Tidy the cache -if (method_exists($cache, 'tidy') && time() - $config['cache_gc'] > $config['cache_last_gc']) -{ - $cache->tidy(); - set_config('cache_last_gc', time(), TRUE); -} - -// Handle email/cron queue. -if (time() - $config['queue_interval'] >= $config['last_queue_run'] && !defined('IN_ADMIN')) -{ - if (file_exists($phpbb_root_path . 'cache/queue.' . $phpEx)) - { - include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); - $queue = new queue(); - $queue->process(); - } -} - // Warn about install/ directory if (file_exists('install')) { diff --git a/phpBB/cron.php b/phpBB/cron.php new file mode 100644 index 0000000000..3ca76d79ba --- /dev/null +++ b/phpBB/cron.php @@ -0,0 +1,75 @@ +process(); + } + break; + + case 'tidy_cache': + if ($use_shutdown_function) + { + register_shutdown_function(array(&$cache, 'tidy')); + } + else + { + $cache->tidy(); + } + break; + + case 'tidy_database': + include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); + + if ($use_shutdown_function) + { + register_shutdown_function('tidy_database'); + } + else + { + tidy_database(); + } + break; +} + +// Output transparent gif +header('Cache-Control: no-cache'); +header('Content-type: image/gif'); +header('Content-length: 43'); + +echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); + +flush(); +exit; + +?> \ No newline at end of file diff --git a/phpBB/language/en/admin.php b/phpBB/language/en/admin.php index 342eaa0d31..57a0c99ab7 100644 --- a/phpBB/language/en/admin.php +++ b/phpBB/language/en/admin.php @@ -2113,13 +2113,22 @@ $lang += array( 'DISPLAY_AT_REGISTRATION' => 'Display at registration screen', 'HIDE_PROFILE_FIELD' => 'Hide Profile Field', 'HIDE_PROFILE_FIELD_EXPLAIN'=> 'Only Administrators and Moderators are able to see/fill out this profile field', + 'EXCLUDE_FROM_VIEW' => 'Do not display profile field', + 'EXCLUDE_FROM_VIEW_EXPLAIN' => 'The profile field will not be shown on viewtopic/viewprofile/memberlist/etc.', 'ADDED_PROFILE_FIELD' => 'Successfully added custom profile field', 'CREATE_NEW_FIELD' => 'Create New Field', - 'DELETED_PROFILE_FIELD' => 'Successfully deleted profile field.', + 'REMOVED_PROFILE_FIELD' => 'Successfully removed profile field.', 'CONFIRM_DELETE_PROFILE_FIELD' => 'Are you sure you want to delete this profile field?', 'PROFILE_FIELD_ACTIVATED' => 'Profile field successfully activated', 'PROFILE_FIELD_DEACTIVATED' => 'Profile field successfully deactivated', + 'CHANGED_PROFILE_FIELD' => 'Successfully changed profile field', + + 'LOG_CREATE_PROFILE_FIELD' => 'Profile field added
» %s', + 'LOG_EDIT_PROFILE_FIELD' => 'Profile field changed
» %s', + 'LOG_ACTIVATE_PROFILE_FIELD' => 'Profile field activated
» %s', + 'LOG_DEACTIVATE_PROFILE_FIELD' => 'Profile field deactivated
» %s', + 'LOG_REMOVED_PROFILE_FIELD' => 'Profile field removed
» %s', 'CHARS_ANY' => 'Any character', 'NUMBERS_ONLY' => 'Only numbers (0-9)', @@ -2158,6 +2167,58 @@ $lang += array( 'DEFAULT_ISO_LANGUAGE' => 'Default Language [%s]', 'ISO_LANGUAGE' => 'Language [%s]', + + 'NO_FIELD_ID' => 'No field id specified', + 'FIELD_NOT_FOUND' => 'Profile field not found', + 'NO_FIELD_ENTRIES' => 'No Entries defined', +); + +// Language Packs +$lang += array( + 'LANGUAGE_PACKS_EXPLAIN' => 'Here you are able to install/remove language packs', + 'LANGUAGE_PACK_NAME' => 'Name', + 'LANGUAGE_PACK_LOCALNAME' => 'Local name', + 'LANGUAGE_PACK_ISO' => 'ISO', + 'LANGUAGE_PACK_USED_BY' => 'Used by', + 'INSTALLED_LANGUAGE_PACKS' => 'Installed language packs', + 'UNINSTALLED_LANGUAGE_PACKS'=> 'Uninstalled language packs', + 'NO_UNINSTALLED_LANGUAGE_PACKS' => 'No uninstalled language packs', + 'NO_LANG_ID' => 'You haven\'t specified a language pack', + 'NO_REMOVE_DEFAULT_LANG' => 'You are not able to remove the default language pack.
If you want to remove this language pack, change your boards default language first.', + 'LANGUAGE_PACK_DELETED' => 'The language pack %s has been removed successfully. All users using this language have been resetted to the boards default language.', + 'LANGUAGE_PACK_NOT_EXIST' => 'The selected language pack does not exist.', + 'LANGUAGE_PACK_ALREADY_INSTALLED' => 'This language pack is already installed.', + 'INVALID_LANGUAGE_PACK' => 'The selected language pack seems to be not valid. Please verify the language pack and upload it again if necessary.', + 'LANGUAGE_PACK_INSTALLED' => 'The language pack %s has been successfully installed.', + 'LANGUAGE_PACK_DETAILS' => 'Language Pack Details', + 'WRONG_LANGUAGE_FILE' => 'Selected language file is invalid', + 'LANGUAGE_DETAILS_UPDATED' => 'Language details successfully updated', + + 'LANG_ENGLISH_NAME' => 'English name', + 'LANG_LOCAL_NAME' => 'Local name', + 'LANG_ISO_CODE' => 'ISO Code', + 'LANG_AUTHOR' => 'Language Pack Author', + + 'MISSING_LANGUAGE_FILE' => 'Missing Language File: %s', + 'THOSE_MISSING_LANG_FILES' => 'The following language files are missing from the %s language folder', + 'MISSING_LANG_VARIABLES' => 'Missing Language Variables', + 'THOSE_MISSING_LANG_VARIABLES' => 'The following language variables are missing from the %s language pack', + + 'LANGUAGE_KEY' => 'Language Key', + 'LANGUAGE_VARIABLE' => 'Language Variable', + 'LANGUAGE_FILES' => 'Language Files', + 'HELP_FILES' => 'Help Files', + 'EMAIL_TEMPLATES' => 'Email Templates', + + 'LANGUAGE_ENTRIES' => 'Language Entries', + 'LANGUAGE_ENTRIES_EXPLAIN' => 'Here you are able to change existing language pack entries or not already translated ones.
Note: Once you changed a language file, the changes will be stored within a seperate folder for you to download. The changes will not be seen by your users until you replace the original language files at your webspace (by uploading them).', + 'REMOVE_FROM_STORAGE_FOLDER'=> 'Remove from storage folder', + 'FILE_CONTENTS' => 'File Contents', + 'FILE_FROM_STORAGE' => 'File from storage folder', + 'SUBMIT_AND_DOWNLOAD' => 'Submit and Download File', + 'SELECT_DOWNLOAD_FORMAT' => 'Select download format', + 'DOWNLOAD_AS' => 'Download as', + 'DOWNLOAD' => 'Download', ); ?> \ No newline at end of file diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index df3e591638..0db9385d23 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -71,7 +71,7 @@ $lang += array( 'BOOKMARKS_REMOVED' => 'Bookmarks removed successfully', 'CANNOT_EDIT_MESSAGE_TIME' => 'You can no longer edit or delete that message', - 'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages can not be moved to the folder which will be removed.', + 'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages can not be moved to the folder you want to remove.', 'CANNOT_RENAME_FOLDER' => 'This folder can not be renamed.', 'CANNOT_REMOVE_FOLDER' => 'This folder can not be removed.', 'CHANGE_PASSWORD' => 'Change password', diff --git a/phpBB/styles/subSilver/template/overall_footer.html b/phpBB/styles/subSilver/template/overall_footer.html index 8762f712d8..da62b0ed3e 100644 --- a/phpBB/styles/subSilver/template/overall_footer.html +++ b/phpBB/styles/subSilver/template/overall_footer.html @@ -1,4 +1,4 @@ - + {RUN_CRON_TASK}