summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boost.admin.inc22
-rw-r--r--boost.install2
-rw-r--r--boost.module40
-rw-r--r--stats/boost_stats.ajax.inc3
-rw-r--r--stats/boost_stats.php4
5 files changed, 36 insertions, 35 deletions
diff --git a/boost.admin.inc b/boost.admin.inc
index ac1dbaa..19bfc94 100644
--- a/boost.admin.inc
+++ b/boost.admin.inc
@@ -104,7 +104,7 @@ function boost_admin_performance_page($form = array()) {
'#submit' => array('boost_clear_expired_cache_submit'),
);
- // Alter core page cache setttings.
+ // Alter core page cache settings.
$form['core'] = array(
'#type' => 'fieldset',
'#title' => t('Core Database Cache'),
@@ -175,12 +175,12 @@ function boost_admin_clear_cache_submit($form, &$form_state) {
* TODO: Cacheability settings use core code. Look at Blocks.
* http://drupal.org/node/337756
*/
-function boost_admin_boost_performace_page() {
+function boost_admin_boost_performance_page() {
Global $base_path;
// Cacheability settings
$options = array(t('Cache every page except the listed pages.'), t('Cache only the listed pages.'));
- $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '%blog' for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));
+ $description = t("Enter one page per line as Drupal paths. The '*' character is a wild-card. Example paths are '%blog' for the blog page and %blog-wild-card for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wild-card' => 'blog/*', '%front' => '<front>'));
if (user_access('use PHP for block visibility')) {
$options[] = t('Cache pages for which the following PHP code returns <code>TRUE</code> (PHP-mode, experts only).');
$description .= t('If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can severely break your Drupal site.', array('%php' => '<?php ?>'));
@@ -279,7 +279,7 @@ function boost_admin_boost_performace_page() {
'#type' => 'checkbox',
'#title' => t('Cache ajax/json'),
'#default_value' => BOOST_CACHE_JSON,
- '#description' => t('Boost will cache ajax/json responces.'),
+ '#description' => t('Boost will cache ajax/json responses.'),
);
$form['advanced']['boost_only_ascii_path'] = array(
'#type' => 'checkbox',
@@ -297,11 +297,11 @@ function boost_admin_boost_performace_page() {
'#type' => 'checkbox',
'#title' => t('Flush directories from cache if they are empty'),
'#default_value' => BOOST_FLUSH_DIR,
- '#description' => t('Disable this if you have to set settings for each dir/subdir, due to the way your server opperates (permissions, etc...).'),
+ '#description' => t('Disable this if you have to set settings for each dir/subdir, due to the way your server operates (permissions, etc...).'),
);
$form['advanced']['boost_flush_node_terms'] = array(
'#type' => 'checkbox',
- '#title' => t('Flush all cached terms pages associted with a node on insert/update/delete'),
+ '#title' => t('Flush all cached terms pages associated with a node on insert/update/delete'),
'#default_value' => BOOST_FLUSH_NODE_TERMS,
'#description' => t('Works with view\'s taxonomy/term/% path as well as core.'),
);
@@ -351,7 +351,7 @@ function boost_admin_boost_performace_page() {
'#type' => 'radios',
'#title' => t('Ignore cache flushing'),
'#default_value' => BOOST_IGNORE_FLUSH,
- '#options' => array(0 => t('Disabled'), 1 => t('Only Ignore Complete Flushes'), 2 => t('Ignore Fluses & Expiration'), 3 => t('Ignore All Delete Commands (Not Recommended)')),
+ '#options' => array(0 => t('Disabled'), 1 => t('Only Ignore Complete Flushes'), 2 => t('Ignore Flushes & Expiration'), 3 => t('Ignore All Delete Commands (Not Recommended)')),
'#description' => t('Enable to put your site into a static state. Recommend turning on CSS & JS caching if enabled.'),
);
$form['advanced']['boost_verbose'] = array(
@@ -410,7 +410,7 @@ function boost_admin_boost_performace_page() {
if ($_SERVER['DOCUMENT_ROOT'] == $document_root) {
$best = '%{DOCUMENT_ROOT}';
}
- $description = t("Value of $best is recommened for this server.");
+ $description = t("Value of $best is recommended for this server.");
if (!isset($best)) {
$best = $document_root;
$description .= t(' Please open an boost issue on drupal.org, since apache and php are not configured correctly.');
@@ -444,14 +444,14 @@ function boost_admin_boost_performace_page() {
'#submit' => array('boost_reset_database_submit'),
);
- $form['#validate'][] = 'boost_admin_boost_performace_page_validate';
+ $form['#validate'][] = 'boost_admin_boost_performance_page_validate';
return system_settings_form($form);
}
/**
* validate system_themes_form form submissions.
*/
-function boost_admin_boost_performace_page_validate($form, &$form_state) {
+function boost_admin_boost_performance_page_validate($form, &$form_state) {
$form_state['values']['boost_previously'] = variable_get('boost_enabled', '');
extract($form_state['values'], EXTR_SKIP | EXTR_REFS);
@@ -509,7 +509,7 @@ function boost_admin_themes_submit($form, &$form_state) {
* @param $gzip_dir
* gz dir
* @param $html
- * html document file extention
+ * html document file extension
*/
function boost_admin_generate_htaccess($server_name = '%{SERVER_NAME}', $document_root = '%{DOCUMENT_ROOT}', $cache_dir = 'cache', $gzip_dir = 'gz', $html = '.html', $xml = '.xml') {
Global $base_path;
diff --git a/boost.install b/boost.install
index 1a21656..b93f428 100644
--- a/boost.install
+++ b/boost.install
@@ -82,7 +82,7 @@ function boost_requirements($phase) {
'title' => $t('Boost'),
'description' => $t('Directory %dir credentials - Permissions: %fp. Owner %fo. Group %fg.<br /> Your credentials - Group ID: %gid. User ID: %uid. Current script owner: %user.', array('%dir' => getcwd() . '/' . $cache_directory, '%gid' => getmygid(), '%uid' => getmyuid(), '%user' => get_current_user(), '%fp' => substr(sprintf('%o', fileperms($cache_directory)), -4), '%fo' => fileowner($cache_directory), '%fg' => filegroup($cache_directory) )),
'severity' => REQUIREMENT_ERROR,
- 'value' => $t('Can not write to filesystem'),
+ 'value' => $t('Can not write to file-system'),
);
}
}
diff --git a/boost.module b/boost.module
index 460de73..85c8705 100644
--- a/boost.module
+++ b/boost.module
@@ -195,7 +195,7 @@ function boost_menu() {
'title' => 'Boost Settings',
'description' => 'Advanced boost configuration.',
'page callback' => 'drupal_get_form',
- 'page arguments' => array('boost_admin_boost_performace_page'),
+ 'page arguments' => array('boost_admin_boost_performance_page'),
'access arguments' => array('administer site configuration'),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
@@ -907,7 +907,7 @@ function _boost_get_http_header($regex, $default = NULL) {
* To avoid potentially troublesome situations, the user login page is never
* cached, nor are any admin pages. At present, we also refuse to cache any
* RSS feeds provided by Drupal, since they would require special handling
- * in the mod_rewrite ruleset as they shouldn't be sent out using the
+ * in the mod_rewrite rule-set as they shouldn't be sent out using the
* text/html content type.
* TODO: don't cache pages with unacceptable symbols
*
@@ -1063,7 +1063,7 @@ function boost_cache_expire_derivative($path, $wildcard = FALSE) {
* @param $wildcard
* If true get all chached files that start with this path.
*
- * TODO: Replace glob() with a database opperation.
+ * TODO: Replace glob() with a database operation.
*/
function boost_cache_expire($path, $wildcard = FALSE) {
// Sanity check
@@ -1163,7 +1163,7 @@ function boost_cache_get($path) {
* File extension for this mime type
*/
function boost_cache_set($path, $data = '', $extension = BOOST_FILE_EXTENSION) {
- // Code commenting style baised on what is being cached.
+ // Code commenting style based on what is being cached.
switch ($extension) {
case '.html':
if (!BOOST_CACHE_HTML) {
@@ -1230,7 +1230,7 @@ function boost_cache_set($path, $data = '', $extension = BOOST_FILE_EXTENSION) {
* @param $extension
* Filename extension: Used for content types.
* @param $expire
- * Cache expiration time in seconds (unix time).
+ * Cache expiration time in seconds (UNIX time).
*/
function boost_db_prep($filename, $extension, $expire) {
$router_item = _boost_get_menu_router();
@@ -1280,7 +1280,7 @@ function boost_db_prep($filename, $extension, $expire) {
* @param $timer
* Time it took drupal to build this page.
* @param $timer_average
- * Average time durpal has spent building this page.
+ * Average time Drupal has spent building this page.
* @param $extension
* Filename extension: Used for content types.
*/
@@ -1420,7 +1420,7 @@ function boost_get_settings_db($router_item) {
}
/**
- * Returns all cached pages asscoited with the taxonomy term.
+ * Returns all cached pages associated with the taxonomy term.
*/
function boost_get_db_term($term) {
$filenames = array();
@@ -1713,7 +1713,7 @@ function boost_cache_css_js_files($buffer) {
* Support for printing of objects as well as the $return parameter functionality
* added by Fredrik Wollsén (fredrik dot motin at gmail), to make it work as a drop-in
* replacement for print_r (Except for that this function does not output
- * paranthesises around element groups... ;) )
+ * parenthesis around element groups... ;) )
*
* Based on return_array() By Matthew Ruivo (mruivo at gmail)
* (http://www.php.net/manual/en/function.print-r.php#73436)
@@ -1756,7 +1756,7 @@ function boost_print_r($var, $return = false, $html = false, $level = 0) {
}
/**
- * Alt to drupal's url() function.
+ * Alt to Drupal's url() function.
* @see http://drupal.org/node/513860
*
* http://php.net/parse-url#85963
@@ -1906,7 +1906,7 @@ function _boost_gz_copy_file($src, $dest) {
}
/**
- * Get's page_callback & page_arguments from menu_router table
+ * Gets page_callback & page_arguments from menu_router table
*
* Allows for any content type to have it's own cache expiration.
*/
@@ -1987,7 +1987,7 @@ function _boost_get_menu_router() {
* @param $pathname
* The top-level directory that will be recursively created.
* @param $recursive
- * Opperate in a recursive manner.
+ * Operate in a recursive manner.
*/
function _boost_mkdir_p($pathname, $recursive = TRUE) {
$mode = is_numeric(BOOST_PERMISSIONS_DIR) ? octdec(BOOST_PERMISSIONS_DIR) : 0775;
@@ -2122,7 +2122,7 @@ function boost_crawler_run() {
exit;
}
- // Wait 0 to 1 seconds before grabing DB position counter.
+ // Wait 0 to 1 seconds before grabbing DB position counter.
usleep(mt_rand(0,1000000));
db_lock_table('variable');
$from = unserialize(db_result(db_query("SELECT value FROM {variable} WHERE name = 'boost_crawler_position'")));
@@ -2163,7 +2163,7 @@ function boost_crawler_run() {
}
elseif (variable_get('boost_crawler_number_of_threads', 0) != 0) {
watchdog('boost', 'Crawler already running');
- drupal_set_message(t('Boost: Craler is already running. Atempt to start crawler failed.'), 'warning');
+ drupal_set_message(t('Boost: Crawler is already running. Attempt to start crawler failed.'), 'warning');
}
elseif (variable_get('cron_semaphore', FALSE) == TRUE) {
// This function called from cron; reset & call self.
@@ -2225,12 +2225,12 @@ function boost_async_call_crawler($self) {
* Add URL's to the boost_crawler table.
*
* @param $push_setting
- * Default crawler settting for the content type
+ * Default crawler setting for the content type
* @param $extension
- * File extension, controlls the content type DB lookup
+ * File extension, controls the content type DB lookup
*/
function boost_crawler_add_to_table($push_setting, $extension) {
- // Insert batch of url's into boost_crawler table
+ // Insert batch of URL's into boost_crawler table
$count = 10000;
$total = boost_crawler_count($push_setting, $extension);
$loaded = variable_get('boost_crawler_loaded_count' . $extension, 0);
@@ -2253,9 +2253,9 @@ function boost_crawler_add_to_table($push_setting, $extension) {
* Count the number of URL's in the boost_cache table.
*
* @param $push_setting
- * Default crawler settting for the content type
+ * Default crawler setting for the content type
* @param $extension
- * File extension, controlls the content type DB lookup
+ * File extension, controls the content type DB lookup
*/
function boost_crawler_count($push_setting, $extension) {
if ($push_setting) {
@@ -2275,7 +2275,7 @@ function boost_crawler_seed_tables() {
&& boost_crawler_add_to_table(BOOST_PUSH_JSON, '.js')
&& boost_crawler_add_alias_to_table()
) {
- // All URL's added to boost_cralwer table; start hitting URL's
+ // All URL's added to boost_crawler table; start hitting URL's
return TRUE;
}
else {
@@ -2287,7 +2287,7 @@ function boost_crawler_seed_tables() {
* Get URLs from url alias table
*/
function boost_crawler_add_alias_to_table() {
- // Insert batch of html url's into boost_crawler table
+ // Insert batch of html URL's into boost_crawler table
global $base_url;
$count = 1000;
$total = db_query("SELECT COUNT(*) FROM {url_alias}");
diff --git a/stats/boost_stats.ajax.inc b/stats/boost_stats.ajax.inc
index a6db3a8..b7cbde8 100644
--- a/stats/boost_stats.ajax.inc
+++ b/stats/boost_stats.ajax.inc
@@ -1,4 +1,5 @@
<?php
+// $Id$
/**
* AJAX Menu Callback.
@@ -125,7 +126,7 @@ function boost_stats_output_stats_block() {
* Returns a 1px image and allows for php to run in the background.
*/
function boost_stats_async_image() {
- // Script should take under 1mb of memory to work.
+ // Script should take under 1MB of memory to work.
// Prime php for background operations
ob_end_clean();
header("Connection: close");
diff --git a/stats/boost_stats.php b/stats/boost_stats.php
index d2e246b..28a2f4c 100644
--- a/stats/boost_stats.php
+++ b/stats/boost_stats.php
@@ -52,7 +52,7 @@ exit;
function boost_stats_async_image() {
- // Script should take under 1mb of memory to work.
+ // Script should take under 1MB of memory to work.
// Prime php for background operations
ob_end_clean();
header("Connection: close");
@@ -107,7 +107,7 @@ function boost_stats_init() {
// Anonymous users always get a User ID of 0.
$uid = 0;
- // load all boost, statistics & throttle variables; 1 transaction instead of mutiple
+ // load all boost, statistics & throttle variables; 1 transaction instead of multiple
$result = db_query("
SELECT * FROM {variable}
WHERE name LIKE 'boost_%'