diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 4690161ccc..36baf596b1 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -27,7 +27,7 @@ get_admin_page_title(); <?php bloginfo('name') ?> › <?php echo wp_specialchars( strip_tags( $title ) ); ?> — WordPress - diff --git a/wp-admin/bookmarklet.php b/wp-admin/bookmarklet.php index 4b47e7b934..8618458daf 100644 --- a/wp-admin/bookmarklet.php +++ b/wp-admin/bookmarklet.php @@ -51,7 +51,7 @@ if ( !empty($content) ) { <?php bloginfo('name') ?> › Bookmarklet — WordPress - diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 2763eca177..ee416a0e1c 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -97,7 +97,7 @@ default: if ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; + exit; } wp_enqueue_script( 'admin-categories' ); diff --git a/wp-admin/css/install.css b/wp-admin/css/install.css index 64521464c4..5f4164c615 100644 --- a/wp-admin/css/install.css +++ b/wp-admin/css/install.css @@ -50,7 +50,7 @@ td input { font-size: 1.5em; } margin-left: 0; font-size: 13px !important; -moz-border-radius: 2px; - -khtml-border-radius: 2px; + -khtml-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; color: #246; diff --git a/wp-admin/css/login.css b/wp-admin/css/login.css index 31d41dc0a2..f3b5f8ed70 100644 --- a/wp-admin/css/login.css +++ b/wp-admin/css/login.css @@ -29,7 +29,7 @@ form .submit input { border: none; margin-top: -6px; -moz-border-radius: 2px; - -khtml-border-radius: 2px; + -khtml-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } diff --git a/wp-admin/css/widgets.css b/wp-admin/css/widgets.css index 6df7ff521e..8ef6a40e6b 100644 --- a/wp-admin/css/widgets.css +++ b/wp-admin/css/widgets.css @@ -35,7 +35,7 @@ p#widget-search { div#widget-content { border-bottom: 1px solid #ccc; -} +} ul#widget-list { list-style: none; diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 0961588aee..72a42d6be5 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -9,7 +9,7 @@ wp_enqueue_script('admin-forms'); if ( !empty( $_REQUEST['delete_comments'] ) ) { check_admin_referer('bulk-comments'); - $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; + $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each $comment = (int) $comment; $post_id = (int) $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment"); @@ -40,7 +40,7 @@ if ( !empty( $_REQUEST['delete_comments'] ) ) { wp_redirect( $redirect_to ); } elseif ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; + exit; } require_once('admin-header.php'); diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 7dcf92d609..294dce5bab 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -178,7 +178,7 @@ if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) ) ID); ?>
-ID) && ! empty($sample_permalink_html) ) : +ID) && ! empty($sample_permalink_html) ) : echo $sample_permalink_html; endif; ?>
diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php index e14aabded9..e34e41a2f5 100644 --- a/wp-admin/edit-link-categories.php +++ b/wp-admin/edit-link-categories.php @@ -22,7 +22,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { exit(); } elseif ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; + exit; } $title = __('Link Categories'); diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 7e10d2ca38..7c31acc2c7 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -153,7 +153,7 @@ if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) ) ID); ?>
-ID) && ! empty($sample_permalink_html) ) : +ID) && ! empty($sample_permalink_html) ) : echo $sample_permalink_html; endif; ?>
diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index 05bce39167..5ea942e5b6 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -28,7 +28,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { exit(); } elseif ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; + exit; } $title = __('Pages'); @@ -72,7 +72,7 @@ printf( _c( '%1$s%2$s%3$s|You can reorder these: 1: Pages, 2: by {s}, 3: matchin $label ) { @@ -80,7 +80,7 @@ foreach ( $post_stati as $status => $label ) { if ( !in_array($status, $avail_post_stati) ) continue; - + if ( $status == $_GET['post_status'] ) $class = ' class="current"'; diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 17e74a6bbd..542baddc23 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -87,7 +87,7 @@ default: if ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; + exit; } wp_enqueue_script( 'admin-tags' ); diff --git a/wp-admin/edit.php b/wp-admin/edit.php index f83ef351c8..8da14ab17f 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -28,7 +28,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { exit(); } elseif ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; + exit; } $title = __('Posts'); @@ -154,12 +154,12 @@ foreach ($arc_result as $arc_row) { if ( $arc_row->yyear == 0 ) continue; $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 ); - + if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] ) $default = ' selected="selected"'; else $default = ''; - + echo ""; echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear"; echo "\n"; diff --git a/wp-admin/includes/class-ftp.php b/wp-admin/includes/class-ftp.php index 634ac480bf..1d0172a4c0 100644 --- a/wp-admin/includes/class-ftp.php +++ b/wp-admin/includes/class-ftp.php @@ -14,7 +14,7 @@ class ftp_base { var $Verbose; var $OS_local; var $OS_remote; - + /* Private variables */ var $_lastaction; var $_errors; @@ -601,7 +601,7 @@ class ftp_base { } } return $ret; - + } function mget($remote, $local=".", $continious=false) { @@ -649,13 +649,13 @@ class ftp_base { $this->PushError("mdel","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents"); return false; } - + foreach($list as $k=>$v) { $list[$k]=$this->parselisting($v); if($list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]); } $ret=true; - + foreach($list as $el) { if ( empty($el) ) continue; @@ -673,7 +673,7 @@ class ftp_base { } } } - + if(!$this->rmdir($remote)) { $this->PushError("mdel", "can't delete folder", "Can't delete remote folder \"".$remote."/".$el["name"]."\""); $ret=false; @@ -813,7 +813,7 @@ class ftp_base { $this->SendMSG($fctname.': '.$msg.$tmp); return(array_push($this->_error_array,$error)); } - + // Rcupre une erreur externe function PopError(){ if(count($this->_error_array)) return(array_pop($this->_error_array)); diff --git a/wp-admin/includes/class-pclzip.php b/wp-admin/includes/class-pclzip.php index 19f20b9dad..d387f00d44 100644 --- a/wp-admin/includes/class-pclzip.php +++ b/wp-admin/includes/class-pclzip.php @@ -27,7 +27,7 @@ // ----- Constants define( 'PCLZIP_READ_BLOCK_SIZE', 2048 ); - + // ----- File list separator // In version 1.x of PclZip, the separator for file list is a space // (which is not a very smart choice, specifically for windows paths !). @@ -126,7 +126,7 @@ // which is not correctly supported by PHP ... //define( 'PCLZIP_OPT_CRYPT', 77018 ); define( 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019 ); - + // ----- File description attributes define( 'PCLZIP_ATT_FILE_NAME', 79001 ); define( 'PCLZIP_ATT_FILE_NEW_SHORT_NAME', 79002 ); @@ -169,7 +169,7 @@ // ----- Internal error handling var $error_code = 1; var $error_string = ''; - + // ----- Current status of the magic_quotes_runtime // This value store the php configuration for magic_quotes // The class can then disable the magic_quotes and reset it after @@ -315,16 +315,16 @@ $v_att_list = array(); $v_filedescr_list = array(); $p_result_list = array(); - + // ----- Look if the $p_filelist is really an array if (is_array($p_filelist)) { - + // ----- Look if the first element is also an array // This will mean that this is a file description entry if (isset($p_filelist[0]) && is_array($p_filelist[0])) { $v_att_list = $p_filelist; } - + // ----- The list is a list of string names else { $v_string_list = $p_filelist; @@ -343,7 +343,7 @@ //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } - + // ----- Reformat the string list if (sizeof($v_string_list) != 0) { foreach ($v_string_list as $v_string) { @@ -355,7 +355,7 @@ } } } - + // ----- For each file in the list check the attributes $v_supported_attributes = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' @@ -505,16 +505,16 @@ $v_att_list = array(); $v_filedescr_list = array(); $p_result_list = array(); - + // ----- Look if the $p_filelist is really an array if (is_array($p_filelist)) { - + // ----- Look if the first element is also an array // This will mean that this is a file description entry if (isset($p_filelist[0]) && is_array($p_filelist[0])) { $v_att_list = $p_filelist; } - + // ----- The list is a list of string names else { $v_string_list = $p_filelist; @@ -533,14 +533,14 @@ //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } - + // ----- Reformat the string list if (sizeof($v_string_list) != 0) { foreach ($v_string_list as $v_string) { $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; } } - + // ----- For each file in the list check the attributes $v_supported_attributes = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' @@ -990,7 +990,7 @@ // Options : // PCLZIP_OPT_BY_INDEX : // PCLZIP_OPT_BY_NAME : - // PCLZIP_OPT_BY_EREG : + // PCLZIP_OPT_BY_EREG : // PCLZIP_OPT_BY_PREG : // Return Values : // 0 on failure, @@ -1065,7 +1065,7 @@ function deleteByIndex($p_index) { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'"); - + $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); // ----- Return @@ -1119,7 +1119,7 @@ if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) { $this->privSwapBackMagicQuotes(); - + // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); @@ -1448,7 +1448,7 @@ { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", ""); $v_result=1; - + // ----- Read the options $i=0; while ($i<$p_size) { @@ -1645,7 +1645,7 @@ //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - + // ----- Reduce the index list // each index item in the list must be a couple with a start and // an end value : [0,3], [5-5], [8-10], ... @@ -1656,10 +1656,10 @@ // ----- Explode the item $v_item_list = explode("-", $v_work_list[$j]); $v_size_item_list = sizeof($v_item_list); - + // ----- TBC : Here we might check that each item is a // real integer ... - + // ----- Look for single value if ($v_size_item_list == 1) { // ----- Set the option value @@ -1697,7 +1697,7 @@ } $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start']; } - + // ----- Sort the items if ($v_sort_flag) { // TBC : To Be Completed @@ -1829,10 +1829,10 @@ { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", ""); $v_result=1; - + // ----- For each file in the list check the attributes foreach ($p_file_list as $v_key => $v_value) { - + // ----- Check if the option is supported if (!isset($v_requested_options[$v_key])) { // ----- Error log @@ -1854,7 +1854,7 @@ $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); - + if ($p_filedescr['filename'] == '') { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); @@ -1922,10 +1922,10 @@ } } } - + // end foreach } - + // ----- Return //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; @@ -1944,21 +1944,21 @@ { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", ""); $v_result=1; - + // ----- Create a result list $v_result_list = array(); - + // ----- Look each entry for ($i=0; $iprivCalculateStoredFilename($v_descr, $p_options); - + // ----- Add the descriptor in result list $v_result_list[sizeof($v_result_list)] = $v_descr; - + // ----- Look for folder if ($v_descr['type'] == 'folder') { // ----- List of items in folder @@ -2007,17 +2007,17 @@ if (($v_item_handler == '.') || ($v_item_handler == '..')) { continue; } - + // ----- Compose the full filename $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; - + // ----- Look for different stored filename // Because the name of the folder was changed, the name of the // files/sub-folders also change if ($v_descr['stored_filename'] != $v_descr['filename']) { $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; } - + $v_dirlist_nb++; } } @@ -2025,7 +2025,7 @@ //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to open dir '".$v_descr['filename']."' in read mode. Skipped."); // TBC : unable to open folder in read mode } - + // ----- Expand each element of the list if ($v_dirlist_nb != 0) { // ----- Expand @@ -2033,7 +2033,7 @@ //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - + // ----- Concat the resulting list //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')"); $v_result_list = array_merge($v_result_list, $v_dirlist_descr); @@ -2042,12 +2042,12 @@ else { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand."); } - + // ----- Free local array unset($v_dirlist_descr); } } - + // ----- Get the result list $p_filedescr_list = $v_result_list; @@ -2068,7 +2068,7 @@ //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list"); $v_result=1; $v_list_detail = array(); - + // ----- Magic quotes trick $this->privDisableMagicQuotes(); @@ -2429,7 +2429,7 @@ // Function : privAddFileList() // Description : // Parameters : - // $p_filedescr_list : An array containing the file description + // $p_filedescr_list : An array containing the file description // or directory names to add in the zip // $p_result_list : list of added files with their properties (specially the status field) // Return Values : @@ -2449,7 +2449,7 @@ // ----- Format the filename $p_filedescr_list[$j]['filename'] = PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false); - + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file '".$p_filedescr_list[$j]['filename']."'"); // ----- Skip empty file names @@ -2503,7 +2503,7 @@ { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'"); $v_result=1; - + // ----- Working variable $p_filename = $p_filedescr['filename']; @@ -2516,8 +2516,8 @@ //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - - // ----- Look for a stored different filename + + // ----- Look for a stored different filename if (isset($p_filedescr['stored_filename'])) { $v_stored_filename = $p_filedescr['stored_filename']; //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is NOT the same "'.$v_stored_filename.'"'); @@ -2583,7 +2583,7 @@ if ($p_header['stored_filename'] == "") { $p_header['status'] = "filtered"; } - + // ----- Check the path length if (strlen($p_header['stored_filename']) > 0xFF) { $p_header['status'] = 'filename_too_long'; @@ -2630,13 +2630,13 @@ $p_header['compressed_size'] = strlen($v_content_compressed); $p_header['compression'] = 8; } - + // ----- Look for encryption /* if ((isset($p_options[PCLZIP_OPT_CRYPT])) && ($p_options[PCLZIP_OPT_CRYPT] != "")) { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File need to be crypted ...."); - + // Should be a random header $v_header = 'xxxxxxxxxxxx'; $v_content_compressed = PclZipUtilZipEncrypt($v_content_compressed, @@ -2644,10 +2644,10 @@ $v_header, $p_header['crc'], "test"); - + $p_header['compressed_size'] += 12; $p_header['flag'] = 1; - + // ----- Add the header to the data $v_content_compressed = $v_header.$v_content_compressed; //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size after header : ".strlen($v_content_compressed).""); @@ -2662,9 +2662,9 @@ } // ----- Write the compressed (or not) content - @fwrite($this->zip_fd, + @fwrite($this->zip_fd, $v_content_compressed, $p_header['compressed_size']); - + // ----- Close the file @fclose($v_file); } @@ -2730,7 +2730,7 @@ { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'"); $v_result=1; - + // ----- Working variables $p_filename = $p_filedescr['filename']; if (isset($p_options[PCLZIP_OPT_ADD_PATH])) { @@ -2757,7 +2757,7 @@ $v_stored_filename = $p_filedescr['new_full_name']; //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'"); } - + // ----- Look for path and/or short name change else { @@ -2788,7 +2788,7 @@ if ( (substr($p_filename, 0, 2) == "./") || (substr($p_remove_dir, 0, 2) == "./")) { - + if ( (substr($p_filename, 0, 2) == "./") && (substr($p_remove_dir, 0, 2) != "./")) { $p_remove_dir = "./".$p_remove_dir; @@ -2828,7 +2828,7 @@ $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); $p_filedescr['stored_filename'] = $v_stored_filename; //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename'])); - + // ----- Return //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; @@ -2991,7 +2991,7 @@ { // ----- Magic quotes trick $this->privSwapBackMagicQuotes(); - + // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); @@ -3270,7 +3270,7 @@ else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'"); - + // ----- Look if the index is in the list for ($j=$j_start; ($jprivSwapBackMagicQuotes(); - + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, "Filename '".$v_header['stored_filename']."' is " ."compressed by an unsupported compression " @@ -3320,7 +3320,7 @@ return PclZip::errorCode(); } } - + // ----- Check encrypted files if (($v_extract) && (($v_header['flag'] & 1) == 1)) { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported file encryption"); @@ -3357,7 +3357,7 @@ $v_extract = false; } - + // ----- Look for real extraction if ($v_extract) { @@ -3411,7 +3411,7 @@ // ----- Next extracted file $v_nb_extracted++; - + // ----- Look for user callback abort if ($v_result1 == 2) { break; @@ -3563,13 +3563,13 @@ if ($p_path != '') { $p_entry['filename'] = $p_path."/".$p_entry['filename']; } - + // ----- Check a base_dir_restriction if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Check the extract directory restriction"); $v_inclusion = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], - $p_entry['filename']); + $p_entry['filename']); if ($v_inclusion == 0) { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction"); @@ -3599,7 +3599,7 @@ $p_entry['status'] = "skipped"; $v_result = 1; } - + // ----- Look for abort result if ($v_result == 2) { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); @@ -3631,7 +3631,7 @@ // ----- Change the file status $p_entry['status'] = "already_a_directory"; - + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR // For historical reason first PclZip implementation does not stop // when this kind of error occurs. @@ -3764,7 +3764,7 @@ $v_binary_data = pack('a'.$v_read_size, $v_buffer); @fwrite($v_dest_file, $v_binary_data, $v_read_size); */ - @fwrite($v_dest_file, $v_buffer, $v_read_size); + @fwrite($v_dest_file, $v_buffer, $v_read_size); $v_size -= $v_read_size; } @@ -3773,7 +3773,7 @@ // ----- Change the file mtime touch($p_entry['filename'], $p_entry['mtime']); - + } else { @@ -3786,11 +3786,11 @@ // ----- Read the encryption header //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read 12 encryption header bytes"); $v_encryption_header = @fread($this->zip_fd, 12); - + // ----- Read the encrypted & compressed file in a buffer //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".($p_entry['compressed_size']-12)."' compressed & encrypted bytes"); $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']-12); - + // ----- Decrypt the buffer $this->privDecrypt($v_encryption_header, $v_buffer, $p_entry['compressed_size']-12, $p_entry['crc']); @@ -3802,7 +3802,7 @@ // ----- Read the compressed file in a buffer (one shot) $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); } - + // ----- Decompress the file $v_file_content = @gzinflate($v_buffer); unset($v_buffer); @@ -3812,11 +3812,11 @@ // ----- Change the file status // TBC $p_entry['status'] = "error"; - + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - + // ----- Opening destination file if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); @@ -3855,7 +3855,7 @@ if ($p_entry['status'] == "aborted") { $p_entry['status'] = "skipped"; } - + // ----- Look for post-extract callback elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction"); @@ -3964,7 +3964,7 @@ // ----- Read the compressed file in a buffer (one shot) $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); - + // ----- Decompress the file $v_file_content = gzinflate($v_buffer); unset($v_buffer); @@ -4053,7 +4053,7 @@ // ----- Reading the file $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); - + // ----- Decompress the file if (($p_string = @gzinflate($v_data)) === FALSE) { // TBC @@ -4803,7 +4803,7 @@ //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - + // ----- Check that local file header is same as central file header if ($this->privCheckFileHeaders($v_local_header, $v_header_list[$i]) != 1) { @@ -4896,11 +4896,11 @@ // TBC : I should test the result ... //@rename($v_zip_temp_name, $this->zipname); PclZipUtilRename($v_zip_temp_name, $this->zipname); - + // ----- Destroy the temporary archive unset($v_temp_zip); } - + // ----- Remove every files : reset the file else if ($v_central_dir['entries'] != 0) { $this->privCloseFd(); @@ -5315,13 +5315,13 @@ { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDecrypt', "size=".$p_size.""); $v_result=1; - + // ----- To Be Modified ;-) $v_pwd = "test"; - + $p_buffer = PclZipUtilZipDecrypt($p_buffer, $p_size, $p_encryption_header, $p_crc, $v_pwd); - + // ----- Return //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; @@ -5471,7 +5471,7 @@ } } } - + // ----- Look for skip if ($v_skip > 0) { while ($v_skip > 0) { @@ -5506,7 +5506,7 @@ { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'"); $v_result = 1; - + // ----- Look for path beginning by ./ if ( ($p_dir == '.') || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) { @@ -5697,7 +5697,7 @@ function PclZipUtilOptionText($p_option) { //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'"); - + $v_list = get_defined_constants(); for (reset($v_list); $v_key = key($v_list); next($v_list)) { $v_prefix = substr($v_key, 0, 10); @@ -5709,7 +5709,7 @@ return $v_key; } } - + $v_result = 'Unknown'; //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php index 06db21d9c9..7d5d61f1d2 100644 --- a/wp-admin/includes/class-wp-filesystem-direct.php +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -87,7 +87,7 @@ class WP_Filesystem_Direct{ return false; if( !function_exists('posix_getpwuid') ) return $owneruid; - $ownerarray=posix_getpwuid($owneruid); + $ownerarray=posix_getpwuid($owneruid); return $ownerarray['name']; } function getchmod($file){ @@ -121,21 +121,21 @@ class WP_Filesystem_Direct{ // Unknown $info = 'u'; } - + // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); - + // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); - + // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); @@ -168,10 +168,10 @@ class WP_Filesystem_Direct{ return false; if( !function_exists('posix_getgrgid') ) return $gid; - $grouparray=posix_getgrgid($gid); + $grouparray=posix_getgrgid($gid); return $grouparray['name']; } - + function copy($source,$destination,$overwrite=false){ if( $overwrite && $this->exists($destination) ) return false; @@ -210,7 +210,7 @@ class WP_Filesystem_Direct{ return false; return $retval; } - + function exists($file){ return @file_exists($file); } @@ -230,7 +230,7 @@ class WP_Filesystem_Direct{ function is_writable($file){ return @is_writable($file); } - + function atime($file){ return @fileatime($file); } @@ -249,11 +249,11 @@ class WP_Filesystem_Direct{ $atime = time(); return @touch($file,$time,$atime); } - + function mkdir($path,$chmod=false,$chown=false,$chgrp=false){ if( ! $chmod) $chmod = $this->permission; - + if( !@mkdir($path,$chmod) ) return false; if( $chown ) @@ -275,7 +275,7 @@ class WP_Filesystem_Direct{ } return @rmdir($path); } - + function dirlist($path,$incdot=false,$recursive=false){ if( $this->is_file($path) ){ $limitFile = basename($path); @@ -291,12 +291,12 @@ class WP_Filesystem_Direct{ while (false !== ($entry = $dir->read())) { $struc = array(); $struc['name'] = $entry; - + if( '.' == $struc['name'][0] && !$incdot) continue; if( $limitFile && $struc['name'] != $limitFile) continue; - + $struc['perms'] = $this->gethchmod($path.'/'.$entry); $struc['permsn'] = $this->getnumchmodfromh($struc['perms']); $struc['number'] = false; @@ -309,7 +309,7 @@ class WP_Filesystem_Direct{ $struc['type'] = $this->is_dir($path.'/'.$entry) ? 'd' : 'f'; if ('d' == $struc['type'] ){ $struc['files'] = array(); - + if( $incdot ){ //We're including the doted starts if( '.' != $struc['name'] && '..' != $struc['name'] ){ //Ok, It isnt a special folder diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 2f5f75195f..09b208eadf 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -4,10 +4,10 @@ class WP_Filesystem_FTPext{ var $timeout = 5; var $errors = array(); var $options = array(); - + var $wp_base = ''; var $permission = null; - + var $filetypes = array( 'php'=>FTP_ASCII, 'css'=>FTP_ASCII, @@ -16,13 +16,13 @@ class WP_Filesystem_FTPext{ 'html'=>FTP_ASCII, 'htm'=>FTP_ASCII, 'xml'=>FTP_ASCII, - + 'jpg'=>FTP_BINARY, 'png'=>FTP_BINARY, 'gif'=>FTP_BINARY, 'bmp'=>FTP_BINARY ); - + function WP_Filesystem_FTPext($opt='') { $this->errors = new WP_Error(); @@ -53,10 +53,10 @@ class WP_Filesystem_FTPext{ $this->options['username'] = $opt['username']; if ( empty ($opt['password']) ) - $this->errors->add('empty_password', __('FTP password is required')); + $this->errors->add('empty_password', __('FTP password is required')); else $this->options['password'] = $opt['password']; - + $this->options['ssl'] = ( !empty($opt['ssl']) ); } @@ -88,7 +88,7 @@ class WP_Filesystem_FTPext{ if( empty( $base ) || '.' == $base ) $base = $this->cwd(); if( empty( $base ) ) $base = '/'; if( '/' != substr($base, -1) ) $base .= '/'; - + if($echo) echo sprintf(__('Changing to %s'), $base) .'
'; if( false === ftp_chdir($this->link, $base) ) return false; @@ -219,21 +219,21 @@ class WP_Filesystem_FTPext{ // Unknown $info = 'u'; } - + // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); - + // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); - + // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); @@ -338,11 +338,11 @@ class WP_Filesystem_FTPext{ function rmdir($path,$recursive=false){ if( ! $recursive ) return ftp_rmdir($this->link, $file); - + //TODO: Recursive Directory delete, Have to delete files from the folder first. //$dir = $this->dirlist($path); //foreach($dir as $file) - + } function parselisting($line) { @@ -439,7 +439,7 @@ class WP_Filesystem_FTPext{ $ret = array(); foreach ( $dirlist as $struc ) { - + if ( 'd' == $struc['type'] ) { $struc['files'] = array(); diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 132e7b231a..4ad62f50d1 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -4,10 +4,10 @@ class WP_Filesystem_ftpsockets{ var $timeout = 5; var $errors; var $options = array(); - + var $wp_base = ''; var $permission = null; - + var $filetypes = array( 'php'=>FTP_ASCII, 'css'=>FTP_ASCII, @@ -16,13 +16,13 @@ class WP_Filesystem_ftpsockets{ 'html'=>FTP_ASCII, 'htm'=>FTP_ASCII, 'xml'=>FTP_ASCII, - + 'jpg'=>FTP_BINARY, 'png'=>FTP_BINARY, 'gif'=>FTP_BINARY, 'bmp'=>FTP_BINARY ); - + function WP_Filesystem_ftpsockets($opt='') { $this->errors = new WP_Error(); @@ -52,7 +52,7 @@ class WP_Filesystem_ftpsockets{ $this->options['username'] = $opt['username']; if ( empty ($opt['password']) ) - $this->errors->add('empty_password', __('FTP password is required')); + $this->errors->add('empty_password', __('FTP password is required')); else $this->options['password'] = $opt['password']; } @@ -90,7 +90,7 @@ class WP_Filesystem_ftpsockets{ if( empty( $base ) || '.' == $base ) $base = $this->cwd(); if( empty( $base ) ) $base = '/'; if( '/' != substr($base, -1) ) $base .= '/'; - + if($echo) echo __('Changing to ') . $base .'
'; if( false === $this->ftp->chdir($base) ) return false; @@ -157,7 +157,7 @@ class WP_Filesystem_ftpsockets{ $type = isset($this->filetypes[ $extension ]) ? $this->filetypes[ $extension ] : FTP_ASCII; } $this->ftp->SetType($type); - + $temp = tmpfile(); fwrite($temp,$contents); fseek($temp, 0); //Skip back to the start of the file being written to @@ -173,7 +173,7 @@ class WP_Filesystem_ftpsockets{ function chgrp($file,$group,$recursive=false){ return false; } - + function chmod($file,$mode=false,$recursive=false){ if( ! $mode ) $mode = $this->permission; @@ -191,16 +191,16 @@ class WP_Filesystem_ftpsockets{ } return true; } - + function chown($file,$owner,$recursive=false){ return false; } - + function owner($file){ $dir = $this->dirlist($file); return $dir[$file]['owner']; } - + function getchmod($file){ $dir = $this->dirlist($file); return $dir[$file]['permsn']; @@ -234,21 +234,21 @@ class WP_Filesystem_ftpsockets{ // Unknown $info = 'u'; } - + // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); - + // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); - + // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); @@ -385,7 +385,7 @@ class WP_Filesystem_ftpsockets{ $ret = array(); foreach ( $list as $struc ) { - + if ( 'd' == $struc['type'] ) { $struc['files'] = array(); diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php index a9ff0a06f0..f5ee23ad1d 100644 --- a/wp-admin/includes/comment.php +++ b/wp-admin/includes/comment.php @@ -80,7 +80,7 @@ function floated_admin_avatar( $name ) { return "$avatar $name"; } -if ( is_admin() && ('edit-comments.php' == $pagenow || 'moderation.php' == $pagenow || 'edit.php' == $pagenow) ) { +if ( is_admin() && ('edit-comments.php' == $pagenow || 'moderation.php' == $pagenow || 'edit.php' == $pagenow) ) { if ( get_option('show_avatars') ) add_filter( 'comment_author', 'floated_admin_avatar' ); } diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index ef6e98aadd..5ba11a4a17 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -110,7 +110,7 @@ function wp_dashboard_setup() { $wp_dashboard_empty_callback (only needed if using 'wp_dashboard_empty' as your $output_callback), $arg, $arg, $arg... (further args passed to callbacks) ); - + // optional: if you want users to be able to edit the settings of your widget, you need to register a widget_control wp_register_widget_control( $widget_id, $widget_control_title, $control_output_callback, array(), // leave an empty array here: oddity in widget code @@ -316,17 +316,17 @@ function wp_dashboard_incoming_links_output() { $content = ''; $date = ''; $link = clean_url( strip_tags( $item['link'] ) ); - + if ( isset( $item['author_uri'] ) ) $site_link = clean_url( strip_tags( $item['author_uri'] ) ); - + if ( !$publisher = wp_specialchars( strip_tags( isset($item['dc']['publisher']) ? $item['dc']['publisher'] : $item['author_name'] ) ) ) $publisher = __( 'Somebody' ); if ( $site_link ) $publisher = "$publisher"; else $publisher = "$publisher"; - + if ( isset($item['description']) ) $content = $item['description']; elseif ( isset($item['summary']) ) @@ -343,7 +343,7 @@ function wp_dashboard_incoming_links_output() { $text = _c( '%1$s linked here saying, "%3$s"|feed_display' ); else $text = _c( '%1$s linked here saying, "%3$s"|feed_display' ); - + if ( $show_date ) { if ( $show_author || $show_summary ) $text .= _c( ' on %4$s|feed_display' ); @@ -351,7 +351,7 @@ function wp_dashboard_incoming_links_output() { $date = strtotime( $date ); $date = gmdate( get_option( 'date_format' ), $date ); } - + echo "\t
  • " . sprintf( _c( "$text|feed_display" ), $publisher, $link, $content, $date ) . "
  • \n"; } diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 1d0252c02f..9178c3b444 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -207,7 +207,7 @@ function download_url( $url ) { require_once( ABSPATH . 'wp-includes/class-snoopy.php' ); $snoopy = new Snoopy(); $snoopy->fetch($url); - + fwrite($handle, $snoopy->results); fclose($handle); @@ -219,7 +219,7 @@ function unzip_file($file, $to) { if ( ! $wp_filesystem || !is_object($wp_filesystem) ) return new WP_Error('fs_unavailable', __('Could not access filesystem.')); - + $fs =& $wp_filesystem; require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php'); diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index ac9f9a7a9a..5ca5303ccc 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -126,7 +126,7 @@ function wp_iframe($content_func /* ... */) { <?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — WordPress - @@ -386,7 +386,7 @@ function media_upload_file() { function media_upload_gallery() { if ( !empty($_POST) ) { $return = media_upload_form_handler(); - + if ( is_string($return) ) return $return; if ( is_array($return) ) @@ -399,7 +399,7 @@ function media_upload_gallery() { function media_upload_library() { if ( !empty($_POST) ) { $return = media_upload_form_handler(); - + if ( is_string($return) ) return $return; if ( is_array($return) ) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index a453f437b8..7238613b06 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -644,7 +644,7 @@ function wp_set_post_lock( $post_id ) { return false; if ( !$current_user || !$current_user->ID ) return false; - + $now = time(); if ( !add_post_meta( $post->ID, '_edit_lock', $now, true ) ) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 9f490d3c45..8c7c974519 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -347,8 +347,8 @@ function display_page_row( $page, &$children_pages, $level = 0 ) { $posts_columns = wp_manage_pages_columns(); ?> - - + + $column_display_name) { @@ -451,7 +451,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) { } } ?> - + escape($s); $comments = $wpdb->get_results("SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE @@ -615,7 +615,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true $delete_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); - + ?> diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index cacaa4eb7b..cce8f6723f 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -137,7 +137,7 @@ function wp_update_plugin($plugin, $feedback = '') { if ( ! is_object($wp_filesystem) ) return new WP_Error('fs_unavailable', __('Could not access filesystem.')); - if ( $wp_filesystem->errors->get_error_code() ) + if ( $wp_filesystem->errors->get_error_code() ) return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors); // Get the URL to the zip file @@ -172,7 +172,7 @@ function wp_update_plugin($plugin, $feedback = '') { // Once installed, delete the package unlink($file); - + // Remove the existing plugin. apply_filters('update_feedback', __("Removing the old version of the plugin")); $plugin_dir = dirname(ABSPATH . PLUGINDIR . "/$plugin"); diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 47608f3168..f9152ba43d 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -327,7 +327,7 @@ class WP_User_Search { $search_sql .= implode(' OR ', $searches); $search_sql .= ')'; } - + $this->query_from_where = "FROM $wpdb->users"; if ( $this->role ) $this->query_from_where .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE '%$this->role%'"; diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js index d3f5bac7dd..2abefd83b8 100644 --- a/wp-admin/js/common.js +++ b/wp-admin/js/common.js @@ -1,6 +1,6 @@ addLoadEvent( function() { // pulse - jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300); + jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300); // Reveal jQuery('.wp-no-js-hidden').removeClass( 'wp-no-js-hidden' ); diff --git a/wp-admin/js/editor.js b/wp-admin/js/editor.js index 6eb84afcf2..507c73ab32 100644 --- a/wp-admin/js/editor.js +++ b/wp-admin/js/editor.js @@ -5,17 +5,17 @@ wpEditorInit = function() { tinyMCE.execCommand("mceAddControl", true, "content"); } else { var H; - if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") ) + if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") ) document.getElementById('content').style.height = H.ch - 30 + 'px'; } }; switchEditors = { - + saveCallback : function(el, content, body) { - + document.getElementById(el).style.color = '#fff'; - if ( tinyMCE.activeEditor.isHidden() ) + if ( tinyMCE.activeEditor.isHidden() ) content = document.getElementById(el).value; else content = this.pre_wpautop(content); @@ -44,12 +44,12 @@ switchEditors = { content = content.replace(new RegExp('\\s*<(('+blocklist+') ?[^>]*)\\s*>', 'mg'), '\n<$1>'); content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); content = content.replace(new RegExp('
  • ', 'g'), '\t
  • '); - + if ( content.indexOf(']*)>\\s*', 'g'), ""); // no pee inside object/embed content = content.replace(new RegExp('\\s*\\s*', 'g'), ''); } - + // Unmark special paragraph closing tags content = content.replace(new RegExp('', 'g'), '

    \n'); content = content.replace(new RegExp('\\s*(]+>.*

    )', 'mg'), '\n$1'); @@ -71,7 +71,7 @@ switchEditors = { if ( ! ed || ed.isHidden() ) { ta.style.color = '#fff'; - + this.edToggle(P, H); edCloseAllTags(); // :-( @@ -83,7 +83,7 @@ switchEditors = { if ( ed ) ed.show(); else tinyMCE.execCommand("mceAddControl", false, id); - + this.wpSetDefaultEditor( 'tinymce' ); } else { this.edToggle(H, P); @@ -93,7 +93,7 @@ switchEditors = { ed.hide(); ta.value = this.pre_wpautop(ta.value); qt.style.display = 'block'; - + if ( tinymce.isIE6 ) { ta.style.width = '98%'; ec.style.padding = '0px'; @@ -102,7 +102,7 @@ switchEditors = { ta.style.width = '100%'; ec.style.padding = '6px'; } - + ta.style.color = ''; this.wpSetDefaultEditor( 'html' ); @@ -132,10 +132,10 @@ switchEditors = { wpautop : function(pee) { var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]'; - + pee = pee + "\n\n"; pee = pee.replace(new RegExp('
    \\s*
    ', 'gi'), "\n\n"); - pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); + pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); pee = pee.replace(new RegExp('()', 'gi'), "$1\n\n"); pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n"); pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n"); @@ -146,7 +146,7 @@ switchEditors = { pee = pee.replace(new RegExp('

    ]*)>', 'gi'), "

    "); pee = pee.replace(new RegExp('

    ', 'gi'), '

    '); pee = pee.replace(new RegExp('

    \\s*(]*>)', 'gi'), "$1"); - pee = pee.replace(new RegExp('(]*>)\\s*

    ', 'gi'), "$1"); + pee = pee.replace(new RegExp('(]*>)\\s*

    ', 'gi'), "$1"); pee = pee.replace(new RegExp('\\s*\\n', 'gi'), "
    \n"); pee = pee.replace(new RegExp('(]*>)\\s*
    ', 'gi'), "$1"); pee = pee.replace(new RegExp('
    (\\s*)', 'gi'), '$1'); diff --git a/wp-admin/js/forms.js b/wp-admin/js/forms.js index 779f639bbd..21a62f4287 100644 --- a/wp-admin/js/forms.js +++ b/wp-admin/js/forms.js @@ -13,8 +13,8 @@ function getNumChecked(form) { var num = 0; for (i = 0, n = form.elements.length; i < n; i++) { if (form.elements[i].type == "checkbox") { - if (form.elements[i].checked == true) - num++; + if (form.elements[i].checked == true) + num++; } } return num; @@ -22,8 +22,8 @@ function getNumChecked(form) { function checkAllUsers(role) { var checkboxs = document.getElementsByTagName('input'); - for(var i = 0, inp; inp = checkboxs[i]; i++) - if(inp.type.toLowerCase() == 'checkbox' && inp.className == role) + for(var i = 0, inp; inp = checkboxs[i]; i++) + if(inp.type.toLowerCase() == 'checkbox' && inp.className == role) if(inp.checked == false) inp.checked = true; else diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js index 40b8c1397e..561aeecd88 100644 --- a/wp-admin/js/media-upload.js +++ b/wp-admin/js/media-upload.js @@ -9,4 +9,4 @@ function send_to_editor(h) { tinyMCE.execCommand('mceInsertContent', false, h); } else win.edInsertContent(win.edCanvas, h); -} \ No newline at end of file +} \ No newline at end of file diff --git a/wp-admin/js/password-strength-meter.js b/wp-admin/js/password-strength-meter.js index 1f4cd7bcc1..eba43fcdfe 100644 --- a/wp-admin/js/password-strength-meter.js +++ b/wp-admin/js/password-strength-meter.js @@ -12,14 +12,14 @@ var strongPass = 'Strong' function passwordStrength(password,username) { - score = 0 - + score = 0 + //password < 4 if (password.length < 4 ) { return shortPass } - + //password == username if (password.toLowerCase()==username.toLowerCase()) return badPass - + //password length score += password.length * 4 score += ( checkRepetition(1,password).length - password.length ) * 1 @@ -28,31 +28,31 @@ function passwordStrength(password,username) score += ( checkRepetition(4,password).length - password.length ) * 1 //password has 3 numbers - if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 - + if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 + //password has 2 sybols - if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 - + if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 + //password has Upper and Lower chars - if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 - + if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 + //password has number and chars - if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 + if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 // //password has number and symbol - if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 - + if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 + //password has char and symbol - if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 - + if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 + //password is just a nubers or chars - if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 - + if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 + //verifing 0 < score < 100 - if ( score < 0 ) score = 0 - if ( score > 100 ) score = 100 - - if (score < 34 ) return badPass + if ( score < 0 ) score = 0 + if ( score > 100 ) score = 100 + + if (score < 34 ) return badPass if (score < 68 ) return goodPass return strongPass } @@ -93,14 +93,14 @@ var strongPass = 'Strong' function passwordStrength(password,username) { - score = 0 - + score = 0 + //password < 4 if (password.length < 4 ) { return shortPass } - + //password == username if (password.toLowerCase()==username.toLowerCase()) return badPass - + //password length score += password.length * 4 score += ( checkRepetition(1,password).length - password.length ) * 1 @@ -109,31 +109,31 @@ function passwordStrength(password,username) score += ( checkRepetition(4,password).length - password.length ) * 1 //password has 3 numbers - if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 - + if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 + //password has 2 sybols - if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 - + if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 + //password has Upper and Lower chars - if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 - + if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 + //password has number and chars - if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 + if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 // //password has number and symbol - if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 - + if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 + //password has char and symbol - if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 - + if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 + //password is just a nubers or chars - if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 - + if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 + //verifing 0 < score < 100 - if ( score < 0 ) score = 0 - if ( score > 100 ) score = 100 - - if (score < 34 ) return badPass + if ( score < 0 ) score = 0 + if ( score > 100 ) score = 100 + + if (score < 34 ) return badPass if (score < 68 ) return goodPass return strongPass } diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index 7e6c8a8a41..8a8ca71973 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -23,7 +23,7 @@ function tag_update_quickclicks() { // jQuery.merge( current_tags, current_tags ); // this doesn't work anymore, need something to array_unique jQuery.each( current_tags, function( key, val ) { val = val.replace( /^\s+/, '' ).replace( /\s+$/, '' ); // trim - if ( !val.match(/^\s+$/) && '' != val ) { + if ( !val.match(/^\s+$/) && '' != val ) { txt = 'X ' + val + ' '; jQuery( '#tagchecklist' ).append( txt ); jQuery( '#tag-check-' + key ).click( new_tag_remove_tag ); @@ -63,12 +63,12 @@ addLoadEvent( function() { // If no tags on the page, skip the tag and category stuff. if ( !jQuery('#tags-input').size() ) { - return; + return; } // Editable slugs make_slugedit_clickable(); - + // hide advanced slug field jQuery('#slugdiv').hide(); diff --git a/wp-admin/js/slug.js b/wp-admin/js/slug.js index 80f62aa85e..7da617f9a0 100644 --- a/wp-admin/js/slug.js +++ b/wp-admin/js/slug.js @@ -1,7 +1,7 @@ function edit_permalink(post_id) { var i, c = 0; var e = jQuery('#editable-post-name'); - var revert_e = e.html(); + var revert_e = e.html(); var real_slug = jQuery('#post_name'); var revert_slug = real_slug.html(); var b = jQuery('#edit-slug-buttons'); @@ -18,7 +18,7 @@ function edit_permalink(post_id) { samplepermalinknonce: jQuery('#samplepermalinknonce').val()}, function(data) { jQuery('#edit-slug-box').html(data); b.html(revert_b); - real_slug.attr('value', new_slug); + real_slug.attr('value', new_slug); make_slugedit_clickable(); }); return false; diff --git a/wp-admin/js/upload.js b/wp-admin/js/upload.js index d114e04715..b632e427ce 100644 --- a/wp-admin/js/upload.js +++ b/wp-admin/js/upload.js @@ -5,7 +5,7 @@ addLoadEvent( function() { tab: '', postID: 0, - // cookie create and read functions adapted from http://www.quirksmode.org/js/cookies.html + // cookie create and read functions adapted from http://www.quirksmode.org/js/cookies.html createCookie: function(name,value,days) { if (days) { var date = new Date(); @@ -28,8 +28,8 @@ addLoadEvent( function() { }, assignCookieOnChange: function() { - jQuery(this).bind("change", function(){ - theFileList.createCookie(jQuery(this).attr('name'),jQuery(this).attr('id'),365); + jQuery(this).bind("change", function(){ + theFileList.createCookie(jQuery(this).attr('name'),jQuery(this).attr('id'),365); }); }, @@ -323,7 +323,7 @@ addLoadEvent( function() { }; - for ( var property in uploadL10n ) + for ( var property in uploadL10n ) theFileList[property] = uploadL10n[property]; theFileList.initializeVars(); theFileList.initializeLinks(); diff --git a/wp-admin/js/widgets.js b/wp-admin/js/widgets.js index a2e83c079d..d158963788 100644 --- a/wp-admin/js/widgets.js +++ b/wp-admin/js/widgets.js @@ -87,7 +87,7 @@ jQuery(function($) { var addWidgetControls = function( context ) { if ( !context ) context = document; - + $('a.widget-control-edit', context).click( editClick ); // onclick for save links diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index 8f3ea6cac9..c8292a4bce 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -21,7 +21,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['linkcheck']) ) { exit; } elseif ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; + exit; } wp_enqueue_script('admin-forms'); @@ -170,7 +170,7 @@ if ( $links ) { foreach($link_columns as $column_name=>$column_display_name) { switch($column_name) { case 'name': - + echo "$link->link_name
    "; echo $link->link_description . ""; break; diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index cbd5c4d55a..657c163a70 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -57,7 +57,7 @@ include('./admin-header.php'); - +

    diff --git a/wp-admin/update.php b/wp-admin/update.php index a115ba3b20..8daa3b0b03 100644 --- a/wp-admin/update.php +++ b/wp-admin/update.php @@ -110,7 +110,7 @@ if ( isset($_GET['action']) ) { require_once('admin-header.php'); do_plugin_upgrade($plugin); include('admin-footer.php'); - } + } } diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 469b78bd43..dde7b71ef0 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -1,8 +1,8 @@ yyear == 0 ) continue; $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 ); - + if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] ) $default = ' selected="selected"'; else $default = ''; - + echo ""; echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear"; echo "\n"; diff --git a/wp-admin/users.php b/wp-admin/users.php index 62f92b25f7..c05cef716c 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -184,7 +184,7 @@ default: if ( !empty($_GET['_wp_http_referer']) ) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; + exit; } wp_enqueue_script('admin-users'); diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 6b45ac1765..37ffd6a402 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -170,7 +170,7 @@ form#upload #post_content { border: none; font-size: 13px; -moz-border-radius: 3px; - -khtml-border-radius: 3px; + -khtml-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; color: #246; @@ -234,8 +234,8 @@ select { } .error { - background: #f00; - border: 1px solid #800; + background: #f00; + border: 1px solid #800; color: #fff; } @@ -368,7 +368,7 @@ input.disabled, textarea.disabled { #searchform fieldset legend { padding: 0 0 .2em 1px; } - + #searchform #s { padding: 4px 3px; } @@ -569,7 +569,7 @@ p.pagenav { font-size: 12px; color: #555; text-align: center; -} +} #update-nag a, .plugin-update a { font-size: 1.1em; @@ -578,30 +578,30 @@ p.pagenav { color: #036; } -#pass-strength-result { +#pass-strength-result { padding: 3px 5px 3px 5px; margin-top: 3px; - text-align: center; + text-align: center; background-color: #e3e3e3; border: 1px solid #000000; } -#pass-strength-result.short { +#pass-strength-result.short { background-color: #e3e3e3; - border: 1px solid #000000; + border: 1px solid #000000; } -#pass-strength-result.bad { +#pass-strength-result.bad { background-color: #ffeff7; - border: 1px solid #cc6699; + border: 1px solid #cc6699; } -#pass-strength-result.good { +#pass-strength-result.good { background-color: #effff4; - border: 1px solid #66cc87; + border: 1px solid #66cc87; } -#pass-strength-result.strong { +#pass-strength-result.strong { background-color: #59ef86; border: 1px solid #319f52; } @@ -694,7 +694,7 @@ a.view-comment-post-link { -khtml-border-top-left-radius: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; - -moz-border-radius-topright: 3px; + -moz-border-radius-topright: 3px; -khtml-border-top-right-radius: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; @@ -891,8 +891,8 @@ strong .post-com-count span { html, body { height:100%; } -#wpwrap { - position: relative; +#wpwrap { + position: relative; min-height: 100%; } #wpcontent{ @@ -905,8 +905,8 @@ html, body { margin: 0; background: #464646 url('images/logo-ghost.png') no-repeat 20px 10px; color: #999; - position: relative; - margin-top: -75px; + position: relative; + margin-top: -75px; } #footer a { @@ -1064,7 +1064,7 @@ html, body { #link_name, #link_url, #link_description { font-size: 1.7em; padding: 4px 3px; - width: 98%; + width: 98%; } #edit-slug-box { diff --git a/wp-content/themes/default/rtl.css b/wp-content/themes/default/rtl.css index 9b4e8ffe87..e56238f072 100644 --- a/wp-content/themes/default/rtl.css +++ b/wp-content/themes/default/rtl.css @@ -1,68 +1,68 @@ /* Based on Arabic (RTL) version of Kubrick theme, converted by Serdal (Serdal.com) */ - + .narrowcolumn, .alignleft, .widecolumn .smallattachment { float: right; } .alignright, #commentform #submit { float: left; } - + #page, .post, #wp-calendar #prev a { text-align: right; } - + body, #commentform p { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', Verdana, Arial, Sans-Serif; } - + small { font-family: 'Geeza Pro', Tahoma, Arial, Helvetica, Sans-Serif; } - + h1, h2, h3 { font-family: 'Al Bayan', 'Traditional Arabic', 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif; } - + #sidebar h2 { font-family: 'Al Bayan', 'Traditional Arabic', 'Lucida Grande', Verdana, Sans-Serif; } - + .commentlist li, #commentform input, #commentform textarea { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', Verdana, Arial, Sans-Serif; } - + #sidebar { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', Verdana, Arial, Sans-Serif; } - + #wp-calendar caption { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', Verdana, Arial, Sans-Serif; } - + acronym, abbr, span.caps { letter-spacing: normal; } - + #header { margin: 0 1px 0 0; } - + .narrowcolumn { padding: 0 45px 20px 0; } - + .widecolumn { margin: 5px 150px 0 0; } - + .widecolumn .smallattachment { margin: 5px 0px 5px 5px; } - + .postmetadata { clear: right; } - + img.alignright { margin: 0 7px 2px 0; } - + img.alignleft { margin: 0 0 2px 7px; } - + .entry ol { padding: 0 35px 0 0; } - + #sidebar ul ul, #sidebar ul ol { margin: 5px 10px 0 0; } - + #sidebar ul ul ul, #sidebar ul ol { margin: 0 10px 0 0; } - + #commentform input { margin: 5px 0 1px 5px; } - + .commentlist p { margin: 10px 0 10px 5px; } - + html>body .entry li { margin: 7px 10px 8px 0; } - + html>body .entry ul { margin-left: auto; margin-right: 0px; padding: 0 30px 0 0; } - + #sidebar { margin-left: auto; margin-right: 545px; } - + #wp-calendar #prev a, html>body .entry ul { padding-left: 0; padding-right: 10px; } - + blockquote { border-left: 0; border-right: 5px solid #ddd; @@ -70,7 +70,7 @@ blockquote { padding-right: 20px; margin: 15px 10px 0 30px; } - + #wp-calendar #next a { padding-right: 0; padding-left: 10px; diff --git a/wp-content/themes/default/style.css b/wp-content/themes/default/style.css index 17ad0a0525..d8b4523524 100644 --- a/wp-content/themes/default/style.css +++ b/wp-content/themes/default/style.css @@ -1,4 +1,4 @@ -/* +/* Theme Name: WordPress Default Theme URI: http://wordpress.org/ Description: The default WordPress theme based on the famous Kubrick. @@ -39,11 +39,11 @@ body { background: #73a0c5 url('images/kubrickheader.jpg') no-repeat bottom center; } -#headerimg { - margin: 7px 9px 0; - height: 192px; - width: 740px; - } +#headerimg { + margin: 7px 9px 0; + height: 192px; + width: 740px; + } #content { font-size: 1.2em @@ -72,7 +72,7 @@ body { } #footer { - background: #eee url('images/kubrickfooter.jpg') no-repeat top; + background: #eee url('images/kubrickfooter.jpg') no-repeat top; border: none; } @@ -211,7 +211,7 @@ a:hover { /* Begin Structure */ body { margin: 0 0 20px 0; - padding: 0; + padding: 0; } #page { @@ -224,9 +224,9 @@ body { #header { background-color: #73a0c5; - margin: 0 0 0 1px; - padding: 0; - height: 200px; + margin: 0 0 0 1px; + padding: 0; + height: 200px; width: 758px; } @@ -386,7 +386,7 @@ html>body .entry ul { list-style: none; padding-left: 10px; text-indent: -10px; - } + } html>body .entry li { margin: 7px 0 8px 10px; @@ -450,7 +450,7 @@ ol li, #sidebar ul ol li { /* Begin Form Elements */ #searchform { margin: 10px auto; - padding: 5px 3px; + padding: 5px 3px; text-align: center; } diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index ca1299d436..b340923383 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -167,25 +167,25 @@ function get_the_category_list($separator = '', $parents='', $post_id = false) { return apply_filters('the_category', $thelist, $separator, $parents); } -/* +/* * in_category() - Checks whether the current post is within a particular category - * + * * This function checks to see if the post is within the supplied category. The categoy * can be specified by number or name and will be checked as a name first to allow for categories with numeric names. * Note: Prior to v2.5 of WordPress category names where not supported. - * - * @since 1.2.0 - * - * @param int|string $category + * + * @since 1.2.0 + * + * @param int|string $category * @return bool true if the post is in the supplied category -*/ +*/ function in_category( $category ) { // Check if the current post is in the given category global $post; $cat_ID = get_cat_ID($category); if (0 != $cat_ID) $category = $cat_ID; - + $categories = get_object_term_cache($post->ID, 'category'); if ( false === $categories ) $categories = wp_get_object_terms($post->ID, 'category'); diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 89c1f7b7b9..7cf3eed201 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -416,34 +416,34 @@ class Walker { $cb_args = array_merge( array($output, $element, $depth), $args); $output = call_user_func_array(array(&$this, 'start_el'), $cb_args); - if ( $max_depth == 0 || + if ( $max_depth == 0 || ($max_depth != 0 && $max_depth > $depth+1 )) { //whether to descend - + for ( $i = 0; $i < sizeof( $children_elements ); $i++ ) { - + $child = $children_elements[$i]; if ( $child->$parent_field == $element->$id_field ) { if ( !isset($newlevel) ) { - $newlevel = true; + $newlevel = true; //start the child delimiter $cb_args = array_merge( array($output, $depth), $args); $output = call_user_func_array(array(&$this, 'start_lvl'), $cb_args); } - + array_splice( $children_elements, $i, 1 ); $output = $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output ); $i = -1; } } } - + if ( isset($newlevel) && $newlevel ){ //end the child delimiter $cb_args = array_merge( array($output, $depth), $args); $output = call_user_func_array(array(&$this, 'end_lvl'), $cb_args); } - + //end this element $cb_args = array_merge( array($output, $element, $depth), $args); $output = call_user_func_array(array(&$this, 'end_el'), $cb_args); diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 75792ad1b2..32c28ce9d2 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -1276,7 +1276,7 @@ function documentation_link( $deprecated = '' ) { /** * gzip_compression() - Unused function - * + * * @deprecated 2.5 */ diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 853454b5dd..661a79ffc3 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -5,14 +5,14 @@ function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) { $m = $mysqlstring; if ( empty( $m ) ) return false; - + if( 'G' == $dateformatstring ) { return gmmktime( (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 ) ); } - + $i = mktime( (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 ) @@ -906,7 +906,7 @@ function do_feed() { wp_die($message); } - do_action( $hook, $wp_query->is_comment_feed ); + do_action( $hook, $wp_query->is_comment_feed ); } @@ -1043,7 +1043,7 @@ function path_is_absolute( $path ) { if ( strlen($path) == 0 || $path{0} == '.' ) return false; - + // windows allows absolute paths like this if ( preg_match('#^[a-zA-Z]:\\\\#', $path) ) return true; @@ -1056,7 +1056,7 @@ function path_is_absolute( $path ) { function path_join( $base, $path ) { if ( path_is_absolute($path) ) return $path; - + return rtrim($base, '/') . '/' . ltrim($path, '/'); } @@ -1064,7 +1064,7 @@ function path_join( $base, $path ) { function wp_upload_dir( $time = NULL ) { $siteurl = get_option( 'siteurl' ); $upload_path = $dir = get_option( 'upload_path' ); - + // $dir is absolute, $path is (maybe) relative to ABSPATH $dir = path_join( ABSPATH, $upload_path ); $path = str_replace( ABSPATH, '', trim( $upload_path ) ); @@ -1089,7 +1089,7 @@ function wp_upload_dir( $time = NULL ) { $m = substr( $time, 5, 2 ); $subdir = "/$y/$m"; } - + $dir .= $subdir; $url .= $subdir; @@ -1184,7 +1184,7 @@ function wp_ext2type( $ext ) { 'interactive' => array('ppt','key','odp','swf'), 'text' => array('txt'), 'archive' => array('tar','bz2','gz','cab','dmg','rar','sea','sit','sqx','zip'), - 'code' => array('css','html','php','js'), + 'code' => array('css','html','php','js'), )); foreach ( $ext2type as $type => $exts ) if ( in_array($ext, $exts) ) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index c762d69144..40ee7fe9c2 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -937,8 +937,8 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button

    diff --git a/wp-includes/js/autosave.js b/wp-includes/js/autosave.js index 98d7de119c..26fdb58034 100644 --- a/wp-includes/js/autosave.js +++ b/wp-includes/js/autosave.js @@ -132,7 +132,7 @@ var autosave = function() { /* Gotta do this up here so we can check the length when tinyMCE is in use */ if ( rich ) { tinyMCE.triggerSave(); } - + post_data["content"] = jQuery("#content").val(); if ( jQuery('#post_name').val() ) post_data["post_name"] = jQuery('#post_name').val(); diff --git a/wp-includes/js/quicktags.js b/wp-includes/js/quicktags.js index 0837d84a5c..90b0e7ef63 100644 --- a/wp-includes/js/quicktags.js +++ b/wp-includes/js/quicktags.js @@ -25,15 +25,15 @@ function zeroise(number, threshold) { } var now = new Date(); -var datetime = now.getUTCFullYear() + '-' + +var datetime = now.getUTCFullYear() + '-' + zeroise(now.getUTCMonth() + 1, 2) + '-' + -zeroise(now.getUTCDate(), 2) + 'T' + -zeroise(now.getUTCHours(), 2) + ':' + -zeroise(now.getUTCMinutes(), 2) + ':' + +zeroise(now.getUTCDate(), 2) + 'T' + +zeroise(now.getUTCHours(), 2) + ':' + +zeroise(now.getUTCMinutes(), 2) + ':' + zeroise(now.getUTCSeconds() ,2) + '+00:00'; -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_strong' ,'b' ,'' @@ -41,7 +41,7 @@ new edButton('ed_strong' ,'b' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_em' ,'i' ,'' @@ -49,7 +49,7 @@ new edButton('ed_em' ,'i' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_link' ,'link' ,'' @@ -57,7 +57,7 @@ new edButton('ed_link' ,'a' ); // special case -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_block' ,'b-quote' ,'\n\n
    ' @@ -66,7 +66,7 @@ new edButton('ed_block' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_del' ,'del' ,'' @@ -74,7 +74,7 @@ new edButton('ed_del' ,'d' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_ins' ,'ins' ,'' @@ -82,7 +82,7 @@ new edButton('ed_ins' ,'s' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_img' ,'img' ,'' @@ -91,7 +91,7 @@ new edButton('ed_img' ,-1 ); // special case -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_ul' ,'ul' ,'
      \n' @@ -99,7 +99,7 @@ new edButton('ed_ul' ,'u' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_ol' ,'ol' ,'
        \n' @@ -107,7 +107,7 @@ new edButton('ed_ol' ,'o' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_li' ,'li' ,'\t
      1. ' @@ -115,7 +115,7 @@ new edButton('ed_li' ,'l' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_code' ,'code' ,'' @@ -123,7 +123,7 @@ new edButton('ed_code' ,'c' ); -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_more' ,'more' ,'' @@ -132,7 +132,7 @@ new edButton('ed_more' ,-1 ); /* -edButtons[edButtons.length] = +edButtons[edButtons.length] = new edButton('ed_next' ,'page' ,'' @@ -220,7 +220,7 @@ function edQuickLink(i, thisSelect) { if (edLinks[i].newWin == 1) { newWin = ' target="_blank"'; } - var tempStr = '' + var tempStr = '' + edLinks[i].display + ''; thisSelect.selectedIndex = 0; @@ -298,21 +298,21 @@ function edInsertTag(myField, i) { if (startPos != endPos) { myField.value = myField.value.substring(0, startPos) + edButtons[i].tagStart - + myField.value.substring(startPos, endPos) + + myField.value.substring(startPos, endPos) + edButtons[i].tagEnd + myField.value.substring(endPos, myField.value.length); cursorPos += edButtons[i].tagStart.length + edButtons[i].tagEnd.length; } else { if (!edCheckOpenTags(i) || edButtons[i].tagEnd == '') { - myField.value = myField.value.substring(0, startPos) + myField.value = myField.value.substring(0, startPos) + edButtons[i].tagStart + myField.value.substring(endPos, myField.value.length); edAddTag(i); cursorPos = startPos + edButtons[i].tagStart.length; } else { - myField.value = myField.value.substring(0, startPos) + myField.value = myField.value.substring(0, startPos) + edButtons[i].tagEnd + myField.value.substring(endPos, myField.value.length); edRemoveTag(i); @@ -350,7 +350,7 @@ function edInsertContent(myField, myValue) { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) - + myValue + + myValue + myField.value.substring(endPos, myField.value.length); myField.focus(); myField.selectionStart = startPos + myValue.length; @@ -380,9 +380,9 @@ function edInsertLink(myField, i, defaultValue) { function edInsertImage(myField) { var myValue = prompt(quicktagsL10n.enterImageURL, 'http://'); if (myValue) { - myValue = '' + prompt(quicktagsL10n.enterImageDescription, '') 
+		myValue = '<img src='; edInsertContent(myField, myValue); } diff --git a/wp-includes/js/wp-lists.js b/wp-includes/js/wp-lists.js index fcf57317d9..3fc0ecf235 100644 --- a/wp-includes/js/wp-lists.js +++ b/wp-includes/js/wp-lists.js @@ -58,7 +58,7 @@ var wpList = { s.element = cls[2] || e.attr( 'id' ) || s.element || null; if ( cls[3] ) { s.addColor = '#' + cls[3]; } else { s.addColor = s.addColor || '#FFFF33'; } - + if ( !s ) { return false; } if ( !e.is("[class^=add:" + list.id + ":]") ) { return !wpList.add.call( list, e, s ); } diff --git a/wp-includes/media.php b/wp-includes/media.php index 696eebdf04..030d5d50ba 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -4,7 +4,7 @@ // scale down the default size of an image so it's a better fit for the editor and theme function image_constrain_size_for_editor($width, $height, $size = 'medium') { - + if ( $size == 'thumb' ) { $max_width = intval(get_option('thumbnail_size_w')); $max_height = intval(get_option('thumbnail_size_h')); @@ -33,7 +33,7 @@ function image_constrain_size_for_editor($width, $height, $size = 'medium') { } list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size ); - + return wp_constrain_dimensions( $width, $height, $max_width, $max_height ); } @@ -51,15 +51,15 @@ function image_hwstring($width, $height) { // The URL might be the original image, or it might be a resized version. // returns an array($url, $width, $height) function image_downsize($id, $size = 'medium') { - + $img_url = wp_get_attachment_url($id); $meta = wp_get_attachment_metadata($id); $width = $height = 0; - + // plugins can use this to provide resize services if ( $out = apply_filters('image_downsize', false, $id, $size) ) return $out; - + if ( $size == 'thumb' ) { // thumbnail: use the thumb as the displayed image, and constrain based on its dimensions $thumb_path = wp_get_attachment_thumb_file($id); @@ -74,9 +74,9 @@ function image_downsize($id, $size = 'medium') { // any other type: use the real image and constrain it list( $width, $height ) = image_constrain_size_for_editor( $meta['width'], $meta['height'], $size ); } - + return array( $img_url, $width, $height ); - + } // return an tag for the given image attachment, scaling it down if requested @@ -97,31 +97,31 @@ function get_image_tag($id, $alt, $title, $align, $rel = false, $size='medium') function wp_constrain_dimensions( $current_width, $current_height, $max_width=0, $max_height=0 ) { if ( !$max_width and !$max_height ) return array( $current_width, $current_height ); - + $width_ratio = $height_ratio = 1.0; - + if ( $max_width > 0 && $current_width > $max_width ) $width_ratio = $max_width / $current_width; - + if ( $max_height > 0 && $current_height > $max_height ) $height_ratio = $max_height / $current_height; - + // the smaller ratio is the one we need to fit it to the constraining box $ratio = min( $width_ratio, $height_ratio ); - + return array( intval($current_width * $ratio), intval($current_height * $ratio) ); } // calculate dimensions and coordinates for a resized image that fits within a specified width and height // if $crop is true, the largest matching central portion of the image will be cropped out and resized to the required size function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop=false) { - + if ($orig_w <= 0 || $orig_h <= 0) return false; // at least one of dest_w or dest_h must be specific if ($dest_w <= 0 && $dest_h <= 0) return false; - + if ( $crop ) { // crop the largest possible portion of the original image that we can size to $dest_w x $dest_h $aspect_ratio = $orig_w / $orig_h; @@ -135,7 +135,7 @@ function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop=false } $size_ratio = max($new_w / $orig_w, $new_h / $orig_h); - + $crop_w = ceil($new_w / $size_ratio); $crop_h = ceil($new_h / $size_ratio); @@ -146,13 +146,13 @@ function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop=false // don't crop, just resize using $dest_w x $dest_h as a maximum bounding box $crop_w = $orig_w; $crop_h = $orig_h; - + $s_x = 0; $s_y = 0; - + list( $new_w, $new_h ) = wp_constrain_dimensions( $orig_w, $orig_h, $dest_w, $dest_h ); } - + // if the resulting image would be the same size or larger we don't want to resize it if ($new_w >= $orig_w && $new_h >= $orig_h) return false; @@ -175,7 +175,7 @@ function image_resize( $file, $max_w, $max_h, $crop=false, $suffix=null, $dest_p if (!$dims) return $dims; list($dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) = $dims; - + $newimage = imagecreatetruecolor( $dst_w, $dst_h); // preserve PNG transparency diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 5db5739a7d..1b81a68080 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -650,7 +650,7 @@ function check_ajax_referer( $action = -1, $query_arg = false ) { else $nonce = $_REQUEST['_ajax_nonce'] ? $_REQUEST['_ajax_nonce'] : $_REQUEST['_wpnonce']; - if ( !wp_verify_nonce( $nonce, $action ) ) + if ( !wp_verify_nonce( $nonce, $action ) ) die('-1'); do_action('check_ajax_referer'); @@ -856,7 +856,7 @@ function wp_notify_moderator($comment_id) { $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'"); - switch ($comment->comment_type) + switch ($comment->comment_type) { case 'trackback': $notify_message = sprintf( __('A new trackback on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n"; @@ -882,11 +882,11 @@ function wp_notify_moderator($comment_id) { $notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n"; break; } - + $notify_message .= sprintf( __('Approve it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=mac&c=$comment_id" ) . "\r\n"; $notify_message .= sprintf( __('Delete it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&c=$comment_id" ) . "\r\n"; $notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id" ) . "\r\n"; - + $strCommentsPending = sprintf( __ngettext('%s comment', '%s comments', $comments_waiting), $comments_waiting ); $notify_message .= sprintf( __('Currently %s are waiting for approval. Please visit the moderation panel:'), $strCommentsPending ) . "\r\n"; $notify_message .= get_option('siteurl') . "/wp-admin/moderation.php\r\n"; diff --git a/wp-includes/post.php b/wp-includes/post.php index 9dfe13ba74..4db6d54e47 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1428,8 +1428,8 @@ function wp_publish_post($post_id) { /** * check_and_publish_future_post() - check to make sure post has correct status before * passing it on to be published. Invoked by cron 'publish_future_post' event - * This safeguard prevents cron from publishing drafts, etc. - * + * This safeguard prevents cron from publishing drafts, etc. + * * {@internal Missing Long Description}} * * @package WordPress @@ -1441,7 +1441,7 @@ function wp_publish_post($post_id) { * @return int|null {@internal Missing Description}} */ function check_and_publish_future_post($post_id) { - + $post = get_post($post_id); if ( empty($post) ) @@ -1450,7 +1450,7 @@ function check_and_publish_future_post($post_id) { if ( 'future' != $post->post_status ) return; - return wp_publish_post($post_id); + return wp_publish_post($post_id); } function wp_add_post_tags($post_id = 0, $tags = '') { @@ -2931,7 +2931,7 @@ function _get_post_ancestors(&$_post) { if ( !empty($_post->ancestors) ) return; - + $_post->ancestors = array(); if ( empty($_post->post_parent) || $_post->ID == $_post->post_parent ) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 4ba8064d5a..553b45fad6 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -32,13 +32,13 @@ class WP_Scripts { // Let a plugin replace the visual editor $visual_editor = apply_filters('visual_editor', array('tiny_mce')); $this->add( 'editor', false, $visual_editor, '20080218' ); - + $this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080221' ); - + // Modify this version when tinyMCE plugins are changed. $mce_version = apply_filters('tiny_mce_version', '20080226'); $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); - + $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6'); $this->add( 'wp-ajax-response', '/wp-includes/js/wp-ajax-response.js', array('jquery'), '20080229' . mt_rand() ); @@ -479,12 +479,12 @@ function wp_prototype_before_jquery( $js_array ) { return $js_array; } -// These localizations require information that may not be loaded even by init -function wp_just_in_time_script_localization() { - wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); +// These localizations require information that may not be loaded even by init +function wp_just_in_time_script_localization() { + wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); } -add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); +add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); ?> diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 1c29251df0..ac3282767e 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -262,7 +262,7 @@ function is_active_widget($callback, $widget_id = false) { if ( isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback ) if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] ) return $sidebar; - + return false; }