diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-11-08 23:15:08 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-11-08 23:15:08 +0100 |
commit | 04924b7a9d090c0814cfff3e6706263e4d5a46e8 (patch) | |
tree | d83fc6b5683fbc9c639bfd1832f96dca2f3c8646 /lib/plugins/plugin/classes | |
parent | 1ea7a6bada66fc9b7a45f61b4892e4ea23196d89 (diff) | |
parent | a731ed1d6736ca405b3559adfd9500affcc59412 (diff) | |
download | rpg-04924b7a9d090c0814cfff3e6706263e4d5a46e8.tar.gz rpg-04924b7a9d090c0814cfff3e6706263e4d5a46e8.tar.bz2 |
Merge branch 'master' into proxyconnect
* master: (169 commits)
added PCRE UTF-8 checks to do=check FS#2636
avoid multiple paralell update checks
fix regression bug in HTTPClient FS#2621
changed PAGEUTILS_ID_HIDEPAGE to has BEFORE/AFTER
TarLib code cleanup
TarLib: fixed appending in non-dynamic mode
fixed third method of adding files in TarLib
fix lone zero block in TarLib created archives
fix use of constructor in TarLib
Slovak language update
Korean language update
Latvian language update
added event PAGEUTILS_ID_HIDEPAGE
added test for isHiddenPage()
removed redundant variables in tpl_include_page() (because of 3ff8773b)
added cut off points for mobile devices as parameters to style.ini
Corrected typo: ruke -> rule
Persian language update
Spanish language update
russian language update
...
Diffstat (limited to 'lib/plugins/plugin/classes')
-rw-r--r-- | lib/plugins/plugin/classes/ap_download.class.php | 3 | ||||
-rw-r--r-- | lib/plugins/plugin/classes/ap_enable.class.php | 4 | ||||
-rw-r--r-- | lib/plugins/plugin/classes/ap_manage.class.php | 13 |
3 files changed, 16 insertions, 4 deletions
diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php index 2d5ead400..d1b518d9d 100644 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ b/lib/plugins/plugin/classes/ap_download.class.php @@ -8,8 +8,9 @@ class ap_download extends ap_manage { */ function process() { global $lang; + global $INPUT; - $plugin_url = $_REQUEST['url']; + $plugin_url = $INPUT->str('url'); $this->download($plugin_url, $this->overwrite); return ''; } diff --git a/lib/plugins/plugin/classes/ap_enable.class.php b/lib/plugins/plugin/classes/ap_enable.class.php index 35450a907..a25c7ede8 100644 --- a/lib/plugins/plugin/classes/ap_enable.class.php +++ b/lib/plugins/plugin/classes/ap_enable.class.php @@ -6,9 +6,11 @@ class ap_enable extends ap_manage { function process() { global $plugin_protected; + global $INPUT; + $count_enabled = $count_disabled = 0; - $this->enabled = isset($_REQUEST['enabled']) ? $_REQUEST['enabled'] : array(); + $this->enabled = $INPUT->arr('enabled'); foreach ($this->manager->plugin_list as $plugin) { if (in_array($plugin, $plugin_protected)) continue; diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php index 12480e922..28579cbe9 100644 --- a/lib/plugins/plugin/classes/ap_manage.class.php +++ b/lib/plugins/plugin/classes/ap_manage.class.php @@ -141,9 +141,18 @@ class ap_manage { break; case 'update' : + $url = $data[0]; $date = date('r'); - if (!$fp = @fopen($file, 'a')) return; - fwrite($fp, "updated=$date\n"); + if (!$fp = @fopen($file, 'r+')) return; + $buffer = ""; + while (($line = fgets($fp)) !== false) { + $urlFound = strpos($line,"url"); + if($urlFound !== false) $line="url=$url\n"; + $buffer .= $line; + } + $buffer .= "updated=$date\n"; + fseek($fp, 0); + fwrite($fp, $buffer); fclose($fp); break; } |