Changeset 1324223
- Timestamp:
- 01/08/2016 08:18:45 PM (10 years ago)
- Location:
- bu-section-editing/trunk
- Files:
-
- 7 edited
-
bin/install-wp-tests.sh (modified) (4 diffs)
-
bu-section-editing.php (modified) (3 diffs)
-
classes.groups.php (modified) (2 diffs)
-
languages/bu-section-editing.pot (modified) (1 diff)
-
package.json (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
tests/phpunit/test-roles-caps.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bu-section-editing/trunk/bin/install-wp-tests.sh
r1048312 r1324223 13 13 14 14 WP_TESTS_DIR=${WP_TESTS_DIR-/tmp/wordpress-tests-lib} 15 WP_CORE_DIR=/tmp/wordpress/ 15 WP_CORE_DIR=${WP_CORE_DIR-/tmp/wordpress/} 16 17 download() { 18 if [ `which curl` ]; then 19 curl -s "$1" > "$2"; 20 elif [ `which wget` ]; then 21 wget -nv -O "$2" "$1" 22 fi 23 } 24 25 if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]]; then 26 WP_TESTS_TAG="tags/$WP_VERSION" 27 else 28 # http serves a single offer, whereas https serves multiple. we only want one 29 download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json 30 grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json 31 LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//') 32 if [[ -z "$LATEST_VERSION" ]]; then 33 echo "Latest WordPress version could not be found" 34 exit 1 35 fi 36 WP_TESTS_TAG="tags/$LATEST_VERSION" 37 fi 16 38 17 39 set -ex 18 40 19 41 install_wp() { 42 43 if [ -d $WP_CORE_DIR ]; then 44 return; 45 fi 46 20 47 mkdir -p $WP_CORE_DIR 21 48 22 if [ $WP_VERSION == 'latest' ]; then 49 if [ $WP_VERSION == 'latest' ]; then 23 50 local ARCHIVE_NAME='latest' 24 51 else … … 26 53 fi 27 54 28 wget -nv -O /tmp/wordpress.tar.gz http://wordpress.org/${ARCHIVE_NAME}.tar.gz55 download https://wordpress.org/${ARCHIVE_NAME}.tar.gz /tmp/wordpress.tar.gz 29 56 tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR 30 57 31 wget -nv -O $WP_CORE_DIR/wp-content/db.php https://raw.github.com/markoheijnen/wp-mysqli/master/db.php58 download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php 32 59 } 33 60 … … 40 67 fi 41 68 42 # set up testing suite 43 mkdir -p $WP_TESTS_DIR 69 # set up testing suite if it doesn't yet exist 70 if [ ! -d $WP_TESTS_DIR ]; then 71 # set up testing suite 72 mkdir -p $WP_TESTS_DIR 73 svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes 74 fi 75 44 76 cd $WP_TESTS_DIR 45 svn co --quiet http://develop.svn.wordpress.org/trunk/tests/phpunit/includes/46 77 47 wget -nv -O wp-tests-config.php http://develop.svn.wordpress.org/trunk/wp-tests-config-sample.php 48 sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR':" wp-tests-config.php 49 sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" wp-tests-config.php 50 sed $ioption "s/yourusernamehere/$DB_USER/" wp-tests-config.php 51 sed $ioption "s/yourpasswordhere/$DB_PASS/" wp-tests-config.php 52 sed $ioption "s|localhost|${DB_HOST}|" wp-tests-config.php 78 if [ ! -f wp-tests-config.php ]; then 79 download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php 80 sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR':" "$WP_TESTS_DIR"/wp-tests-config.php 81 sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php 82 sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php 83 sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php 84 sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php 85 fi 86 53 87 } 54 88 … … 61 95 62 96 if ! [ -z $DB_HOSTNAME ] ; then 63 if [ [ "$DB_SOCK_OR_PORT" =~ ^[0-9]+$ ]]; then97 if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then 64 98 EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" 65 99 elif ! [ -z $DB_SOCK_OR_PORT ] ; then -
bu-section-editing/trunk/bu-section-editing.php
r1146694 r1324223 6 6 Author URI: http://sites.bu.edu/web/ 7 7 Description: Enhances WordPress content editing workflow by providing section editing groups and permissions 8 Version: 0.9. 48 Version: 0.9.5 9 9 Text Domain: bu-section-editing 10 10 Domain Path: /languages … … 33 33 @author Gregory Cornelius <gcorne@gmail.com> 34 34 @author Mike Burns <mgburns@bu.edu> 35 @author Andrew Bauer <awbauer@bu.edu> 35 36 */ 36 37 … … 53 54 public static $upgrader; 54 55 55 const BUSE_VERSION = '0.9. 4';56 const BUSE_VERSION = '0.9.5'; 56 57 const BUSE_VERSION_OPTION = '_buse_version'; 57 58 -
bu-section-editing/trunk/classes.groups.php
r682137 r1324223 295 295 * Get allowed post count, optionally filtered by user ID, group or post_type 296 296 * 297 * @todo implement cacheing with md5 of args 298 * @todo re-examine and optimize this query 297 * @todo implement caching with md5 of args 299 298 * @todo possibly move to BU_Group_Permissions 300 299 * … … 386 385 } 387 386 388 $count_query = sprintf( "SELECT DISTINCT( ID ) FROM %s, %s WHERE ID = post_ID AND ( meta_key = '%s' AND meta_value IN (%s) %s) %s",387 $count_query = sprintf( "SELECT ID FROM %s WHERE ( ID IN ( SELECT post_ID from %s WHERE meta_key = '%s' AND meta_value IN (%s) ) %s) %s", 389 388 $wpdb->posts, 390 389 $wpdb->postmeta, -
bu-section-editing/trunk/languages/bu-section-editing.pot
r1146694 r1324223 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: BU Section Editing 0.9. 4\n"5 "Project-Id-Version: BU Section Editing 0.9.5\n" 6 6 "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/bu-section-" 7 7 "editing\n" -
bu-section-editing/trunk/package.json
r1146694 r1324223 1 1 { 2 2 "name": "bu-section-editing", 3 "version": "0.9. 4",3 "version": "0.9.5", 4 4 "description": "Enhances WordPress content editing workflow by providing section editing groups and permissions", 5 5 "main": "bu-section-editing.php", -
bu-section-editing/trunk/readme.txt
r1146694 r1324223 3 3 Tags: permissions, section, access, acl, user management, custom roles, content editing, workflow, boston university, bu 4 4 Requires at least: 3.1 5 Tested up to: 4. 26 Stable tag: 0.9. 45 Tested up to: 4.4.1 6 Stable tag: 0.9.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 64 64 == Changelog == 65 65 66 = 0.9.5 = 67 * Fixed slow SQL affecting large sites 68 * Confirmed 4.4.1 compatibility 69 66 70 = 0.9.4 = 67 71 * Confirmed 4.2 compatibility -
bu-section-editing/trunk/tests/phpunit/test-roles-caps.php
r1048312 r1324223 16 16 $upgrader->populate_roles(); 17 17 18 $this->groups = array(); 18 $this->groups = array(); 19 $this->users = array(); 20 $this->posts = array(); 21 $this->pages = array(); 22 19 23 $pages = array( 20 24 'top-level1' => array( … … 72 76 $this->addUser('section_editor1'); 73 77 $this->addUser('section_editor2'); 78 74 79 $section_editor1 = get_user_by('login', 'section_editor1'); 75 80 $section_editor2 = get_user_by('login', 'section_editor2'); 81 76 82 $this->insertPosts($pages, 'page'); 77 83 $this->insertPosts($posts, 'post');
Note: See TracChangeset
for help on using the changeset viewer.