Changeset 3730615 for tutor/trunk/classes/Course.php
- Timestamp:
- 10/06/2026 11:07:46 AM (11 days ago)
- File:
-
- 1 edited
-
tutor/trunk/classes/Course.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tutor/trunk/classes/Course.php
r3718715 r3730615 1005 1005 tutor_utils()->check_nonce(); 1006 1006 1007 $this->check_access(); 1007 $course_id = intval( wp_unslash( $_POST['ID'] ?? 0 ) ); 1008 $this->check_access( $course_id ); // Check user cap for the given id before processing. 1008 1009 1009 1010 $params = Input::sanitize_array( … … 1690 1691 */ 1691 1692 public function get_wc_products() { 1693 tutor_utils()->checking_nonce(); 1694 1692 1695 $exclude = array(); 1693 1696 $exclude_linked_products = Input::has( 'exclude_linked_products' ); 1694 1697 $course_id = Input::post( 'course_id', 0, Input::TYPE_INT ); 1698 1699 $this->check_access( $course_id ); 1695 1700 1696 1701 if ( $exclude_linked_products ) { … … 1723 1728 public function get_wc_product() { 1724 1729 tutor_utils()->checking_nonce(); 1730 $course_id = Input::post( 'course_id', 0, Input::TYPE_INT ); 1731 $this->check_access( $course_id ); 1732 1725 1733 $product_id = Input::post( 'product_id' ); 1726 1734 $product = wc_get_product( $product_id ); 1727 $course_id = Input::post( 'course_id', 0, Input::TYPE_INT );1728 1735 1729 1736 $is_linked_with_course = tutor_utils()->product_belongs_with_course( $product_id ); … … 3643 3650 3644 3651 if ( ! empty( $content_parent ) ) { 3645 foreach ( $content_parent as $topic ) { 3646 $provided_topic_ids[] = $topic['parent_topic_id']; 3647 $provided_content_ids[] = $topic['content_id']; 3648 } 3652 $provided_topic_ids[] = $content_parent['parent_topic_id']; 3653 $provided_content_ids[] = $content_parent['content_id']; 3649 3654 } 3650 3655
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)