Last active
January 21, 2016 08:47
-
-
Save azhurb/f546ef281fd60e951a5b to your computer and use it in GitHub Desktop.
Mac filter for autoupdate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: server/lib/stb.class.php | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- server/lib/stb.class.php (revision 7c6db5d3d7d2910c23015418fb96c239aa1b9b09) | |
| +++ server/lib/stb.class.php (revision ) | |
| @@ -683,7 +683,13 @@ | |
| $auto_update_setting = ImageAutoUpdate::getSettingByStbType($this->params['stb_type']); | |
| - if ($auto_update_setting){ | |
| + if (file_exists(PROJECT_PATH.'/macs.txt')){ | |
| + $macs = file(PROJECT_PATH.'/macs.txt', FILE_IGNORE_NEW_LINES); | |
| + $macs = array_flip($macs); | |
| + } | |
| + | |
| + if ($auto_update_setting && isset($macs) && isset($macs[$this->mac])){ | |
| $profile['autoupdate'] = $auto_update_setting; | |
| } | |
| \ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment