PluginProbe
CSS & JavaScript Toolbox / 6.0.9
CSS & JavaScript Toolbox v6.0.9
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 | models/block.php +7 -13 6.06.0.9 View file →
@@ -142,11 +142,11 @@
142 142 * put your comment there...
143 143 *
144 144 * @deprecated Use calculatePinpoint
145 145 */
146 - public static function calculateBlockPinPoint(&$block) {
146 + public static function calculateBlockPinPoint(& $block) {
147 147 // Generate PinPoint Value.
148 - if (is_array($block->pinPoint)) {
148 + if (isset($block->pinPoint) && is_array($block->pinPoint)) {
149 149 $pinPoint = 0;
150 150 // Each item is a bit flag.
151 151 foreach ($block->pinPoint as $pin) {
152 152 $pinPoint |= hexdec($pin);
@@ -152,9 +152,12 @@
152 152 $pinPoint |= hexdec($pin);
153 153 }
154 154 }
155 155 else {
156 - // If provided as integer.
156 + // Provided as integer or not even provided!
157 + if (!isset($block->pinPoint)) {
158 + $block->pinPoint = 0;
159 + }
157 160 $pinPoint = (int) $block->pinPoint;
158 161 }
159 162 // Pin should be set only for not empty properties.
160 163 // This help us retreiving only needed blocks when outputing blocks code.
@@ -185,15 +188,6 @@
185 188 $pinPoint = self::calculateBlockPinPoint($block)->pinPoint;
186 189 // Return only pinPoint.
187 190 return $pinPoint;
188 191 }
189 -
190 - /**
191 - * put your comment there...
192 - *
193 - * @param mixed $values
194 - */
195 - public static function getInstance($values) {
196 - return new CJTBlockModel($values);
197 - }
198 -
192 +
199 193 } // End class.