inc/filters.php svneol=native#text/plain
inc/fix_filters.php svneol=native#text/plain
inc/fix_menu.php svneol=native#text/plain
+inc/fix_refsystem.php svneol=native#text/plain
inc/fix_user_points.php svneol=native#text/plain
inc/footer.php svneol=native#text/plain
inc/functions.php svneol=native#text/plain
inc/modules/admin/what-repair_gmnu.php svneol=native#text/plain
inc/modules/admin/what-repair_lang.php svneol=native#text/plain
inc/modules/admin/what-repair_mmnu.php svneol=native#text/plain
+inc/modules/admin/what-repair_refs.php svneol=native#text/plain
inc/modules/admin/what-send_bonus.php svneol=native#text/plain
inc/modules/admin/what-send_coupon.php svneol=native#text/plain
inc/modules/admin/what-send_newsletter.php svneol=native#text/plain
./inc/autopurge/purge-tsks.php:2:// @DEPRECATED
./inc/autopurge/purge-unconfirmed.php:2:// @DEPRECATED
./inc/daily/daily_engine.php:2:// @DEPRECATED
+./inc/gen_refback.php:2:// @DEPRECATED
./inc/loader/load_cache-admin.php:2:// @DEPRECATED
./inc/loader/load_cache-config.php:2:// @DEPRECATED
./inc/loader/load_cache-extension.php:2:// @DEPRECATED
addMemberMenuSql('main', 'refback', 'Ref-Back einstellen', 4);
// Execute this special file on registration
- addIncludeToPool('extension', 'inc/gen_refback.php');
+ addIncludeToPool('extension', 'inc/fix_refsystem.php');
break;
case 'remove': // Do stuff when removing extension
} // END - if
// Version number
-setThisExtensionVersion('0.1.7');
+setThisExtensionVersion('0.1.8');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7'));
+setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.8'));
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running
case '0.1.7': // SQL queries for v0.1.7
addAdminMenuSql('repair','repair_lang','Sprachsystem', 'Findet nicht übersetzte Sprachelemente in allen Scripten. Dies kann eventuell sehr lange dauern. Haben Sie bitte solange Geduld.',5);
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Sprachdateien sind nun auch "reparierbar" - nicht durch das Script, das findet nur die nicht übersetzten Zeichenketten, sondern durch den Menschen.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ addAdminMenuSql('repair','repair_refs','Referal-Tabelle', 'Setzt die Referal-Tabelle <strong>{?_MYSQL_PREFIX?}_user_refs</strong> zurück und baut diese neu auf. Dies sollten Sie nur tun, falls Ihre Mitglieder Ihnen Probleme mit Referals melden.',6);
+
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Sprachdateien sind nun auch "reparierbar" - nicht durch das Script, das findet nur die nicht übersetzten Zeichenketten, sondern durch den Menschen.");
break;
setExtensionUpdateNotes("Neues Tabellenlayout und verschoben von ext-refback.");
// Load ext-refback's special include to regenerate the referal table
- addIncludeToPool('extension', 'inc/gen_refback.php');
+ addIncludeToPool('extension', 'inc/fix_refsystem.php');
break;
} // END - switch
break;
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 07/13/2011 *
+ * =================== Last change: 07/13/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : fix_refsystem.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Generate refback table including all refs *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Refback-Tabelle mit allen Refs generieren *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Sanity-check: Do we have ref level 0?
+$result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0 OR `level` IS NULL', __FILE__, __LINE__);
+if (!SQL_HASZERONUMS($result)) {
+ // Remove index temporaly
+ SQL_ALTER_TABLE('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid_level`', __FILE__, __LINE__);
+
+ // Upgrade refsystem, ref-level 0 is silly here
+ SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `level`=`level`+1', __FILE__, __LINE__);
+
+ // Add it again
+ SQL_ALTER_TABLE('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` ( `userid`, `level` )', __FILE__, __LINE__);
+
+ // Rebuild cache
+ rebuildCache('refsystem', 'refsystem');
+} // END - if
+
+// Free result
+SQL_FREERESULT($result);
+
+// Reset the table
+SQL_QUERY('TRUNCATE TABLE `{?_MYSQL_PREFIX?}_user_refs`', __FILE__, __LINE__);
+
+// Begin with all users in level one
+$result_direct = SQL_QUERY('SELECT
+ `userid`
+FROM
+ `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+ `refid`=0 OR `refid` IS NULL
+ORDER BY
+ `userid` ASC', __FILE__, __LINE__);
+
+// Do we have entries?
+if (!SQL_HASZERONUMS($result_direct)) {
+ // When 'walk' through all users
+ while ($content = SQL_FETCHARRAY($result_direct)) {
+ // Update refback table
+ //* DEBUG: */ debugOutput('userid=' . $content['userid']);
+ updateReferalTable($content['userid']);
+ } // END - while
+} // END - if
+
+// Free result
+SQL_FREERESULT($result_direct);
+
+// [EOF]
+?>
<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL Start: 09/27/2008 *
- * =================== Last change: 09/27/2008 *
- * *
- * -------------------------------------------------------------------- *
- * File : gen_refback.php *
- * -------------------------------------------------------------------- *
- * Short description : Generate refback table including all refs *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Refback-Tabelle mit allen Refs generieren *
- * -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the Free Software *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
- * MA 02110-1301 USA *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
- die();
-} // END - if
-
-// Sanity-check: Do we have ref level 0?
-$result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0 OR `level` IS NULL', __FILE__, __LINE__);
-if (!SQL_HASZERONUMS($result)) {
- // Remove index temporaly
- SQL_ALTER_TABLE('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid_level`', __FILE__, __LINE__);
-
- // Upgrade refsystem, ref-level 0 is silly here
- SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `level`=`level`+1', __FILE__, __LINE__);
-
- // Add it again
- SQL_ALTER_TABLE('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` ( `userid`, `level` )', __FILE__, __LINE__);
-
- // Rebuild cache
- rebuildCache('refsystem', 'refsystem');
-} // END - if
-
-// Free result
-SQL_FREERESULT($result);
-
-// Reset the table
-SQL_QUERY('TRUNCATE TABLE `{?_MYSQL_PREFIX?}_user_refs`', __FILE__, __LINE__);
-
-// Begin with all users in level one
-$result_direct = SQL_QUERY('SELECT
- `userid`
-FROM
- `{?_MYSQL_PREFIX?}_user_data`
-WHERE
- `refid`=0
-ORDER BY
- `userid` ASC', __FILE__, __LINE__);
-
-// Do we have entries?
-if (!SQL_HASZERONUMS($result_direct)) {
- // When 'walk' through all users
- while ($content = SQL_FETCHARRAY($result_direct)) {
- // Update refback table
- //* DEBUG: */ debugOutput('userid=' . $content['userid']);
- updateReferalTable($content['userid']);
- } // END - while
-} // END - if
-
-// Free result
-SQL_FREERESULT($result_direct);
-
-// [EOF]
+// @DEPRECATED
?>
'ADMIN_REPAIR_NOTHING_FIXED' => "Es wurden keine Einträge repariert.",
'ADMIN_REPAIR_LANGUAGE_TO_MUCH' => "Es sind mehr als 100 nicht existierende Elemente in der Zielsprachdatei gefunden worden.",
'ADMIN_REPAIR_LANGUAGE_TITLE' => "Analyse an den Sprachdateien",
+ 'ADMIN_REPAIR_REFERAL_SYSTEM_DONE' => "Das Referal-System wurde zurückgesetzt und neu aufgebaut.",
));
// [EOF]
if ((isExtensionInstalledAndNewer('sql_patches', '0.3.4')) && (isExtensionActive('user'))) {
// Check for accounts without referal
- addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 ORDER BY `userid` ASC");
+ addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 OR `refid` IS NULL ORDER BY `userid` ASC");
$DESCRs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NOREF--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NOREFERAL_TITLE--}';
$WHATs[] = 'list_user&mode=norefs';
case 'norefs': // Users w/o refs
if (!empty($whereStatement)) {
// Add AND statement
- $whereStatement .= " AND `refid`=0";
+ $whereStatement .= ' AND (`refid`=0 OR `refid` IS NULL)';
} else {
// Add WHERE statement
- $whereStatement = " WHERE `refid`=0";
+ $whereStatement = ' WHERE (`refid`=0 OR `refid` IS NULL)';
}
break;
case 'random_refid': // Users available for random referal id
if (!empty($whereStatement)) {
// Add AND statement
- $whereStatement .= " AND `rand_confirmed` >= {?user_min_confirmed?}";
+ $whereStatement .= ' AND `rand_confirmed` >= {?user_min_confirmed?}';
} else {
// Add WHERE statement
- $whereStatement = " WHERE `rand_confirmed` >= {?user_min_confirmed?}";
+ $whereStatement = ' WHERE `rand_confirmed` >= {?user_min_confirmed?}';
}
break;
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 07/13/2011 *
+ * =================== Last change: 07/13/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-repair_refs.php *
+ * -------------------------------------------------------------------- *
+ * Short description : "Repairs" the referal system *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : "Repariert" das Referal-System *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+ die();
+} // END - if
+
+// Add description as navigation point
+addYouAreHereLink('admin', __FILE__);
+
+// Just include fix_refsystem.php again
+loadIncludeOnce('inc/fix_refsystem.php');
+
+// Output message
+displayMessage('{--ADMIN_REPAIR_REFERAL_SYSTEM_DONE--}');
+
+// [EOF]
+?>