PluginProbe
CSS & JavaScript Toolbox / 11
CSS & JavaScript Toolbox v11
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | controllers/block.php +25 -25 11.811 View file →
@@ -76,37 +76,37 @@
76 76 // Output code.
77 77 $this->response = $codeFile->code;
78 78 }
79 79
80 -
80 +
81 81 /**
82 82 * put your comment there...
83 - *
83 + *
84 84 */
85 85 public function getAllAssignmentAction() {
86 -
87 - $blockId = isset($_GET['blockId']) ? esc_html($_GET['blockId']) : null;
88 -
86 +
87 + $blockId = isset($_GET['blockId']) ? $_GET['blockId'] : null;
88 +
89 89 try {
90 -
90 +
91 91 if (!$blockId) {
92 -
92 +
93 93 throw new Exception('Invalid Request parameters');
94 94 }
95 -
95 +
96 96 $blocks = new CJTBlocksModel();
97 -
97 +
98 98 $block = $blocks->getBlock($blockId);
99 -
99 +
100 100 $this->response = count(CJTBlocksModel::getAllAssignments($block));
101 101 }
102 102 catch (Exception $exception) {
103 103
104 -
104 +
105 105 }
106 -
106 +
107 107 }
108 -
108 +
109 109 /**
110 110 * Query single block based on the provided criteria!
111 111 *
112 112 */
@@ -121,32 +121,32 @@
121 121 }
122 122
123 123 /**
124 124 * put your comment there...
125 - *
125 + *
126 126 */
127 127 protected function getCodeFilesCountAction() {
128 -
129 -
130 - $blockId = isset($_GET['blockId']) ? esc_html($_GET['blockId']) : null;
131 -
128 +
129 +
130 + $blockId = isset($_GET['blockId']) ? $_GET['blockId'] : null;
131 +
132 132 try {
133 -
133 +
134 134 if (!$blockId) {
135 -
135 +
136 136 throw new Exception('Invalid Request parameters');
137 137 }
138 -
138 +
139 139 $this->response = count(CJTBlocksModel::getCodeFilesCount($blockId));
140 140 }
141 141 catch (Exception $exception) {
142 142
143 -
143 +
144 144 }
145 -
146 -
145 +
146 +
147 147 }
148 -
148 +
149 149 /**
150 150 * Get assigment panel objects page.
151 151 *
152 152 */