mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 02:58:57 -05:00
refactor: move clone_list function to Helpers.php
- Removed the clone_list function from Disk.page, Flash.page, and Share.page. - Added the clone_list function to Helpers.php for better organization and reusability.
This commit is contained in:
@@ -13,10 +13,6 @@ Type="xmenu"
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?
|
<?
|
||||||
function clone_list($disk) {
|
|
||||||
global $pools;
|
|
||||||
return strpos($disk['status'],'_NP')===false && ($disk['type']=='Data' || in_array($disk['name'],$pools));
|
|
||||||
}
|
|
||||||
if (count($pages)==2) $tabbed = false;
|
if (count($pages)==2) $tabbed = false;
|
||||||
$refs = []; $n = 0;
|
$refs = []; $n = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,6 @@ Type="xmenu"
|
|||||||
* all copies or substantial portions of the Software.
|
* all copies or substantial portions of the Software.
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?
|
|
||||||
function clone_list($disk) {
|
|
||||||
global $pools;
|
|
||||||
return strpos($disk['status'],'_NP')===false && ($disk['type']=='Data' || in_array($disk['name'],$pools));
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<script>
|
<script>
|
||||||
function toggleButton(button,id) {
|
function toggleButton(button,id) {
|
||||||
var disabled = true;
|
var disabled = true;
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ Type="xmenu"
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?
|
<?
|
||||||
function clone_list($disk) {
|
|
||||||
global $pools;
|
|
||||||
return strpos($disk['status'],'_NP')===false && ($disk['type']=='Data' || in_array($disk['name'],$pools));
|
|
||||||
}
|
|
||||||
if ($name) {
|
if ($name) {
|
||||||
$refs = []; $n = $i = 0;
|
$refs = []; $n = $i = 0;
|
||||||
// Natural sorting of share names
|
// Natural sorting of share names
|
||||||
|
|||||||
@@ -566,6 +566,9 @@ function comparePCIData() {
|
|||||||
return $changes;
|
return $changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clone_list($disk) {
|
||||||
|
global $pools;
|
||||||
|
return strpos($disk['status'],'_NP')===false && ($disk['type']=='Data' || in_array($disk['name'],$pools));
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user