PluginProbe
ShiftController Employee Shift Scheduling / 4.9.85
ShiftController Employee Shift Scheduling v4.9.85
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
← All changes | sh4/app/query.php +1 -5 trunk4.9.85 View file →
@@ -76,15 +76,11 @@
76 76 global $wpdb;
77 77 $sql = 'SELECT post_id AS employee_id, meta_value AS user_id FROM ' . $wpdb->postmeta . ' wpostmeta' . ' JOIN ' . $wpdb->posts . ' wposts ON wposts.ID = wpostmeta.post_id WHERE wpostmeta.meta_key="user_id" AND wposts.post_type="sh4_employee"';
78 78 $res = $wpdb->get_results( $sql, ARRAY_A );
79 79 foreach( $res as $e ){
80 - if (!isset($e['user_id'])) {
81 - continue;
82 - }
83 80 if( ! $e['employee_id'] ) continue;
84 - if( ! $e['user_id'] ) continue;
85 81 $this->repoEmployeeUser[ $e['employee_id'] ] = $e['user_id'];
86 - $this->repoUserEmployee[ $e['user_id'] ?? '' ] = $e['employee_id'];
82 + $this->repoUserEmployee[ $e['user_id'] ] = $e['employee_id'];
87 83 }
88 84
89 85 if( $this->repoUserEmployee ){
90 86 $this->repoUser = $this->usersQuery->findManyById( array_keys($this->repoUserEmployee) );