From 3a98c3a457cf3cb98326c0b6fd76337461edb9af Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Tue, 3 Jun 2014 08:45:24 +0100 Subject: [PATCH] Couple of code tweaks and new repPosEnd Need to rtrim off the last comma and forgot to add table row start & end tags The end cut point is now githubLocalPaths, not previousFiles --- lib/plugins-manager.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/plugins-manager.php b/lib/plugins-manager.php index 8500a38..88aa98d 100644 --- a/lib/plugins-manager.php +++ b/lib/plugins-manager.php @@ -131,6 +131,8 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset } $settingsNew .= ' array("'.$_POST['name'.$i].'","'.$_POST['icon'.$i].'","'.$_POST['style'.$i].'","'.$_POST['URL'.$i].'","'.$_POST['target'.$i].'","'.$timer.'"),'; } + // Rtrim off the last comma + $settingsNew = rtrim($settingsNew,','); $settingsNew .= ' ),'.PHP_EOL; } @@ -139,7 +141,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset // Identify the bit to replace $repPosStart = strpos($settingsContents,'"plugins"'); - $repPosEnd = strpos($settingsContents,'"previousFiles"'); + $repPosEnd = strpos($settingsContents,'"githubLocalPaths"'); // Compile our new settings $settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents)); @@ -220,8 +222,10 @@ function deletePlugin($dir) { echo ''; echo ''; } + echo ''; echo ''; echo '
Update
'; + echo ''; ?> ">