Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-05-21 02:05:18 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-05-21 02:05:18 +0400
commit61980c2f47e6b58ed32d8050ed2ac3325c5001e0 (patch)
treee114ec86d5003d0dce7241a29cf33a92ea5394a3 /plugins/ExamplePlugin
parentcebe90f314bf9d8248affcb048b04d2db66c4a93 (diff)
- fixing bug in feedburner example plugin
Diffstat (limited to 'plugins/ExamplePlugin')
-rw-r--r--plugins/ExamplePlugin/ExamplePlugin.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ExamplePlugin/ExamplePlugin.php b/plugins/ExamplePlugin/ExamplePlugin.php
index e8ae236630..64e3a020d6 100644
--- a/plugins/ExamplePlugin/ExamplePlugin.php
+++ b/plugins/ExamplePlugin/ExamplePlugin.php
@@ -27,7 +27,7 @@ class Piwik_ExamplePlugin extends Piwik_Plugin
function install()
{
try{
- Piwik_Query('ALTER TABLE '.Piwik::prefixTable('site'). " ADD `feedburnerName` VARCHAR( 100 ) NOT NULL ;");
+ Piwik_Query('ALTER TABLE '.Piwik::prefixTable('site'). " ADD `feedburnerName` VARCHAR( 100 ) DEFAULT NULL");
} catch(Zend_Db_Statement_Exception $e){
// mysql code error 1060: column already exists
// if there is another error we throw the exception, otherwise it is OK as we are simply reinstalling the plugin
@@ -188,8 +188,9 @@ class Piwik_ExamplePlugin_Controller extends Piwik_Controller
// we save the value in the DB for an authenticated user
if(Piwik::getCurrentUserLogin() != 'anonymous')
{
- Piwik_Query('UPDATE '.Piwik::prefixTable('site').' SET feedburnerName = ?',
- Piwik_Common::getRequestVar('name','','string'));
+ Piwik_Query('UPDATE '.Piwik::prefixTable('site').' SET feedburnerName = ? WHERE idsite = ?',
+ array(Piwik_Common::getRequestVar('name','','string'), Piwik_Common::getRequestVar('idSite',1,'int'))
+ );
}
}
}