Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
noblogs-wp
Commits
b88eebb9
Commit
b88eebb9
authored
Nov 16, 2013
by
joe
Committed by
lucha
Dec 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support flexihasher with more replicas (allowing for a more even distribution)
parent
72567163
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
r2db/db-hash.php
r2db/db-hash.php
+2
-2
No files found.
r2db/db-hash.php
View file @
b88eebb9
<?php
require_once
(
dirname
(
__FILE__
)
.
'/flexihash.php'
);
require_once
(
ABSPATH
.
'wp-config.php'
);
$wpdb
->
hash_map
=
new
Flexihash
();
$wpdb
->
hash_map
=
new
Flexihash
(
null
,
R2DB_FLEXIHASH_REPLICAS
);
/* Hashing function to map blogs to databases.
*
...
...
@@ -16,4 +17,3 @@ function noblogs_db_callback($query, $wpdb) {
}
}
$wpdb
->
add_callback
(
'noblogs_db_callback'
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment