plugin: orphaned hooks weren't deleted.

update: fixing update job for tags.
This commit is contained in:
Michael Vogel 2013-02-17 18:05:30 +01:00
parent 1a1984c78d
commit 7e154d5e4c
3 changed files with 12 additions and 3 deletions

View File

@ -14,7 +14,7 @@ require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.1.1612' ); define ( 'FRIENDICA_VERSION', '3.1.1612' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1161 ); define ( 'DB_UPDATE_VERSION', 1162 );
define ( 'EOL', "<br />\r\n" ); define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View File

@ -175,7 +175,7 @@ function call_hooks($name, &$data = null) {
} }
else { else {
// remove orphan hooks // remove orphan hooks
q("delete from hook where hook = '%s' and file = '$s' and function = '%s' limit 1", q("delete from hook where hook = '%s' and file = '%s' and function = '%s' limit 1",
dbesc($name), dbesc($name),
dbesc($hook[0]), dbesc($hook[0]),
dbesc($hook[1]) dbesc($hook[1])

View File

@ -1,6 +1,6 @@
<?php <?php
define( 'UPDATE_VERSION' , 1159 ); define( 'UPDATE_VERSION' , 1162 );
/** /**
* *
@ -1430,3 +1430,12 @@ function update_1160() {
return UPDATE_SUCCESS; return UPDATE_SUCCESS;
} }
function update_1161() {
$r = q("ALTER TABLE `pconfig` ADD INDEX (`cat`)");
if(!$r)
return UPDATE_FAILED;
return UPDATE_SUCCESS;
}