$propbag->add('description', PLUGIN_EVENT_STATISTICS_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Arnan de Gans, Garvin Hicking, Fredrik Sandberg');
- $propbag->add('version', '1.41');
+ $propbag->add('version', '1.42');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
)";
serendipity_db_schema_import($q);
+ //create indices
+ $q = "CREATE INDEX visitorses ON {$serendipity['dbPrefix']}visitors(sessID);";
+ serendipity_db_schema_import($q);
+ $q = "CREATE INDEX visitorday ON {$serendipity['dbPrefix']}visitors(day);";
+ serendipity_db_schema_import($q);
+ $q = "CREATE INDEX visitortime ON {$serendipity['dbPrefix']}visitors(time);";
+ serendipity_db_schema_import($q);
+ $q = "CREATE INDEX visitortime ON {$serendipity['dbPrefix']}visitors_count(year, month, day);";
+ serendipity_db_schema_import($q);
+
} //end of function createTables()
$serendipity['RSSfetchLimit'] = 15;
}
-if (!isset($serendipity['use_PEAR'])) {
- $serendipity['use_PEAR'] = false;
-}
-
if (!isset($serendipity['mediaProperties'])) {
$serendipity['mediaProperties'] = 'DPI;COPYRIGHT;TITLE;COMMENT1:MULTI;COMMENT2:MULTI';
}
+if (!isset($serendipity['use_PEAR'])) {
+ $serendipity['use_PEAR'] = true;
+}
+
// Should IFRAMEs be used for previewing entries and sending trackbacks?
$serendipity['use_iframe'] = true;
serendipity_die(sprintf(SERENDIPITY_NOT_INSTALLED, 'serendipity_admin.php'));
}
-// Check whether local or global PEAR should be used. You can put a
-// $serendipity['use_PEAR'] = true;
-// in your serendipity_config_local.inc.php file to enable this.
-// The required PEAR (and other) packages are mentioned in the file
-// bundled-libs/.current_version
-$old_include = @ini_get('include_path');
-if (@ini_set('include_path', $old_include . PATH_SEPARATOR . $serendipity['serendipityPath'] . PATH_SEPARATOR . $serendipity['serendipityPath'] . 'bundled-libs/') && $serendipity['use_PEAR']) {
- @define('S9Y_PEAR', true);
+/* Do the PEAR dance. If $serendipity['use_PEAR'] is set to FALSE, Serendipity will first put its own PEAR include path.
+ By default, a local PEAR will be used. */
+if (function_exists('get_include_path')) {
+ $old_include = @get_include_path('include_path');
+} else {
+ $old_include = @ini_get('include_path');
+}
+
+
+$new_include = ($serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '')
+ . S9Y_INCLUDE_PATH . 'bundled-libs/' . PATH_SEPARATOR
+ . S9Y_INCLUDE_PATH . 'bundled-libs/Smarty/libs/' . PATH_SEPARATOR
+ . $serendipity['serendipityPath'] . PATH_SEPARATOR
+ . (!$serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '');
+
+if (function_exists('set_include_path')) {
+ $use_include = @set_include_path($new_include);
+} else {
+ $use_include = @ini_set('include_path', $new_include);
+}
+
+if ($use_include) {
+ @define('S9Y_PEAR', true);
@define('S9Y_PEAR_PATH', '');
} else {
@define('S9Y_PEAR', false);
@define('S9Y_PEAR_PATH', S9Y_INCLUDE_PATH . 'bundled-libs/');
}
+/* PEAR path setup inclusion finished */
if (defined('IN_installer') && IS_installed === false) {
$serendipity['lang'] = $serendipity['autolang'];