Permalink
Browse files

Fixing backup encode and restore decode rule names.

  • Loading branch information...
1 parent bd09452 commit 8c554c278451c577636a88544c2817af51b38071 @johnkelsh johnkelsh committed Feb 7, 2011
@@ -67,21 +67,21 @@ static public function encode_content_links($content) {
// Link to the list of books
$search = "/(".$base."\/mod\/book\/index.php\?id\=)([0-9]+)/";
- $content = preg_replace($search, '$@bookINDEX*$2@$', $content);
+ $content = preg_replace($search, '$@BOOKINDEX*$2@$', $content);
// Link to book view by moduleid
$search = "/(".$base."\/mod\/book\/view.php\?id\=)([0-9]+)/";
- $content = preg_replace($search, '$@bookVIEWBYID*$2@$', $content);
+ $content = preg_replace($search, '$@BOOKVIEWBYID*$2@$', $content);
$search = "/(".$base."\/mod\/book\/view.php\?id\=)([0-9]+)&chapterid=([0-9]+)/";
- $content = preg_replace($search, '$@bookVIEWBYIDCH*$2*$3@$', $content);
+ $content = preg_replace($search, '$@BOOKVIEWBYIDCH*$2*$3@$', $content);
// Link to book view by bookid
$search = "/(".$base."\/mod\/book\/view.php\?b\=)([0-9]+)/";
- $content = preg_replace($search, '$@bookVIEWBYB*$2@$', $content);
+ $content = preg_replace($search, '$@BOOKVIEWBYB*$2@$', $content);
$search = "/(".$base."\/mod\/book\/view.php\?b\=)([0-9]+)&chapterid=([0-9]+)/";
- $content = preg_replace($search, '$@bookVIEWBYBCH*$2*$3@$', $content);
+ $content = preg_replace($search, '$@BOOKVIEWBYBCH*$2*$3@$', $content);
return $content;
}
@@ -78,15 +78,15 @@ static public function define_decode_rules() {
$rules = array();
// List of books in course
- $rules[] = new restore_decode_rule('bookINDEX', '/mod/book/index.php?id=$1', 'course');
+ $rules[] = new restore_decode_rule('BOOKINDEX', '/mod/book/index.php?id=$1', 'course');
// book by cm->id
- $rules[] = new restore_decode_rule('bookVIEWBYID', '/mod/book/view.php?id=$1', 'course_module');
- $rules[] = new restore_decode_rule('bookVIEWBYIDCH', '/mod/book/view.php?id=$1&chapterid=$2', array('course_module', 'book_chapter'));
+ $rules[] = new restore_decode_rule('BOOKVIEWBYID', '/mod/book/view.php?id=$1', 'course_module');
+ $rules[] = new restore_decode_rule('BOOKVIEWBYIDCH', '/mod/book/view.php?id=$1&chapterid=$2', array('course_module', 'book_chapter'));
// book by book->id
- $rules[] = new restore_decode_rule('bookVIEWBYB', '/mod/book/view.php?b=$1', 'book');
- $rules[] = new restore_decode_rule('bookVIEWBYBCH', '/mod/book/view.php?b=$1&chapterid=$2', array('book', 'book_chapter'));
+ $rules[] = new restore_decode_rule('BOOKVIEWBYB', '/mod/book/view.php?b=$1', 'book');
+ $rules[] = new restore_decode_rule('BOOKVIEWBYBCH', '/mod/book/view.php?b=$1&chapterid=$2', array('book', 'book_chapter'));
return $rules;
}

0 comments on commit 8c554c2

Please sign in to comment.