diff --git a/.travis.yml b/.travis.yml index b7a6449acbf..ad22e0efbaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,7 +115,10 @@ after_script: - ./tests/travis/upload_artifacts.sh notifications: - slack: piwik:3HWhNh21qPfDACQXTrJOb0mW + slack: + rooms: + - piwik:3HWhNh21qPfDACQXTrJOb0mW + - piwikpro:7OABSbDrywSTo2nv9lD2svXG irc: skip_join: true diff --git a/LEGALNOTICE b/LEGALNOTICE index 14ee74c5534..f6ad6267c96 100644 --- a/LEGALNOTICE +++ b/LEGALNOTICE @@ -1,6 +1,6 @@ COPYRIGHT - Piwik - Open Source Web Analytics + Piwik - free/libre analytics platform The software package is: @@ -77,40 +77,40 @@ THIRD-PARTY COMPONENTS AND LIBRARIES Name: jqPlot Link: http://www.jqplot.com/ - License: Dual-licensed: MIT or GPL v2 + License: Dual-licensed: MIT (Expat) or GPL v2 Name: jQuery Link: http://jquery.com/ - License: Dual-licensed: MIT or GPL + License: Dual-licensed: MIT (Expat) or GPL Notes: - GPL version not explicitly stated in source but GPL v2 is in git - - includes Sizzle.js - multi-licensed: MIT, New BSD, or GPL [v2] + - includes Sizzle.js - multi-licensed: MIT (Expat), New BSD, or GPL [v2] Name: jQuery UI Link: http://jqueryui.com/ - License: Dual-licensed: MIT or GPL + License: Dual-licensed: MIT (Expat) or GPL Notes: - GPL version not explicitly stated in source but GPL v2 is in git Name: jquery.history Link: http://tkyk.github.com/jquery-history-plugin/ - License: MIT + License: MIT (Expat) Name: jquery.scrollTo Link: http://plugins.jquery.com/project/ScrollTo - License: Dual licensed: MIT or GPL + License: Dual licensed: MIT (Expat) or GPL Name: jquery Tooltip Link: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ - License: Dual licensed: MIT or GPL + License: Dual licensed: MIT (Expat) or GPL Name: jquery placeholder Link: http://mths.be/placeholder - License: Dual licensed: MIT or GPL + License: Dual licensed: MIT (Expat) or GPL Name: jquery smartbanner Link: https://github.com/jasny/jquery.smartbanner - License: Dual licensed: MIT + License: Dual licensed: MIT (Expat) Name: json2.js Link: http://json.org/ @@ -206,19 +206,19 @@ THIRD-PARTY COMPONENTS AND LIBRARIES Name: Raphaël - JavaScript Vector Library Link: http://raphaeljs.com/ - License: MIT + License: MIT (Expat) Name: lessphp Link: http://leafo.net/lessphp - License: GPL3/MIT + License: GPL3, MIT (Expat) Name: Symfony Console Component Link: https://github.com/symfony/Console - License: MIT + License: MIT (Expat) Name: AngularJS Link: https://github.com/angular/angular.js - License: MIT + License: MIT (Expat) Name: Mousetrap Link: https://github.com/ccampbell/mousetrap @@ -267,7 +267,6 @@ THIRD-PARTY CONTENT Notes: - the "New BSD" license refers to either the "Modified BSD" and "Simplified BSD" licenses (2- or 3-clause), which are GPL compatible. -- the "MIT" license is also referred to as the "X11" license - icons for browsers, operating systems, browser plugins, search engines, and and flags of countries are nominative use of third-party trademarks when referring to the corresponding product or entity diff --git a/README.md b/README.md index a377eab0298..b6268294986 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Piwik - piwik.org -## We’re seeking a talented open source Software Engineer! +## We’re seeking a talented Software Engineer -Are you looking for a new challenge? We are currently seeking a software engineer or software developer who is passionate about data processing, security, privacy, the open source philosophy and usable interface design. +Are you looking for a new challenge? We are currently seeking a software engineer or software developer who is passionate about data processing, security, privacy, the open source and free/libre philosophy and usable interface design. [View Job Description](http://piwik.org/blog/2014/05/piwik-expanding-seeking-talented-software-engineer-new-zealand-poland/) - [Apply online](http://piwik.org/jobs/) @@ -10,13 +10,13 @@ We are grateful if you can share the Job Description with your friends and colle ## Description -Piwik is the leading Free/Libre open source Web Analytics platform. +Piwik is the leading Free/Libre open analytics platform. Piwik is a full featured PHP MySQL software program that you download and install on your own webserver. At the end of the five minute installation process you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real time. -Piwik aims to be a Free software alternative to Google Analytics, and is already used on more than 1,000,000 websites. +Piwik aims to be a Free software alternative to Google Analytics, and is already used on more than 1,000,000 websites. Privacy is built-in! ## Mission Statement diff --git a/composer.json b/composer.json index 3015cb736b5..4347967b196 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "piwik/piwik", "type": "application", - "description": "Open Source Real Time Web Analytics Platform", + "description": "the leading free/libre analytics platform", "keywords": ["piwik","web","analytics"], "homepage": "http://piwik.org", "license": "GPL-3.0+", diff --git a/config/global.ini.php b/config/global.ini.php index cb5017b642f..b5b21294bcb 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -375,7 +375,7 @@ ; The release server is an essential part of the Piwik infrastructure/ecosystem ; to provide the latest software version. -latest_version_url = http://builds.piwik.org/latest.zip +latest_version_url = http://builds.piwik.org/piwik-latest.zip ; The API server is an essential part of the Piwik infrastructure/ecosystem to ; provide services to Piwik installations, e.g., getLatestVersion and @@ -609,6 +609,7 @@ Plugins[] = MultiSites Plugins[] = Referrers Plugins[] = UserSettings +Plugins[] = DevicesDetection Plugins[] = Goals Plugins[] = SEO Plugins[] = Events diff --git a/core/API/DataTableGenericFilter.php b/core/API/DataTableGenericFilter.php index 0fe56c57d01..6db2f2b4763 100644 --- a/core/API/DataTableGenericFilter.php +++ b/core/API/DataTableGenericFilter.php @@ -1,6 +1,6 @@ configCache['PluginsInstalled'] = array('PluginsInstalled' => array()); - - // DevicesDetection plugin is not yet enabled by default - if (isset($configGlobal['Plugins'])) { - $this->configCache['Plugins'] = $this->configGlobal['Plugins']; - $this->configCache['Plugins']['Plugins'][] = 'DevicesDetection'; - } - if (isset($configGlobal['Plugins_Tracker'])) { - $this->configCache['Plugins_Tracker'] = $this->configGlobal['Plugins_Tracker']; - $this->configCache['Plugins_Tracker']['Plugins_Tracker'][] = 'DevicesDetection'; - } } /** diff --git a/core/Console.php b/core/Console.php index 7cf657e6831..a33a72d3b94 100644 --- a/core/Console.php +++ b/core/Console.php @@ -1,6 +1,6 @@ getMessage() . "\n" . $e->getTraceAsString()); - $loadingError = array('message' => $e->getMessage()); + $message = $e->getMessage(); + if (\Piwik_ShouldPrintBackTraceWithMessage()) { + $message .= "\n" . $e->getTraceAsString(); + } + + $loadingError = array('message' => $message); } $view = new View("@CoreHome/_dataTable"); diff --git a/core/Plugin/Widgets.php b/core/Plugin/Widgets.php new file mode 100644 index 00000000000..c2ea16f7cfd --- /dev/null +++ b/core/Plugin/Widgets.php @@ -0,0 +1,29 @@ +rendering .= $reportView->render(); } + + public function getAttachments($report, $processedReports, $prettyDate) + { + $additionalFiles = array(); + + foreach ($processedReports as $processedReport) { + if ($processedReport['displayGraph']) { + + $additionalFiles[] = $this->getAttachment($report, $processedReport, $prettyDate); + } + } + + return $additionalFiles; + } + + protected function getAttachment($report, $processedReport, $prettyDate) + { + $additionalFile = array(); + + $segment = \Piwik\Plugins\ScheduledReports\API::getSegment($report['idsegment']); + + $segmentName = $segment != null ? sprintf(' (%s)', $segment['name']) : ''; + + $processedReportMetadata = $processedReport['metadata']; + + $additionalFile['filename'] = + sprintf( + '%s - %s - %s %d - %s %d%s.png', + $processedReportMetadata['name'], + $prettyDate, + Piwik::translate('General_Website'), + $report['idsite'], + Piwik::translate('General_Report'), + $report['idreport'], + $segmentName + ); + + $additionalFile['cid'] = $processedReportMetadata['uniqueId']; + + $additionalFile['content'] = + ReportRenderer::getStaticGraph( + $processedReportMetadata, + Html::IMAGE_GRAPH_WIDTH, + Html::IMAGE_GRAPH_HEIGHT, + $processedReport['evolutionGraph'], + $segment + ); + + $additionalFile['mimeType'] = 'image/png'; + + $additionalFile['encoding'] = \Zend_Mime::ENCODING_BASE64; + + return $additionalFile; + } } diff --git a/core/ReportRenderer/Pdf.php b/core/ReportRenderer/Pdf.php index 66f47df27bf..47c2ebf9005 100644 --- a/core/ReportRenderer/Pdf.php +++ b/core/ReportRenderer/Pdf.php @@ -1,6 +1,6 @@ TCPDF->Write("1em", $message); $this->TCPDF->Ln(); } + + /** + * Get report attachments, ex. graph images + * + * @param $report + * @param $processedReports + * @param $prettyDate + * @return array + */ + public function getAttachments($report, $processedReports, $prettyDate) + { + return array(); + } } diff --git a/core/ScheduledTask.php b/core/ScheduledTask.php index de1d582b7bd..18cb2aa94e2 100644 --- a/core/ScheduledTask.php +++ b/core/ScheduledTask.php @@ -1,6 +1,6 @@ Piwik page"); - echo "Piwik is a free open source web analytics that lets you keep control of your data."; + echo "Piwik is a free/libre web analytics that lets you keep control of your data."; break; case self::STATE_NOSCRIPT_REQUEST: diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php index 63a93c1ec38..625bd9e4edb 100644 --- a/core/Tracker/Action.php +++ b/core/Tracker/Action.php @@ -1,6 +1,6 @@ activatePlugin('DevicesDetection'); + } catch(\Exception $e) { + } + } +} diff --git a/core/Url.php b/core/Url.php index d9fa0bf55f2..5ad0aa5acf6 100644 --- a/core/Url.php +++ b/core/Url.php @@ -1,6 +1,6 @@ findComponents('Widgets', 'Piwik\\Plugin\\Widgets'); + $widgetsList = self::getInstance(); + + foreach ($widgets as $widget) { + $widget->configure($widgetsList); + } } } @@ -145,6 +146,11 @@ static public function add($widgetCategory, $widgetName, $controllerName, $contr } $widgetUniqueId .= $name . $value; } + + if (!array_key_exists($widgetCategory, self::$widgets)) { + self::$widgets[$widgetCategory] = array(); + } + self::$widgets[$widgetCategory][] = array( 'name' => $widgetName, 'uniqueId' => $widgetUniqueId, @@ -209,7 +215,7 @@ static public function isDefined($controllerName, $controllerAction) */ public static function _reset() { - self::$widgets = null; + self::$widgets = array(); self::$hookCalled = false; } } diff --git a/core/dispatch.php b/core/dispatch.php index 6d6b55a2082..f18b73f0bde 100644 --- a/core/dispatch.php +++ b/core/dispatch.php @@ -1,6 +1,6 @@
Then reload this page to access your analytics reports." . "\n\n

Note: if for some reasons you cannot install composer, instead install the latest Piwik release from ". - "builds.piwik.org.

"; + "builds.piwik.org.

"; } } diff --git a/index.php b/index.php index e7eaf1a9fd1..cc6780eb9bb 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,6 @@ Piwik is an open source web analytics software that makes it easy to get the information you want from your visitors.<\/p>

This process is split up into %s easy steps and will take around 5 minutes.<\/p>", + "WelcomeHelp": "

Piwik is a free/libre web analytics software that makes it easy to get the information you want from your visitors.<\/p>

This process is split up into %s easy steps and will take around 5 minutes.<\/p>", "WelcomeToCommunity": "Welcome to the Piwik community!" }, "LanguagesManager": { diff --git a/libs/PiwikTracker/PiwikTracker.php b/libs/PiwikTracker/PiwikTracker.php index f6bfe1da1f5..3afc2db93a2 100644 --- a/libs/PiwikTracker/PiwikTracker.php +++ b/libs/PiwikTracker/PiwikTracker.php @@ -1,6 +1,6 @@ 0 if not success: fatal_error( - "couldn't open the configuration file, " - "required to get the authentication token" + "the configuration file" + self.options.config_file + " could not be read. Please check permission. This file must be readable to get the authentication token" ) updatetokenfile = os.path.abspath( @@ -1365,15 +1364,15 @@ def invalidate_reports(): else: dates = [date.strftime('%Y-%m-%d') for date in stats.dates_recorded] if dates: - print 'Purging Piwik archives for dates: ' + ' '.join(dates) + print '\nPurging Piwik archives for dates: ' + ' '.join(dates) result = piwik.call_api( 'CoreAdminHome.invalidateArchivedReports', dates=','.join(dates), idSites=','.join(str(site_id) for site_id in stats.piwik_sites), ) - print('To re-process these reports with your new update data, execute the following command: \n ' - '`piwik/console core:archive --url=http://example/piwik/`\n' - 'Reference: http://piwik.org/docs/setup-auto-archiving/ ') + print('\nTo re-process these reports with your newly imported data, execute the following command: \n' + '$ /path/to/piwik/console core:archive --url=http://example/piwik/\n' + '\nReference: http://piwik.org/docs/setup-auto-archiving/ ') class Hit(object): diff --git a/misc/others/cli-script-bootstrap.php b/misc/others/cli-script-bootstrap.php index da0d3fbf72b..a5c200f30cd 100644 --- a/misc/others/cli-script-bootstrap.php +++ b/misc/others/cli-script-bootstrap.php @@ -1,6 +1,6 @@ -# based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001 - -set -e - -TMP_DIR="/tmp" -THIS_DIR=`pwd` -SCRIPT_PATH=`readlink -f $0` -SCRIPT_DIR=`dirname ${SCRIPT_PATH}` - -JSON_GREP="python $SCRIPT_DIR/jsongrep.py" - -PKG_BUILD_PROGRAM=`basename $0` -#PKG_BUILD_PROGRAM="apkg-build" -PKG_BUILD_VER="1.0" -PKG_BUILD_FORMAT="zip" # ar, tar, zip - -PKG_CONTROL_DIR="CONTROL" -PKG_WEBMAN_DIR="webman" -PKG_WEB_DIR="www" - -PKG_WEB_USER="admin" -PKG_WEB_GROUP="administrators" - -PKG_WEB_USER_ID=999 -PKG_WEB_GROUP_ID=999 - -PKG_WEB_PERM=770 - -PKG_DIR_PERM=755 -PKG_FILE_PERM=644 - -PKG_VERSION_FILE="apkg-version" -PKG_DATA_FILE="data.tar.gz" -PKG_CONTROL_FILE="control.tar.gz" - -PKG_CONFIG_FILE="config.json" -PKG_ICON_ENABLE_FILE="icon-enable.png" -PKG_ICON_DISABLE_FILE="icon-disable.png" - -PKG_PRE_INSTALL_SCRIPT="pre-install.sh" -PKG_PRE_UNINSTALL_SCRIPT="pre-uninstall.sh" - -PKG_POST_INSTALL_SCRIPT="post-install.sh" -PKG_POST_UNINSTALL_SCRIPT="post-uninstall.sh" - -PKG_START_STOP_SCRIPT="start-stop.sh" - -PKG_SCRIPT_LIST="$PKG_PRE_INSTALL_SCRIPT $PKG_PRE_UNINSTALL_SCRIPT \ - $PKG_POST_INSTALL_SCRIPT $PKG_POST_UNINSTALL_SCRIPT \ - $PKG_START_STOP_SCRIPT" - -PKG_SRC_DIR=$1 -PKG_DEST_DIR=$2 -PKG_TMP_DIR=$TMP_DIR/APKG_BUILD.$$ - -PKG_SUFFIX="apk" - - -pkg_struct_check() { - local owd=`pwd` - local error=0 - - # check pkg base dir - if [ ! -d $PKG_SRC_DIR ]; then - echo " *** Error: Directory $PKG_SRC_DIR does not exist" >&2 - return 1 - fi - - cd $PKG_SRC_DIR - - # check pkg control dir - if [ ! -d "$PKG_CONTROL_DIR" ]; then - echo " *** Error: Directory $PKG_SRC_DIR has no $PKG_CONTROL_DIR subdirectory." >&2 - error=1 - fi - - # check pkg config file - if [ ! -f "$PKG_CONTROL_DIR/$PKG_CONFIG_FILE" ]; then - echo " *** Error: Package config file $PKG_SRC_DIR/$PKG_CONTROL_DIR/$PKG_CONFIG_FILE not found." >&2 - error=1 - fi - - # TODO: check pkg config file is utf8 format - - # check enable pkg icon file - if [ ! -f "$PKG_CONTROL_DIR/$PKG_ICON_ENABLE_FILE" ]; then - echo " *** Error: Package enable icon file $PKG_SRC_DIR/$PKG_CONTROL_DIR/$PKG_ICON_ENABLE_FILE not found." >&2 - error=1 - fi - - # check disable pkg icon file - if [ ! -f "$PKG_CONTROL_DIR/$PKG_ICON_DISABLE_FILE" ]; then - echo " *** Error: Package disable icon file $PKG_SRC_DIR/$PKG_CONTROL_DIR/$PKG_ICON_DISABLE_FILE not found." >&2 - error=1 - fi - - cd $owd - - return $error -} - -required_field() { - field=$1 - - raw_value=`$JSON_GREP app $field < $PKG_CONTROL_DIR/$PKG_CONFIG_FILE` - value=`expr "$raw_value" : '..\(.*\).'` - if [ -z "$value" ]; then - echo " *** Error: $PKG_CONTROL_DIR/$PKG_CONFIG_FILE is missing field $field" >&2 - return 1 - fi - echo $value - return 0 -} - -pkg_config_check() { - local owd=`pwd` - local error=0 - - cd $PKG_SRC_DIR - - PKG_FIELD_PACKAGE=`required_field package` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_NAME=`required_field name` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_VERSION=`required_field version` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_SECTION=`required_field section` -# [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_VISIBILITY=`required_field visibility` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_PRIORITY=`required_field priority` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_MAINTAINER=`required_field maintainer` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_EMAIL=`required_field email` -# [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_WEBSITE=`required_field website` -# [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_ARCHITECTURE=`required_field architecture` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_FIRMWARE=`required_field firmware` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_DESCRIPTION=`required_field description` - [ "$?" -ne 0 ] && error=1 - - PKG_FIELD_CHANGES=`required_field changes` -# [ "$?" -ne 0 ] && error=1 - -# PKG_FIELD_TAGS=`required_field tags` -# [ "$?" -ne 0 ] && error=1 - - if echo $PKG_FIELD_PACKAGE | grep '[^a-z0-9.+-]' > /dev/null 2>&1; then - if [ $error -eq 1 ]; then - echo >&2 - fi - echo " *** Error: Package name $PKG_FIELD_PACKAGE contains illegal characters, (other than [a-z0-9.+-])" >&2 - error=1 - fi - -# if [ -z "$PKG_FIELD_SECTION" ]; then -# if [ $error -eq 1 ]; then -# echo >&2 -# fi -# echo " The Section field should have one of the following values:" >&2 -# echo " admin, base, comm, editors, extras, games, graphics, kernel, libs, misc, net, text, web, x11" >&2 -# fi - - if [ -z "$PKG_FIELD_PRIORITY" ]; then - if [ $error -eq 1 ]; then - echo >&2 - fi - echo " The Priority field should have one of the following values:" >&2 - echo " required, important, standard, optional, extra" >&2 - echo " If you don't know which priority value you should be using, then use \`optional'" >&2 - - fi - - cd $owd - - return $error -} - -pkg_script_check() { - local owd=`pwd` - local error=0 - - cd $PKG_SRC_DIR - - for script_file in $PKG_SCRIPT_LIST; do - if [ -f $PKG_CONTROL_DIR/$script_file -a ! -x $PKG_CONTROL_DIR/$script_file ]; then - echo " *** Error: package script $PKG_CONTROL_DIR/$script_file is not executable" >&2 - error=1 - fi - done - - cd $owd - - return $error -} - -pkg_misc_check() { - local owd=`pwd` - local error=0 - - cd $PKG_SRC_DIR - - tilde_files=`find . -name '*~'` - if [ -n "$tilde_files" ]; then - echo "*** Warning: The following files have names ending in '~'. -You probably want to remove them: " >&2 - ls -ld $tilde_files - echo >&2 - fi - - swap_files=`find . -name '*.swp'` - if [ -n "$swap_files" ]; then - echo "*** Warning: The following files have names ending in '.swp'. -You probably want to remove them: " >&2 - ls -ld $swap_files - echo >&2 - fi - - svn_files=`find . -name '.svn'` - if [ -n "$svn_files" ]; then - echo "*** Warning: The following files have names ending in '.svn'. -You probably want to remove them: " >&2 - ls -ld $svn_files - echo >&2 - fi - - git_files=`find . -name '*.git'` - if [ -n "$git_files" ]; then - echo "*** Warning: The following files have names ending in '.git'. -You probably want to remove them: " >&2 - ls -ld $git_files - echo >&2 - fi - - cvs_files=`find . -name '*.cvs'` - if [ -n "$cvs_files" ]; then - echo "*** Warning: The following files have names ending in '.cvs'. -You probably want to remove them: " >&2 - ls -ld $cvs_files - echo >&2 - fi - -# maybe check SUID & GUID file - -# large_uid_files=`find . -uid +99` -# if [ -n "$large_uid_files" ]; then -# echo "*** Warning: The following files have a UID greater than 99. -#You probably want to chown these to a system user: " >&2 -# ls -ld $large_uid_files -# echo >&2 -# fi - - cd $owd - - return $error -} - -### -# apkg-build "main" -### - -# set pkg dest dir -case $# in -1) - PKG_SRC_DIR=`readlink -f $PKG_SRC_DIR` - PKG_DEST_DIR=$THIS_DIR - ;; -2) - PKG_SRC_DIR=`readlink -f $PKG_SRC_DIR` - PKG_DEST_DIR=`readlink -f $PKG_DEST_DIR` - ;; -*) - echo "Usage: $PKG_BUILD_PROGRAM []" >&2 - exit 1 - ;; -esac - -if [ $PKG_SRC_DIR = $PKG_DEST_DIR ]; then - echo "*** Error: Can't not build pkg in the same directory" >&2 - echo " pkg_directory: $PKG_SRC_DIR" >&2 - echo " destination_directory: $PKG_DEST_DIR" >&2 - exit 1 -fi - -# check pkg package folder structure -echo "Check package folder structure..." -if ! pkg_struct_check; then - echo >&2 - echo "$PKG_BUILD_PROGRAM: Please fix the above errors and try again." >&2 - exit 1 -fi -echo "Done" - -echo - -# check pkg config -echo "Check package config information..." -if ! pkg_config_check; then - echo >&2 - echo "$PKG_BUILD_PROGRAM: Please fix the above errors and try again." >&2 - exit 1 -fi -echo "Done" - -echo - -# check pkg script -echo "Check package script file..." -if ! pkg_script_check; then - echo >&2 - echo "$PKG_BUILD_PROGRAM: Please fix the above errors and try again." >&2 - exit 1 -fi -echo "Done" - -echo - -# check pkg misc -echo "Check package misc..." -if ! pkg_misc_check; then - echo >&2 - echo "$PKG_BUILD_PROGRAM: Please fix the above errors and try again." >&2 - exit 1 -fi -echo "Done" - -echo - -# archive pkg control script -mkdir -p $PKG_TMP_DIR - -# force chown user:group to web folder -if [ -d $PKG_SRC_DIR/$PKG_WEB_DIR ]; then - echo -n "Force change $PKG_SRC_DIR/$PKG_WEB_DIR/* owner and group to $PKG_WEB_USER:$PKG_WEB_GROUP ... " - if [ `ls -la $PKG_SRC_DIR/$PKG_WEB_DIR | wc -l` -gt 3 ]; then - # change owner - sudo chown $PKG_WEB_USER_ID:$PKG_WEB_GROUP_ID $PKG_SRC_DIR/$PKG_WEB_DIR -R - # TODO change file permission - # chmod $PKG_WEB_PERM $PKG_SRC_DIR/$PKG_WEB_DIR -R - fi - echo "Done" - - echo -fi - -echo -n "Archive package data..." -tar -C $PKG_SRC_DIR -czf $PKG_TMP_DIR/$PKG_DATA_FILE . --exclude=$PKG_CONTROL_DIR -echo "Done" - -echo - -# archive pkg data -echo -n "Archive package control script..." -tar -C $PKG_SRC_DIR/$PKG_CONTROL_DIR -czf $PKG_TMP_DIR/$PKG_CONTROL_FILE . -echo "Done" - -echo - -# generate pkg version -echo -n "Generate $PKG_VERSION_FILE..." -echo $PKG_BUILD_VER > $PKG_TMP_DIR/$PKG_VERSION_FILE -echo "Done" - -echo - -# prepare pkg filename -PKG_ARCHIVE_FILE=${PKG_FIELD_PACKAGE}_${PKG_FIELD_VERSION}_${PKG_FIELD_ARCHITECTURE}.$PKG_SUFFIX - -# use which type archive -echo "Use $PKG_BUILD_FORMAT format to archive $PKG_ARCHIVE_FILE..." -cd $PKG_TMP_DIR - -PKG_ARCHIVE_LIST="./$PKG_VERSION_FILE ./$PKG_DATA_FILE ./$PKG_CONTROL_FILE" - -rm -rf $TMP_DIR/$PKG_ARCHIVE_FILE - -if [ "$PKG_BUILD_FORMAT" = "ar" ] ; then - ar -crvf $TMP_DIR/$PKG_ARCHIVE_FILE $PKG_ARCHIVE_LIST -elif [ "$PKG_BUILD_FORMAT" = "tar" ] ; then - tar -zcvf $TMP_DIR/$PKG_ARCHIVE_FILE $PKG_ARCHIVE_LIST -elif [ "$PKG_BUILD_FORMAT" = "zip" ] ; then - zip -r $TMP_DIR/$PKG_ARCHIVE_FILE $PKG_ARCHIVE_LIST -fi -echo "Done" - -PKG_SIZE=`ls -l $TMP_DIR/$PKG_ARCHIVE_FILE | awk '{print $5}'` -PKG_MD5=`md5sum $TMP_DIR/$PKG_ARCHIVE_FILE | cut -d' ' -f1` -PKG_SHA1=`sha1sum $TMP_DIR/$PKG_ARCHIVE_FILE | cut -d' ' -f1` - -# move pkg to dest dir -[ "$PKG_DEST_DIR" != "$TMP_DIR" ] && mkdir -p $PKG_DEST_DIR && mv $TMP_DIR/$PKG_ARCHIVE_FILE $PKG_DEST_DIR - -echo - -# clean up -echo -n "Clean building data..." -rm -f $PKG_TMP_DIR/$PKG_VERSION_FILE $PKG_TMP_DIR/$PKG_DATA_FILE $PKG_TMP_DIR/$PKG_CONTROL_FILE -rmdir $PKG_TMP_DIR -echo "Done" - -echo - -echo "Package Summary" -echo " Source: $PKG_SRC_DIR" -echo " Destination: $PKG_DEST_DIR" -echo " Package: $PKG_FIELD_PACKAGE" -echo " Name: $PKG_FIELD_NAME" -echo " Version: $PKG_FIELD_VERSION" -echo " Section: $PKG_FIELD_SECTION" -echo " Visibility: $PKG_FIELD_VISIBILITY" -echo " Priority: $PKG_FIELD_PRIORITY" -echo " Maintainer: $PKG_FIELD_MAINTAINER" -echo " Email: $PKG_FIELD_EMAIL" -echo " WebSite: $PKG_FIELD_WEBSITE" -echo " Architecture: $PKG_FIELD_ARCHITECTURE" -echo " Firmware: $PKG_FIELD_FIRMWARE" -echo " Description: $PKG_FIELD_DESCRIPTION" -echo " Changes: $PKG_FIELD_CHANGES" -echo " File: $PKG_ARCHIVE_FILE" -echo " Size: $PKG_SIZE" -echo " MD5sum: $PKG_MD5" -echo " SHA1sum: $PKG_SHA1" diff --git a/misc/package/ASUStor/build.sh b/misc/package/ASUStor/build.sh deleted file mode 100644 index 06d6d9e74f7..00000000000 --- a/misc/package/ASUStor/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -LATEST=`curl -s http://api.piwik.org/1.0/getLatestVersion/` -curl -s http://builds.piwik.org/piwik-$LATEST.tar.gz | gunzip | tar xf - - -mkdir -p Piwik/CONTROL -mv piwik Piwik/www - -sed "s/{{VERSION}}/$LATEST/" Piwik/CONTROL/config.json -cp ../../gpl-3.0.txt Piwik/CONTROL/license.txt -cp CONTROL/*.png Piwik/CONTROL/ - -sh apkg_build Piwik diff --git a/misc/package/ASUStor/config.json.tpl b/misc/package/ASUStor/config.json.tpl deleted file mode 100644 index 9062331e3d6..00000000000 --- a/misc/package/ASUStor/config.json.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{ - "app":{ - "package":"piwik", - "name":"Piwik", - "version":"{{VERSION}}", - "section":"Web Hosting", - "visibility":true, - "priority":"optional", - "depends":[], - "conflicts":[], - "suggests":[], - "maintainer":"Piwik", - "email":"hello@piwik.org", - "website":"http://piwik.org/", - "architecture":"any", - "firmware":"any", - "description":"Open source, self-hosted web analytics.", - "changes":"http://piwik.org/changelog/", - "tags":["analytics", "visits", "visitors", "hits"] - }, - "desktop":{ - "icon":{ - "type":"webserver", - "title":"Piwik" - }, - "privilege":{ - "accessible":"users", - "customizable":true - } - }, - "install":{ - "dep-service":{ - "start":["httpd", "mysql"], - "restart":[] - } - } -} diff --git a/misc/package/ASUStor/jsongrep.py b/misc/package/ASUStor/jsongrep.py deleted file mode 100644 index 7b1b4713a01..00000000000 --- a/misc/package/ASUStor/jsongrep.py +++ /dev/null @@ -1,37 +0,0 @@ -#Original author: Terry Jones (http://blogs.fluidinfo.com/terry/about/) -#Source: http://blogs.fluidinfo.com/terry/2010/11/25/jsongrep-py-python-for-extracting-pieces-of-json-objects/ - -#!/usr/bin/env python - -import sys -import re -import json -from pprint import pprint - -def jsongrep(d, patterns): - try: - pattern = patterns.pop(0) - except IndexError: - pprint(d) - else: - if isinstance(d, dict): - keys = filter(pattern.match, d.keys()) - elif isinstance(d, list): - keys = map(int, - filter(pattern.match, - ['%d' % i for i in range(len(d))])) - else: - if pattern.match(str(d)): - pprint(d) - return - for item in (d[key] for key in keys): - jsongrep(item, patterns[:]) - -if __name__ == '__main__': - try: - j = json.loads(sys.stdin.read()) - except ValueError, e: - print >>sys.stderr, 'Could not load JSON object from stdin.' - sys.exit(1) - - jsongrep(j, map(re.compile, sys.argv[1:])) diff --git a/misc/package/QNAP/build.sh b/misc/package/QNAP/build.sh deleted file mode 100644 index 0ef74e21c7b..00000000000 --- a/misc/package/QNAP/build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -LATEST=`curl -s http://api.piwik.org/1.0/getLatestVersion/` -curl -s http://builds.piwik.org/piwik-$LATEST.tar.gz | gunzip | tar xf - - -cp icons/qpkg_icon_80.gif piwik/.qpkg_icon_80.gif -cp icons/qpkg_icon.gif piwik/.qpkg_icon.gif -cp icons/qpkg_icon_gray.gif piwik/.qpkg_icon_gray.gif - -tar cf - piwik | gzip >Piwik.tgz - -sed "s/{{VERSION}}/$LATEST/" qpkg.cfg - -cp header.qpkg Piwik_$LATEST.qpkg -tar zcf - qinstall.sh Piwik.tgz qpkg.cfg >>Piwik_$LATEST.qpkg - -zip Piwik_$LATEST.zip Piwik_$LATEST.qpkg diff --git a/misc/package/QNAP/header.qpkg b/misc/package/QNAP/header.qpkg deleted file mode 100644 index 7a143ecd195..00000000000 --- a/misc/package/QNAP/header.qpkg +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -/bin/echo "Install QNAP package on TS-NAS ..." -/bin/grep "/mnt/HDA_ROOT" /proc/mounts 1>>/dev/null 2>>/dev/null -[ $? = 0 ] || return 1 -[ -d /mnt/HDA_ROOT/update_pkg/tmp ] || /bin/mkdir -p /mnt/HDA_ROOT/update_pkg/tmp -/bin/dd if=${0} bs=487 skip=1 | /bin/tar zxv -C /mnt/HDA_ROOT/update_pkg/tmp -[ $? = 0 ] || return 1 -cd /mnt/HDA_ROOT/update_pkg/tmp && ( /bin/sh qinstall.sh || echo "Installation Abort." ) && cd .. && /bin/rm -rf /mnt/HDA_ROOT/update_pkg/tmp && exit 10 -exit 1 diff --git a/misc/package/QNAP/icons/qpkg_icon.gif b/misc/package/QNAP/icons/qpkg_icon.gif deleted file mode 100755 index eec1713ce21..00000000000 Binary files a/misc/package/QNAP/icons/qpkg_icon.gif and /dev/null differ diff --git a/misc/package/QNAP/icons/qpkg_icon_80.gif b/misc/package/QNAP/icons/qpkg_icon_80.gif deleted file mode 100755 index 43fefcb95f4..00000000000 Binary files a/misc/package/QNAP/icons/qpkg_icon_80.gif and /dev/null differ diff --git a/misc/package/QNAP/icons/qpkg_icon_gray.gif b/misc/package/QNAP/icons/qpkg_icon_gray.gif deleted file mode 100755 index 7efe51ce9d2..00000000000 Binary files a/misc/package/QNAP/icons/qpkg_icon_gray.gif and /dev/null differ diff --git a/misc/package/QNAP/qinstall.sh b/misc/package/QNAP/qinstall.sh deleted file mode 100755 index 3f834fe1d54..00000000000 --- a/misc/package/QNAP/qinstall.sh +++ /dev/null @@ -1,246 +0,0 @@ -#!/bin/sh -#================================================================ -# Copyright (C) 2010 QNAP Systems, Inc. -# -# 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. -#---------------------------------------------------------------- -# -# qinstall.sh -# -# Abstract: -# A QPKG installation script for -# Piwik v1.0 -# -# HISTORY: -# 2008/03/26 - Created - KenChen -# 2010/11/05 - Modified - AndyChuo (zeonism at gmail dot com) -# 2012/07/28 - Modified - Anthon Pang (anthon at piwik dot org) -# -#================================================================ - -##### Util ##### -CMD_APACHE="/usr/local/apache/bin/apachectl" -CMD_CP="/bin/cp" -CMD_CUT="/bin/cut" -CMD_CHMOD="/bin/chmod" -CMD_ECHO="/bin/echo" -CMD_GETCFG="/sbin/getcfg" -CMD_GREP="/bin/grep" -CMD_LN="/bin/ln" -CMD_MKTEMP="/bin/mktemp" -CMD_MKDIR="/bin/mkdir" -CMD_PIDOF="/bin/pidof" -CMD_READLINK="/usr/bin/readlink" -CMD_RM="/bin/rm" -CMD_SETCFG="/sbin/setcfg" -CMD_SYNC="/bin/sync" -CMD_SETCFG="/sbin/setcfg" -CMD_SLEEP="/bin/sleep" -CMD_TAR="/bin/tar" -CMD_TOUCH="/bin/touch" -CMD_WLOG="/sbin/write_log" - -##### System ##### -UPDATE_PROCESS="/tmp/update_process" -UPDATE_PB=0 -UPDATE_P1=1 -UPDATE_P2=2 -UPDATE_PE=3 - -SYS_HOSTNAME=`/bin/hostname` -SYS_IP=`$CMD_GREP "${SYS_HOSTNAME}" /etc/hosts | $CMD_CUT -f 1` -SYS_CONFIG_DIR="/etc/config" #put the configuration files here -SYS_INIT_DIR="/etc/init.d" -SYS_rcS_DIR="/etc/rcS.d/" -SYS_rcK_DIR="/etc/rcK.d/" -SYS_QPKG_CONFIG_FILE="/etc/config/qpkg.conf" #qpkg infomation file -SYS_QPKG_CONF_FIELD_NAME="Name" -SYS_QPKG_CONF_FIELD_VERSION="Version" -SYS_QPKG_CONF_FIELD_QPKGFILE="QPKG_File" -SYS_QPKG_CONF_FIELD_ENABLE="Enable" -SYS_QPKG_CONF_FIELD_DATE="Date" -SYS_QPKG_CONF_FIELD_SHELL="Shell" -SYS_QPKG_CONF_FIELD_INSTALL_PATH="Install_Path" -SYS_QPKG_CONF_FIELD_CONFIG_PATH="Config_Path" -SYS_QPKG_CONF_FIELD_WEBUI="WebUI" -SYS_QPKG_CONF_FIELD_WEBPORT="Web_Port" -SYS_QPKG_CONF_FIELD_SERVICEPORT="Service_Port" -SYS_QPKG_CONF_FIELD_AUTHOR="Author" -SYS_WEB_STATUS=`${CMD_GETCFG} QWEB enable` -PUBLIC_SHARE=`/sbin/getcfg SHARE_DEF defPublic -d Public -f /etc/config/def_share.info` -WEB_SHARE=`/sbin/getcfg SHARE_DEF defWeb -d Qweb -f /etc/config/def_share.info` - -##### QPKG ##### -# -. qpkg.cfg -##### Func ###### -# -find_base(){ - # Determine BASE installation location according to smb.conf - - publicdir=`/sbin/getcfg Public path -f /etc/config/smb.conf` - if [ ! -z $publicdir ] && [ -d $publicdir ];then - publicdirp1=`/bin/echo $publicdir | /bin/cut -d "/" -f 2` - publicdirp2=`/bin/echo $publicdir | /bin/cut -d "/" -f 3` - publicdirp3=`/bin/echo $publicdir | /bin/cut -d "/" -f 4` - if [ ! -z $publicdirp1 ] && [ ! -z $publicdirp2 ] && [ ! -z $publicdirp3 ]; then - [ -d "/${publicdirp1}/${publicdirp2}/${PUBLIC_SHARE}" ] && QPKG_BASE="/${publicdirp1}/${publicdirp2}" - fi - fi - - # Determine BASE installation location by checking where the Public folder is. - if [ -z $QPKG_BASE ]; then - for datadirtest in /share/HDA_DATA /share/HDB_DATA /share/HDC_DATA /share/HDD_DATA /share/MD0_DATA /share/MD1_DATA; do - [ -d $datadirtest/$PUBLIC_SHARE ] && QPKG_BASE="/${publicdirp1}/${publicdirp2}" - done - fi - if [ -z $QPKG_BASE ] ; then - echo "The ${PUBLIC_SHARE} share not found." - _exit 1 - fi - -} - -_exit(){ - local ret=0 - - case $1 in - 0)#normal exit - ret=0 - if [ "x$QPKG_INSTALL_MSG" != "x" ]; then - $CMD_WLOG "${QPKG_INSTALL_MSG}" 4 - else - $CMD_WLOG "${QPKG_NAME} ${QPKG_VER} installation succeeded." 4 - fi - $CMD_ECHO "$UPDATE_PE" > ${UPDATE_PROCESS} - ;; - *) - ret=1 - if [ "x$QPKG_INSTALL_MSG" != "x" ];then - $CMD_WLOG "${QPKG_INSTALL_MSG}" 1 - else - $CMD_WLOG "${QPKG_NAME} ${QPKG_VER} installation failed" 1 - fi - $CMD_ECHO -1 > ${UPDATE_PROCESS} - ;; - esac - - exit $ret -} - -pre_update() -{ - TMP_DIR=/tmp - $CMD_CP -af $QPKG_CONFIG_PATH $TMP_DIR -} - -post_update() -{ - $CMD_CP -af "${TMP_DIR}/config.ini.php" ${QPKG_CONFIG_PATH} -} - -install() -{ - TMP=`$CMD_READLINK $QPKG_INSTALL_PATH` - UPDATE_FLAG=0 - if [ -f "${QPKG_SOURCE_DIR}/${QPKG_SOURCE_FILE}" ]; then - if [ -d ${QPKG_DIR} ]; then - CURRENT_QPKG_VER="`/sbin/getcfg ${QPKG_NAME} Version -f /etc/config/qpkg.conf`" - QPKG_INSTALL_MSG="${QPKG_NAME} ${QPKG_VER} is already installed. Setup will now perform package upgrading." - $CMD_ECHO "$QPKG_INSTALL_MSG" - UPDATE_FLAG=1 - fi - - $CMD_ECHO "$UPDATE_P1" > ${UPDATE_PROCESS} - if [ $UPDATE_FLAG -eq 0 ]; then - $CMD_ECHO "Install ${QPKG_NAME} ..." - [ ! -d $QPKG_DIR ] || $CMD_RM -rf $QPKG_DIR - else - pre_update - fi - - #install QPKG files - $CMD_TAR xzf "${QPKG_SOURCE_DIR}/${QPKG_SOURCE_FILE}" -C $QPKG_INSTALL_PATH - if [ $? = 0 ]; then - # restore backups - if [ ${UPDATE_FLAG} -eq 1 ]; then - post_update - else - $CMD_CHMOD 0777 "${QPKG_DIR}" - $CMD_CHMOD 0777 -R "${QPKG_DIR}/config" - $CMD_CHMOD 0777 -R "${QPKG_DIR}/tmp" - - $CMD_MKDIR -p ${QPKG_DIR}/tmp/{sessions, templates_c, cache, assets, latest, tcpdf} - $CMD_CHMOD 0777 -R "${QPKG_DIR}/tmp/" - fi - - chown httpdusr.everyone ${QPKG_DIR} -R - - $CMD_ECHO "$UPDATE_P2" > ${UPDATE_PROCESS} - else - ${CMD_RM} -rf ${QPKG_DIR} - QPKG_INSTALL_MSG="${QPKG_NAME} ${QPKG_VER} installation failed. ${QPKG_SOURCE_DIR}/${QPKG_SOURCE_FILE} file error." - $CMD_ECHO "$QPKG_INSTALL_MSG" - _exit 1 - fi - - # set QPKG information to $SYS_QPKG_CONFIG_FILE - $CMD_ECHO "Set QPKG information to $SYS_QPKG_CONFIG_FILE" - [ -f ${SYS_QPKG_CONFIG_FILE} ] || $CMD_TOUCH ${SYS_QPKG_CONFIG_FILE} - $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_NAME} "${QPKG_NAME}" -f ${SYS_QPKG_CONFIG_FILE} - $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_VERSION} "${QPKG_VER}" -f ${SYS_QPKG_CONFIG_FILE} - - #default value to activate(or not) your QPKG if it was a service/daemon - $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_ENABLE} "UNKNOWN" -f ${SYS_QPKG_CONFIG_FILE} - - #set the qpkg file name - [ "x${SYS_QPKG_CONF_FIELD_QPKGFILE}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_QPKGFILE} "${QPKG_QPKG_FILE}" -f ${SYS_QPKG_CONFIG_FILE} - - #set the date of installation - $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_DATE} `date +%F` -f ${SYS_QPKG_CONFIG_FILE} - - #set the path of start/stop shell script - [ "x${QPKG_SERVICE_PROGRAM}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_SHELL} "${QPKG_DIR}/${QPKG_SERVICE_PROGRAM}" -f ${SYS_QPKG_CONFIG_FILE} - - #set path where the QPKG installed - $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_INSTALL_PATH} "${QPKG_DIR}" -f ${SYS_QPKG_CONFIG_FILE} - - #set path where the QPKG configure directory/file is - [ "x${QPKG_CONFIG_PATH}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_CONFIG_PATH} "${QPKG_CONFIG_PATH}" -f ${SYS_QPKG_CONFIG_FILE} - - #set the port number if your QPKG was a service/daemon and needed a port to run. - [ "x${QPKG_SERVICE_PORT}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_SERVICEPORT} "${QPKG_SERVICE_PORT}" -f ${SYS_QPKG_CONFIG_FILE} - - #set the port number if your QPKG was a service/daemon and needed a port to run. - [ "x${QPKG_WEB_PORT}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_WEBPORT} "${QPKG_WEB_PORT}" -f ${SYS_QPKG_CONFIG_FILE} - - #set the URL of your QPKG Web UI if existed. - [ "x${QPKG_WEBUI}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_WEBUI} "${QPKG_WEBUI}" -f ${SYS_QPKG_CONFIG_FILE} - - #Sign up - [ "x${QPKG_AUTHOR}" = "x" ] && $CMD_ECHO "Warning: ${SYS_QPKG_CONF_FIELD_AUTHOR} is not specified!!" - [ "x${QPKG_AUTHOR}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_AUTHOR} "${QPKG_AUTHOR}" -f ${SYS_QPKG_CONFIG_FILE} - - $CMD_SYNC - QPKG_INSTALL_MSG="$QPKG_NAME ${QPKG_VER} has been installed in $QPKG_DIR." - $CMD_ECHO "$QPKG_INSTALL_MSG" - _exit 0 - else - QPKG_INSTALL_MSG="${QPKG_NAME} ${QPKG_VER} installation failed. ${QPKG_SOURCE_DIR}/${QPKG_SOURCE_FILE} file not found." - $CMD_ECHO "$QPKG_INSTALL_MSG" - _exit 1 - fi -} - -##### Main ##### - -$CMD_ECHO "$UPDATE_PB" > ${UPDATE_PROCESS} -install diff --git a/misc/package/QNAP/qpkg.cfg.tpl b/misc/package/QNAP/qpkg.cfg.tpl deleted file mode 100644 index a97631cbb12..00000000000 --- a/misc/package/QNAP/qpkg.cfg.tpl +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -#================================================================ -# Copyright (C) 2010 QNAP Systems, Inc. -# -# 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. -#---------------------------------------------------------------- -# -# qpkg_all.cfg -# -# Abstract: -# A QPKG configuration file for -# Piwik v1.0 -# -# HISTORY: -# 2010/11/05 - Created - AndyChuo (zeonism at gmail dot com) -# 2012/07/28 - Modified - Anthon Pang (anthon at piwik dot org) -# -#================================================================ -QPKG_AUTHOR="QNAP Systems, Inc." -QPKG_SOURCE_DIR="." -QPKG_QPKG_FILE="Piwik.qpkg" -QPKG_SOURCE_FILE="Piwik.tgz" -QPKG_NAME="Piwik" -QPKG_VER="{{VERSION}}" -QPKG_MAJOR_VER="1" -QPKG_MINOR_VER="0" -QPKG_TYPE="Web Applications" -QPKG_LOG_PATH="" -QPKG_INSTALL_PATH="/share/${WEB_SHARE}" -QPKG_CONFIG_PATH="$QPKG_INSTALL_PATH/piwik/config/config.ini.php" -QPKG_DIR="$QPKG_INSTALL_PATH/piwik" -QPKG_WEBUI="/piwik/" #URL relative path of your QPKG web interface led by "/" -QPKG_INSTALL_MSG="" -QPKG_WEB_PORT="" -QPKG_SERVICE_PORT="" diff --git a/misc/package/build.sh b/misc/package/build.sh index 1bba6e54ea7..bf1b22d86fc 100755 --- a/misc/package/build.sh +++ b/misc/package/build.sh @@ -211,7 +211,7 @@ If you have any question, feel free to ask. \n\n\ Thank you,\n\n\ Piwik team" | mail -s"New Piwik Version $VERSION" "appgal@microsoft.com,hello@piwik.org" - echo "build finished! http://builds.piwik.org/latest.zip" + echo "build finished! http://builds.piwik.org/piwik-latest.zip" fi diff --git a/misc/proxy-hide-piwik-url/piwik.php b/misc/proxy-hide-piwik-url/piwik.php index fa0d4f682f7..7ec88affd63 100644 --- a/misc/proxy-hide-piwik-url/piwik.php +++ b/misc/proxy-hide-piwik-url/piwik.php @@ -1,6 +1,6 @@ 1){if(console!==undefined&&console&&console.error){console.error("The method "+d+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: http://developer.piwik.org/api-reference/tracking-javascript#multiple-piwik-trackers')}}p[d]++}}for(r=0;r<_paq.length;r++){if(_paq[r]){L(_paq[r])}}_paq=new t();c={addPlugin:function(Q,R){a[Q]=R},getTracker:function(Q,R){return new z(Q,R)},getAsyncTracker:function(){return G}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return c})}return c}())}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()}(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=Piwik}}());if(typeof piwik_log!=="function"){piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h) -}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){e.setIgnoreClasses(c)}e.trackPageView();if(a("install_tracker")){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}}}; \ No newline at end of file +}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){e.setIgnoreClasses(c)}e.trackPageView();if(a("install_tracker")){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}}; +/*! @license-end */ +}; \ No newline at end of file diff --git a/piwik.php b/piwik.php index 25528679363..8c37403a392 100644 --- a/piwik.php +++ b/piwik.php @@ -1,6 +1,6 @@ 'addWidgets', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', 'ViewDataTable.configure' => 'configureViewDataTable', @@ -462,29 +458,6 @@ public function getReportMetadata(&$reports) } } - function addWidgets() - { - WidgetsList::add('General_Actions', 'General_Pages', 'Actions', 'getPageUrls'); - WidgetsList::add('General_Actions', 'Actions_WidgetPageTitles', 'Actions', 'getPageTitles'); - WidgetsList::add('General_Actions', 'General_Outlinks', 'Actions', 'getOutlinks'); - WidgetsList::add('General_Actions', 'General_Downloads', 'Actions', 'getDownloads'); - WidgetsList::add('General_Actions', 'Actions_WidgetPagesEntry', 'Actions', 'getEntryPageUrls'); - WidgetsList::add('General_Actions', 'Actions_WidgetPagesExit', 'Actions', 'getExitPageUrls'); - WidgetsList::add('General_Actions', 'Actions_WidgetEntryPageTitles', 'Actions', 'getEntryPageTitles'); - WidgetsList::add('General_Actions', 'Actions_WidgetExitPageTitles', 'Actions', 'getExitPageTitles'); - - if ($this->isSiteSearchEnabled()) { - WidgetsList::add('Actions_SubmenuSitesearch', 'Actions_WidgetSearchKeywords', 'Actions', 'getSiteSearchKeywords'); - - if (self::isCustomVariablesPluginsEnabled()) { - WidgetsList::add('Actions_SubmenuSitesearch', 'Actions_WidgetSearchCategories', 'Actions', 'getSiteSearchCategories'); - } - WidgetsList::add('Actions_SubmenuSitesearch', 'Actions_WidgetSearchNoResultKeywords', 'Actions', 'getSiteSearchNoResultKeywords'); - WidgetsList::add('Actions_SubmenuSitesearch', 'Actions_WidgetPageUrlsFollowingSearch', 'Actions', 'getPageUrlsFollowingSiteSearch'); - WidgetsList::add('Actions_SubmenuSitesearch', 'Actions_WidgetPageTitlesFollowingSearch', 'Actions', 'getPageTitlesFollowingSiteSearch'); - } - } - public function isSiteSearchEnabled() { $idSite = Common::getRequestVar('idSite', 0, 'int'); @@ -515,12 +488,11 @@ static public function checkCustomVariablesPluginEnabled() } } - static protected function isCustomVariablesPluginsEnabled() + static public function isCustomVariablesPluginsEnabled() { return \Piwik\Plugin\Manager::getInstance()->isPluginActivated('CustomVariables'); } - public function configureViewDataTable(ViewDataTable $view) { switch ($view->requestConfig->apiMethodToRequestDataTable) { diff --git a/plugins/Actions/Archiver.php b/plugins/Actions/Archiver.php index f7f839827bc..2829ce47ab1 100644 --- a/plugins/Actions/Archiver.php +++ b/plugins/Actions/Archiver.php @@ -1,6 +1,6 @@ add($category, 'General_Pages', $controller, 'getPageUrls'); + $widgetsList->add($category, 'Actions_WidgetPageTitles', $controller, 'getPageTitles'); + $widgetsList->add($category, 'General_Outlinks', $controller, 'getOutlinks'); + $widgetsList->add($category, 'General_Downloads', $controller, 'getDownloads'); + $widgetsList->add($category, 'Actions_WidgetPagesEntry', $controller, 'getEntryPageUrls'); + $widgetsList->add($category, 'Actions_WidgetPagesExit', $controller, 'getExitPageUrls'); + $widgetsList->add($category, 'Actions_WidgetEntryPageTitles', $controller, 'getEntryPageTitles'); + $widgetsList->add($category, 'Actions_WidgetExitPageTitles', $controller, 'getExitPageTitles'); + + $actions = new Actions(); + if ($actions->isSiteSearchEnabled()) { + $this->addSearchWidgets($widgetsList, $controller); + } + } + + private function addSearchWidgets(WidgetsList $widgetsList, $controller) + { + $category = 'Actions_SubmenuSitesearch'; + + $widgetsList->add($category, 'Actions_WidgetSearchKeywords', $controller, 'getSiteSearchKeywords'); + + if (Actions::isCustomVariablesPluginsEnabled()) { + $widgetsList->add($category, 'Actions_WidgetSearchCategories', $controller, 'getSiteSearchCategories'); + } + + $widgetsList->add($category, 'Actions_WidgetSearchNoResultKeywords', $controller, 'getSiteSearchNoResultKeywords'); + $widgetsList->add($category, 'Actions_WidgetPageUrlsFollowingSearch', $controller, 'getPageUrlsFollowingSiteSearch'); + $widgetsList->add($category, 'Actions_WidgetPageTitlesFollowingSearch', $controller, 'getPageTitlesFollowingSiteSearch'); + } + +} diff --git a/plugins/Annotations/API.php b/plugins/Annotations/API.php index 418d9be0ec4..5c74534db6c 100755 --- a/plugins/Annotations/API.php +++ b/plugins/Annotations/API.php @@ -1,6 +1,6 @@ setName('generate:widget') + ->setDescription('Adds a plugin widget class to an existing plugin') + ->addOption('pluginname', null, InputOption::VALUE_REQUIRED, 'The name of an existing plugin which does not have any widgets defined yet'); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $pluginName = $this->getPluginName($input, $output); + + $exampleFolder = PIWIK_INCLUDE_PATH . '/plugins/ExamplePlugin'; + $replace = array('ExampleRssWidget' => $pluginName); + $whitelistFiles = array('/Widgets.php'); + + $this->copyTemplateToPlugin($exampleFolder, $pluginName, $replace, $whitelistFiles); + + $this->writeSuccessMessage($output, array( + sprintf('Widgets.php for %s generated.', $pluginName), + 'You can now start defining your plugin widgets', + 'Enjoy!' + )); + } + + /** + * @param InputInterface $input + * @param OutputInterface $output + * @return array + * @throws \RunTimeException + */ + protected function getPluginName(InputInterface $input, OutputInterface $output) + { + $pluginNames = $this->getPluginNamesHavingNotSpecificFile('Widgets.php'); + $invalidName = 'You have to enter the name of an existing plugin which does not already have any widgets defined'; + + return $this->askPluginNameAndValidate($input, $output, $pluginNames, $invalidName); + } + +} diff --git a/plugins/CoreConsole/Commands/GitCommit.php b/plugins/CoreConsole/Commands/GitCommit.php index ba28b599e1a..74ed211b17e 100644 --- a/plugins/CoreConsole/Commands/GitCommit.php +++ b/plugins/CoreConsole/Commands/GitCommit.php @@ -1,6 +1,6 @@ write("Downloading $file to .$downloadTo...\n"); + $output->write("Downloading $file to $downloadTo...\n"); Http::sendHttpRequest("$urlBase/processed-ui-screenshots/$file", $timeout = 60, $userAgent = null, PIWIK_DOCUMENT_ROOT . "/" . $downloadTo); } diff --git a/plugins/CoreConsole/Commands/WatchLog.php b/plugins/CoreConsole/Commands/WatchLog.php index fc06dae46a9..f6dd3bba5f3 100644 --- a/plugins/CoreConsole/Commands/WatchLog.php +++ b/plugins/CoreConsole/Commands/WatchLog.php @@ -1,6 +1,6 @@ 'getStylesheetFiles', 'AssetManager.getJavaScriptFiles' => 'getJsFiles', - 'WidgetsList.addWidgets' => 'addWidgets', 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys' ); } - /** - * Adds the donate form widget. - */ - public function addWidgets() - { - WidgetsList::add('Example Widgets', 'CoreHome_SupportPiwik', 'CoreHome', 'getDonateForm'); - WidgetsList::add('Example Widgets', 'Installation_Welcome', 'CoreHome', 'getPromoVideo'); - } - public function getStylesheetFiles(&$stylesheets) { $stylesheets[] = "libs/jquery/themes/base/jquery-ui.css"; diff --git a/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php b/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php index 4ce804e8654..732c1267d50 100644 --- a/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php +++ b/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php @@ -1,6 +1,6 @@ add($category, 'CoreHome_SupportPiwik', $controller, 'getDonateForm'); + $widgetsList->add($category, 'Installation_Welcome', $controller, 'getPromoVideo'); + } + +} diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php index e55bf8881b5..01c28378578 100644 --- a/plugins/CorePluginsAdmin/Controller.php +++ b/plugins/CorePluginsAdmin/Controller.php @@ -1,6 +1,6 @@ 'addWidgets', 'Goals.getReportsWithGoalMetrics' => 'getReportsWithGoalMetrics', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', @@ -43,11 +39,6 @@ public function getListHooksRegistered() return $hooks; } - public function addWidgets() - { - WidgetsList::add('General_Visitors', 'CustomVariables_CustomVariables', 'CustomVariables', 'getCustomVariables'); - } - public function install() { Model::install(); diff --git a/plugins/CustomVariables/Menu.php b/plugins/CustomVariables/Menu.php index 49c36cbd553..fd2658b85e0 100644 --- a/plugins/CustomVariables/Menu.php +++ b/plugins/CustomVariables/Menu.php @@ -1,6 +1,6 @@ 'addWidgets', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', 'ViewDataTable.configure' => 'configureViewDataTable', @@ -99,7 +97,7 @@ public function getListHooksRegistered() * * @return array Category, Report Name, API Module, API action, Translated column name, & optional segment info */ - protected function getRawMetadataReports() + public function getRawMetadataReports() { $report = array( @@ -158,16 +156,6 @@ protected function getRawMetadataReports() return $report; } - public function addWidgets() - { - foreach ($this->getRawMetadataReports() as $report) { - list($category, $name, $controllerName, $controllerAction) = $report; - if ($category == false) - continue; - WidgetsList::add($category, $name, $controllerName, $controllerAction); - } - } - /** * Get segments meta data */ @@ -220,7 +208,6 @@ public function getReportMetadata(&$reports) public function install() { -// we catch the exception try { $q1 = "ALTER TABLE `" . Common::prefixTable("log_visit") . "` ADD `config_os_version` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `config_os` , diff --git a/plugins/DevicesDetection/Menu.php b/plugins/DevicesDetection/Menu.php index 2b2f06ed78d..c7ce8434b9a 100644 --- a/plugins/DevicesDetection/Menu.php +++ b/plugins/DevicesDetection/Menu.php @@ -1,6 +1,6 @@ getRawMetadataReports() as $report) { + list($category, $name, $controllerName, $controllerAction) = $report; + if ($category == false) + continue; + $widgetsList->add($category, $name, $controllerName, $controllerAction); + } + } + +} diff --git a/plugins/DevicesDetection/functions.php b/plugins/DevicesDetection/functions.php index c61cf85c850..1ce60135583 100644 --- a/plugins/DevicesDetection/functions.php +++ b/plugins/DevicesDetection/functions.php @@ -1,6 +1,6 @@ 'getSegmentsMetadata', 'Metrics.getDefaultMetricTranslations' => 'addMetricTranslations', 'API.getReportMetadata' => 'getReportMetadata', - 'WidgetsList.addWidgets' => 'addWidgets', 'ViewDataTable.configure' => 'configureViewDataTable', ); } - public function addWidgets() - { - foreach(self::getLabelTranslations() as $apiMethod => $labels) { - $params = array( - 'secondaryDimension' => API::getInstance()->getDefaultSecondaryDimension($apiMethod) - ); - WidgetsList::add('Events_Events', $labels[0], 'Events', $apiMethod, $params); - } - } public function addMetricTranslations(&$translations) { @@ -98,7 +85,6 @@ static public function getLabelTranslations() ); } - public function getSegmentsMetadata(&$segments) { $sqlFilter = '\\Piwik\\Tracker\\TableLogAction::getIdActionFromSegment'; diff --git a/plugins/Events/Menu.php b/plugins/Events/Menu.php index 78c9b0bc9b7..df171dc4889 100644 --- a/plugins/Events/Menu.php +++ b/plugins/Events/Menu.php @@ -1,6 +1,6 @@ $labels) { + $params = array( + 'secondaryDimension' => API::getInstance()->getDefaultSecondaryDimension($apiMethod) + ); + $widgetsList->add('Events_Events', $labels[0], 'Events', $apiMethod, $params); + } + } + +} diff --git a/plugins/ExampleAPI/API.php b/plugins/ExampleAPI/API.php index 2c3fa728fcd..27dc2f59aaf 100644 --- a/plugins/ExampleAPI/API.php +++ b/plugins/ExampleAPI/API.php @@ -1,6 +1,6 @@ add('Example Category', 'Example Widget Name', $controller = 'ExamplePlugin', $action = 'index'); + } + +} diff --git a/plugins/ExamplePlugin/tests/SimpleIntegrationTest.php b/plugins/ExamplePlugin/tests/SimpleIntegrationTest.php index 0bfc4906852..3debdd9829d 100644 --- a/plugins/ExamplePlugin/tests/SimpleIntegrationTest.php +++ b/plugins/ExamplePlugin/tests/SimpleIntegrationTest.php @@ -1,6 +1,6 @@ 'getStylesheetFiles', - 'WidgetsList.addWidgets' => 'addWidgets' + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles' ); } @@ -30,10 +27,4 @@ public function getStylesheetFiles(&$stylesheets) { $stylesheets[] = "plugins/ExampleRssWidget/stylesheets/rss.less"; } - - public function addWidgets() - { - WidgetsList::add('Example Widgets', 'Piwik.org Blog', 'ExampleRssWidget', 'rssPiwik'); - WidgetsList::add('Example Widgets', 'Piwik Changelog', 'ExampleRssWidget', 'rssChangelog'); - } } diff --git a/plugins/ExampleRssWidget/RssRenderer.php b/plugins/ExampleRssWidget/RssRenderer.php index 508c405856b..254a30ce6f8 100644 --- a/plugins/ExampleRssWidget/RssRenderer.php +++ b/plugins/ExampleRssWidget/RssRenderer.php @@ -1,6 +1,6 @@ add($category, 'Piwik.org Blog', $controller, 'rssPiwik'); + $widgetsList->add($category, 'Piwik Changelog', $controller, 'rssChangelog'); + } + +} diff --git a/plugins/ExampleSettingsPlugin/Settings.php b/plugins/ExampleSettingsPlugin/Settings.php index 40a06aebd84..d3a9ec5d3b3 100644 --- a/plugins/ExampleSettingsPlugin/Settings.php +++ b/plugins/ExampleSettingsPlugin/Settings.php @@ -1,6 +1,6 @@ ecommerceReports; + } + public static function sortGoalDimensionsByModule($a, $b) { $order = array( @@ -103,7 +107,6 @@ public function getListHooksRegistered() 'Tracker.Cache.getSiteAttributes' => 'fetchGoalsFromDb', 'API.getReportMetadata.end' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', - 'WidgetsList.addWidgets' => 'addWidgets', 'SitesManager.deleteSite.end' => 'deleteSiteGoals', 'Goals.getReportsWithGoalMetrics' => 'getActualReportsWithGoalMetrics', 'ViewDataTable.configure' => 'configureViewDataTable', @@ -468,30 +471,6 @@ public function fetchGoalsFromDb(&$array, $idSite) $array['goals'] = API::getInstance()->getGoals($idSite); } - public function addWidgets() - { - $idSite = Common::getRequestVar('idSite', null, 'int'); - - // Ecommerce widgets - $site = new Site($idSite); - if ($site->isEcommerceEnabled()) { - WidgetsList::add('Goals_Ecommerce', 'Goals_EcommerceOverview', 'Goals', 'widgetGoalReport', array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER)); - WidgetsList::add('Goals_Ecommerce', 'Goals_EcommerceLog', 'Goals', 'getEcommerceLog'); - foreach ($this->ecommerceReports as $widget) { - WidgetsList::add('Goals_Ecommerce', $widget[0], $widget[1], $widget[2]); - } - } - - // Goals widgets - WidgetsList::add('Goals_Goals', 'Goals_GoalsOverview', 'Goals', 'widgetGoalsOverview'); - $goals = API::getInstance()->getGoals($idSite); - if (count($goals) > 0) { - foreach ($goals as $goal) { - WidgetsList::add('Goals_Goals', Common::sanitizeInputValue($goal['name']), 'Goals', 'widgetGoalReport', array('idGoal' => $goal['idgoal'])); - } - } - } - public function configureViewDataTable(ViewDataTable $view) { switch ($view->requestConfig->apiMethodToRequestDataTable) { diff --git a/plugins/Goals/Menu.php b/plugins/Goals/Menu.php index e31952c5784..0b27a381798 100644 --- a/plugins/Goals/Menu.php +++ b/plugins/Goals/Menu.php @@ -1,6 +1,6 @@ isEcommerceEnabled()) { + $this->addEcommerceWidgets($widgetsList); + } + + $this->addGoalsWidgets($widgetsList, $idSite); + } + + private function addEcommerceWidgets(WidgetsList $widgetsList) + { + $goals = new Goals(); + + $widgetsList->add('Goals_Ecommerce', 'Goals_EcommerceOverview', 'Goals', 'widgetGoalReport', array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER)); + $widgetsList->add('Goals_Ecommerce', 'Goals_EcommerceLog', 'Goals', 'getEcommerceLog'); + foreach ($goals->getEcommerceReports() as $widget) { + $widgetsList->add('Goals_Ecommerce', $widget[0], $widget[1], $widget[2]); + } + } + + private function addGoalsWidgets(WidgetsList $widgetsList, $idSite) + { + $widgetsList->add('Goals_Goals', 'Goals_GoalsOverview', 'Goals', 'widgetGoalsOverview'); + + $goals = API::getInstance()->getGoals($idSite); + if (count($goals) > 0) { + foreach ($goals as $goal) { + $widgetsList->add('Goals_Goals', Common::sanitizeInputValue($goal['name']), 'Goals', 'widgetGoalReport', array('idGoal' => $goal['idgoal'])); + } + } + } + +} diff --git a/plugins/ImageGraph/API.php b/plugins/ImageGraph/API.php index 532c9ef57c6..1aa5348b60e 100644 --- a/plugins/ImageGraph/API.php +++ b/plugins/ImageGraph/API.php @@ -1,6 +1,6 @@ 'addWidgets', 'AssetManager.getJavaScriptFiles' => 'getJsFiles', 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'ViewDataTable.addViewDataTable' => 'getAvailableVisualizations' @@ -32,12 +29,6 @@ public function getAvailableVisualizations(&$visualizations) $visualizations[] = __NAMESPACE__ . '\\Visualizations\\Insight'; } - public function addWidgets() - { - WidgetsList::add('Insights_WidgetCategory', 'Insights_OverviewWidgetTitle', 'Insights', 'getInsightsOverview'); - WidgetsList::add('Insights_WidgetCategory', 'Insights_MoversAndShakersWidgetTitle', 'Insights', 'getOverallMoversAndShakers'); - } - public function getStylesheetFiles(&$stylesheets) { $stylesheets[] = "plugins/Insights/stylesheets/insightVisualization.less"; diff --git a/plugins/Insights/Model.php b/plugins/Insights/Model.php index 981a7d26f07..3f9ac956b4c 100644 --- a/plugins/Insights/Model.php +++ b/plugins/Insights/Model.php @@ -1,6 +1,6 @@ add($category, 'Insights_OverviewWidgetTitle', $controller, 'getInsightsOverview'); + $widgetsList->add($category, 'Insights_MoversAndShakersWidgetTitle', $controller, 'getOverallMoversAndShakers'); + } + +} diff --git a/plugins/Insights/tests/ApiTest.php b/plugins/Insights/tests/ApiTest.php index 06223f1e630..3dfcf47a64d 100644 --- a/plugins/Insights/tests/ApiTest.php +++ b/plugins/Insights/tests/ApiTest.php @@ -1,6 +1,6 @@ getTimezone(); + $currency = $website->getCurrency(); $currencies = APISitesManager::getInstance()->getCurrencySymbols(); // live api is not summable, prevents errors like "Unexpected ECommerce status value" @@ -556,12 +557,15 @@ private function addFilterToCleanVisitors(DataTable $dataTable, $idSite, $flat = $visitor = new Visitor($visitorDetailsArray); $visitorDetailsArray = $visitor->getAllVisitorDetails(); - $visitorDetailsArray['siteCurrency'] = $website->getCurrency(); + $visitorDetailsArray['siteCurrency'] = $currency; $visitorDetailsArray['siteCurrencySymbol'] = @$currencies[$visitorDetailsArray['siteCurrency']]; $visitorDetailsArray['serverTimestamp'] = $visitorDetailsArray['lastActionTimestamp']; + $dateTimeVisit = Date::factory($visitorDetailsArray['lastActionTimestamp'], $timezone); - $visitorDetailsArray['serverTimePretty'] = $dateTimeVisit->getLocalized('%time%'); - $visitorDetailsArray['serverDatePretty'] = $dateTimeVisit->getLocalized(Piwik::translate('CoreHome_ShortDateFormat')); + if($dateTimeVisit) { + $visitorDetailsArray['serverTimePretty'] = $dateTimeVisit->getLocalized('%time%'); + $visitorDetailsArray['serverDatePretty'] = $dateTimeVisit->getLocalized(Piwik::translate('CoreHome_ShortDateFormat')); + } $dateTimeVisitFirstAction = Date::factory($visitorDetailsArray['firstActionTimestamp'], $timezone); $visitorDetailsArray['serverDatePrettyFirstAction'] = $dateTimeVisitFirstAction->getLocalized(Piwik::translate('CoreHome_ShortDateFormat')); diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php index efdde7e9fdf..224cf869ae3 100644 --- a/plugins/Live/Controller.php +++ b/plugins/Live/Controller.php @@ -1,6 +1,6 @@ 'getJsFiles', 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', - 'WidgetsList.addWidgets' => 'addWidget', 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys', 'ViewDataTable.getDefaultType' => 'getDefaultTypeViewDataTable' ); @@ -48,14 +44,6 @@ public function getJsFiles(&$jsFiles) $jsFiles[] = "plugins/Live/javascripts/visitorLog.js"; } - public function addWidget() - { - WidgetsList::add('Live!', 'Live_VisitorsInRealTime', 'Live', 'widget'); - WidgetsList::add('Live!', 'Live_VisitorLog', 'Live', 'getVisitorLog', array('small' => 1)); - WidgetsList::add('Live!', 'Live_RealTimeVisitorCount', 'Live', 'getSimpleLastVisitCount'); - WidgetsList::add('Live!', 'Live_VisitorProfile', 'Live', 'getVisitorProfilePopup'); - } - public function getClientSideTranslationKeys(&$translationKeys) { $translationKeys[] = "Live_VisitorProfile"; diff --git a/plugins/Live/Menu.php b/plugins/Live/Menu.php index 7fbc3f4b780..2ef3466f69b 100644 --- a/plugins/Live/Menu.php +++ b/plugins/Live/Menu.php @@ -1,6 +1,6 @@ add($category, 'Live_VisitorsInRealTime', $controller, 'widget'); + $widgetsList->add($category, 'Live_VisitorLog', $controller, 'getVisitorLog', array('small' => 1)); + $widgetsList->add($category, 'Live_RealTimeVisitorCount', $controller, 'getSimpleLastVisitCount'); + $widgetsList->add($category, 'Live_VisitorProfile', $controller, 'getVisitorProfilePopup'); + } + +} diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php index 8407e26cc61..9bb0b8127ac 100644 --- a/plugins/Login/Auth.php +++ b/plugins/Login/Auth.php @@ -1,6 +1,6 @@ rendering .= $view->render(); } + + /** + * Get report attachments, ex. graph images + * + * @param $report + * @param $processedReports + * @param $prettyDate + * @return array + */ + public function getAttachments($report, $processedReports, $prettyDate) + { + return array(); + } } diff --git a/plugins/MobileMessaging/SMSProvider.php b/plugins/MobileMessaging/SMSProvider.php index 15fb226315c..9f470ef4d16 100644 --- a/plugins/MobileMessaging/SMSProvider.php +++ b/plugins/MobileMessaging/SMSProvider.php @@ -1,6 +1,6 @@ {% if not isCustomLogo %}Piwik › {% endif %}{{ 'CoreAdminHome_Administration'|translate }} - + {% include "@CoreHome/_favicon.twig" %} diff --git a/plugins/Morpheus/templates/dashboard.twig b/plugins/Morpheus/templates/dashboard.twig index a2dfff69ca5..89484103318 100644 --- a/plugins/Morpheus/templates/dashboard.twig +++ b/plugins/Morpheus/templates/dashboard.twig @@ -9,7 +9,7 @@ {{ siteName|raw }} - {% if isCustomLogo == false %}Piwik › {% endif %} {{ 'CoreHome_WebAnalyticsReports'|translate }} - + {% include "@CoreHome/_favicon.twig" %} diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php index 19ec7a241c2..37f3b73b0b0 100755 --- a/plugins/MultiSites/API.php +++ b/plugins/MultiSites/API.php @@ -1,6 +1,6 @@ - + {% include "@CoreHome/_favicon.twig" %} diff --git a/plugins/PrivacyManager/Config.php b/plugins/PrivacyManager/Config.php index 88ca3a00b33..fe7d95e7b62 100644 --- a/plugins/PrivacyManager/Config.php +++ b/plugins/PrivacyManager/Config.php @@ -1,6 +1,6 @@ 'enrichVisitWithProviderInfo', - 'WidgetsList.addWidgets' => 'addWidget', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', 'ViewDataTable.configure' => 'configureViewDataTable', @@ -86,11 +84,6 @@ public function uninstall() Db::exec($query); } - public function addWidget() - { - WidgetsList::add('General_Visitors', 'Provider_WidgetProviders', 'Provider', 'getProvider'); - } - public function postLoad() { Piwik::addAction('Template.footerUserCountry', array('Piwik\Plugins\Provider\Provider', 'footerUserCountry')); diff --git a/plugins/Provider/Widgets.php b/plugins/Provider/Widgets.php new file mode 100644 index 00000000000..911ab10411b --- /dev/null +++ b/plugins/Provider/Widgets.php @@ -0,0 +1,20 @@ +add('General_Visitors', 'Provider_WidgetProviders', 'Provider', 'getProvider'); + } + +} diff --git a/plugins/Provider/functions.php b/plugins/Provider/functions.php index 7a5e62d76e7..110b54a3596 100644 --- a/plugins/Provider/functions.php +++ b/plugins/Provider/functions.php @@ -1,6 +1,6 @@ 'addWidgets', 'Goals.getReportsWithGoalMetrics' => 'getReportsWithGoalMetrics', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', diff --git a/plugins/Referrers/Widgets.php b/plugins/Referrers/Widgets.php new file mode 100644 index 00000000000..9fa85772cb4 --- /dev/null +++ b/plugins/Referrers/Widgets.php @@ -0,0 +1,34 @@ +add($category, 'Referrers_WidgetKeywords', $controller, 'getKeywords'); + $widgetsList->add($category, 'Referrers_WidgetExternalWebsites', $controller, 'getWebsites'); + $widgetsList->add($category, 'Referrers_WidgetSocials', $controller, 'getSocials'); + $widgetsList->add($category, 'Referrers_SearchEngines', $controller, 'getSearchEngines'); + $widgetsList->add($category, 'Referrers_Campaigns', $controller, 'getCampaigns'); + $widgetsList->add($category, 'General_Overview', $controller, 'getReferrerType'); + $widgetsList->add($category, 'Referrers_WidgetGetAll', $controller, 'getAll'); + + if (SettingsPiwik::isSegmentationEnabled()) { + $widgetsList->add('SEO', 'Referrers_WidgetTopKeywordsForPages', $controller, 'getKeywordsForPage'); + } + } + +} diff --git a/plugins/Referrers/functions.php b/plugins/Referrers/functions.php index 559fd5ba9d2..40391ee6d65 100644 --- a/plugins/Referrers/functions.php +++ b/plugins/Referrers/functions.php @@ -1,6 +1,6 @@ 'http://www.gnu.org/licenses/gpl.html' ); } - - /** - * @see Piwik\Plugin::getListHooksRegistered - */ - public function getListHooksRegistered() - { - $hooks = array('WidgetsList.addWidgets' => 'addWidgets'); - return $hooks; - } - - function addWidgets() - { - WidgetsList::add('SEO', 'SEO_SeoRankings', 'SEO', 'getRank'); - } } diff --git a/plugins/SEO/Widgets.php b/plugins/SEO/Widgets.php new file mode 100644 index 00000000000..9e65a0185ca --- /dev/null +++ b/plugins/SEO/Widgets.php @@ -0,0 +1,20 @@ +add('SEO', 'SEO_SeoRankings', 'SEO', 'getRank'); + } + +} diff --git a/plugins/ScheduledReports/API.php b/plugins/ScheduledReports/API.php index 26d5159dd31..67ed97cc8f2 100644 --- a/plugins/ScheduledReports/API.php +++ b/plugins/ScheduledReports/API.php @@ -1,6 +1,6 @@ createAttachment($report, $processedReport, $prettyDate); - } - } - } - - return $additionalFiles; - } - - private function createAttachment($report, $processedReport, $prettyDate) - { - $additionalFile = array(); - - $segment = self::getSegment($report['idsegment']); - - $segmentName = $segment != null ? sprintf(' (%s)', $segment['name']) : ''; - - $processedReportMetadata = $processedReport['metadata']; - - $additionalFile['filename'] = - sprintf( - '%s - %s - %s %d - %s %d%s.png', - $processedReportMetadata['name'], - $prettyDate, - Piwik::translate('General_Website'), - $report['idsite'], - Piwik::translate('General_Report'), - $report['idreport'], - $segmentName - ); - - $additionalFile['cid'] = $processedReportMetadata['uniqueId']; - - $additionalFile['content'] = - ReportRenderer::getStaticGraph( - $processedReportMetadata, - Html::IMAGE_GRAPH_WIDTH, - Html::IMAGE_GRAPH_HEIGHT, - $processedReport['evolutionGraph'], - $segment - ); - - $additionalFile['mimeType'] = 'image/png'; - - $additionalFile['encoding'] = Zend_Mime::ENCODING_BASE64; - - return $additionalFile; + return $reportRenderer->getAttachments($report, $processedReports, $prettyDate); } private function checkUserHasViewPermission($login, $idSite) diff --git a/plugins/ScheduledReports/Controller.php b/plugins/ScheduledReports/Controller.php index db617419877..2bb64b8fafb 100644 --- a/plugins/ScheduledReports/Controller.php +++ b/plugins/ScheduledReports/Controller.php @@ -1,6 +1,6 @@ 'addWidgets', 'Goals.getReportsWithGoalMetrics' => 'getReportsWithGoalMetrics', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', @@ -164,23 +162,6 @@ private function updateVisitInfoWithLocation(&$visitorInfo, $location) } } - public function addWidgets() - { - $widgetContinentLabel = Piwik::translate('UserCountry_WidgetLocation') - . ' (' . Piwik::translate('UserCountry_Continent') . ')'; - $widgetCountryLabel = Piwik::translate('UserCountry_WidgetLocation') - . ' (' . Piwik::translate('UserCountry_Country') . ')'; - $widgetRegionLabel = Piwik::translate('UserCountry_WidgetLocation') - . ' (' . Piwik::translate('UserCountry_Region') . ')'; - $widgetCityLabel = Piwik::translate('UserCountry_WidgetLocation') - . ' (' . Piwik::translate('UserCountry_City') . ')'; - - WidgetsList::add('General_Visitors', $widgetContinentLabel, 'UserCountry', 'getContinent'); - WidgetsList::add('General_Visitors', $widgetCountryLabel, 'UserCountry', 'getCountry'); - WidgetsList::add('General_Visitors', $widgetRegionLabel, 'UserCountry', 'getRegion'); - WidgetsList::add('General_Visitors', $widgetCityLabel, 'UserCountry', 'getCity'); - } - public function getSegmentsMetadata(&$segments) { $segments[] = array( diff --git a/plugins/UserCountry/Widgets.php b/plugins/UserCountry/Widgets.php new file mode 100644 index 00000000000..6044e04e8c0 --- /dev/null +++ b/plugins/UserCountry/Widgets.php @@ -0,0 +1,36 @@ + 'addWidgets', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', 'ViewDataTable.configure' => 'configureViewDataTable', @@ -378,6 +376,11 @@ private function getBasicUserSettingsDisplayProperties(ViewDataTable $view) } } + public function getRawReportMetadata() + { + return $this->reportMetadata; + } + /** * Registers reports metadata * @@ -386,7 +389,7 @@ private function getBasicUserSettingsDisplayProperties(ViewDataTable $view) public function getReportMetadata(&$reports) { $i = 0; - foreach ($this->reportMetadata as $report) { + foreach ($this->getRawReportMetadata() as $report) { list($category, $name, $apiModule, $apiAction, $columnName) = $report; if ($category == false) continue; @@ -443,17 +446,4 @@ public function getSegmentsMetadata(&$segments) } } - /** - * Adds the various User Settings widgets - */ - function addWidgets() - { - // in this case, Widgets have same names as API reports - foreach ($this->reportMetadata as $report) { - list($category, $name, $controllerName, $controllerAction) = $report; - if ($category == false) continue; - WidgetsList::add($category, $name, $controllerName, $controllerAction); - } - } - } diff --git a/plugins/UserSettings/Widgets.php b/plugins/UserSettings/Widgets.php new file mode 100644 index 00000000000..36099b5149d --- /dev/null +++ b/plugins/UserSettings/Widgets.php @@ -0,0 +1,30 @@ +getRawReportMetadata() as $report) { + list($category, $name, $controllerName, $controllerAction) = $report; + + if ($category == false) { + continue; + } + + $widgetsList->add($category, $name, $controllerName, $controllerAction); + } + } + +} diff --git a/plugins/UserSettings/functions.php b/plugins/UserSettings/functions.php index 42b427dd7a1..40e48c5840b 100644 --- a/plugins/UserSettings/functions.php +++ b/plugins/UserSettings/functions.php @@ -1,6 +1,6 @@ 'addWidgets', 'API.getReportMetadata' => 'getReportMetadata', ); return $hooks; @@ -52,11 +50,4 @@ public function getReportMetadata(&$reports) 'order' => 40 ); } - - function addWidgets() - { - WidgetsList::add('General_Visitors', 'VisitFrequency_WidgetOverview', 'VisitFrequency', 'getSparklines'); - WidgetsList::add('General_Visitors', 'VisitFrequency_WidgetGraphReturning', 'VisitFrequency', 'getEvolutionGraph', - array('columns' => array('nb_visits_returning'))); - } } diff --git a/plugins/VisitFrequency/Widgets.php b/plugins/VisitFrequency/Widgets.php new file mode 100644 index 00000000000..cea4a4348d0 --- /dev/null +++ b/plugins/VisitFrequency/Widgets.php @@ -0,0 +1,25 @@ +add($category, 'VisitFrequency_WidgetOverview', $controller, 'getSparklines'); + $widgetsList->add($category, 'VisitFrequency_WidgetGraphReturning', $controller, 'getEvolutionGraph', + array('columns' => array('nb_visits_returning'))); + } + +} diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php index c2bf4241be9..f27e5f812a3 100644 --- a/plugins/VisitTime/API.php +++ b/plugins/VisitTime/API.php @@ -1,6 +1,6 @@ 'addWidgets', 'Goals.getReportsWithGoalMetrics' => 'getReportsWithGoalMetrics', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata', @@ -76,13 +74,6 @@ public function getReportMetadata(&$reports) ); } - function addWidgets() - { - WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitTime_WidgetLocalTime', 'VisitTime', 'getVisitInformationPerLocalTime'); - WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitTime_WidgetServerTime', 'VisitTime', 'getVisitInformationPerServerTime'); - WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitTime_VisitsByDayOfWeek', 'VisitTime', 'getByDayOfWeek'); - } - public function getReportsWithGoalMetrics(&$dimensions) { $dimensions[] = array('category' => Piwik::translate('VisitTime_ColumnServerTime'), diff --git a/plugins/VisitTime/Widgets.php b/plugins/VisitTime/Widgets.php new file mode 100644 index 00000000000..32541ea4f43 --- /dev/null +++ b/plugins/VisitTime/Widgets.php @@ -0,0 +1,25 @@ +add($category, 'VisitTime_WidgetLocalTime', $controller, 'getVisitInformationPerLocalTime'); + $widgetsList->add($category, 'VisitTime_WidgetServerTime', $controller, 'getVisitInformationPerServerTime'); + $widgetsList->add($category, 'VisitTime_VisitsByDayOfWeek', $controller, 'getByDayOfWeek'); + } + +} diff --git a/plugins/VisitTime/functions.php b/plugins/VisitTime/functions.php index 6e817bf7d93..a52b8ffba8b 100644 --- a/plugins/VisitTime/functions.php +++ b/plugins/VisitTime/functions.php @@ -1,6 +1,6 @@ 'addWidgets', 'API.getReportMetadata' => 'getReportMetadata', 'ViewDataTable.configure' => 'configureViewDataTable', 'ViewDataTable.getDefaultType' => 'getDefaultTypeViewDataTable' @@ -97,14 +95,6 @@ public function getReportMetadata(&$reports) ); } - public function addWidgets() - { - WidgetsList::add('General_Visitors', 'VisitorInterest_WidgetLengths', 'VisitorInterest', 'getNumberOfVisitsPerVisitDuration'); - WidgetsList::add('General_Visitors', 'VisitorInterest_WidgetPages', 'VisitorInterest', 'getNumberOfVisitsPerPage'); - WidgetsList::add('General_Visitors', 'VisitorInterest_visitsByVisitCount', 'VisitorInterest', 'getNumberOfVisitsByVisitCount'); - WidgetsList::add('General_Visitors', 'VisitorInterest_WidgetVisitsByDaysSinceLast', 'VisitorInterest', 'getNumberOfVisitsByDaysSinceLast'); - } - function postLoad() { Piwik::addAction('Template.headerVisitsFrequency', array('Piwik\Plugins\VisitorInterest\VisitorInterest', 'headerVisitsFrequency')); diff --git a/plugins/VisitorInterest/Widgets.php b/plugins/VisitorInterest/Widgets.php new file mode 100644 index 00000000000..8aa6f126274 --- /dev/null +++ b/plugins/VisitorInterest/Widgets.php @@ -0,0 +1,26 @@ +add($category, 'VisitorInterest_WidgetLengths', $controller, 'getNumberOfVisitsPerVisitDuration'); + $widgetsList->add($category, 'VisitorInterest_WidgetPages', $controller, 'getNumberOfVisitsPerPage'); + $widgetsList->add($category, 'VisitorInterest_visitsByVisitCount', $controller, 'getNumberOfVisitsByVisitCount'); + $widgetsList->add($category, 'VisitorInterest_WidgetVisitsByDaysSinceLast', $controller, 'getNumberOfVisitsByDaysSinceLast'); + } + +} diff --git a/plugins/VisitsSummary/API.php b/plugins/VisitsSummary/API.php index 6ea74647ee3..e89113eed2c 100644 --- a/plugins/VisitsSummary/API.php +++ b/plugins/VisitsSummary/API.php @@ -1,6 +1,6 @@ 'getReportMetadata', - 'WidgetsList.addWidgets' => 'addWidgets', 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', ); } @@ -61,13 +59,6 @@ public function getStylesheetFiles(&$stylesheets) $stylesheets[] = "plugins/VisitsSummary/stylesheets/datatable.less"; } - function addWidgets() - { - WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetLastVisits', 'VisitsSummary', 'getEvolutionGraph', array('columns' => array('nb_visits'))); - WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetVisits', 'VisitsSummary', 'getSparklines'); - WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetOverviewGraph', 'VisitsSummary', 'index'); - } - } diff --git a/plugins/VisitsSummary/Widgets.php b/plugins/VisitsSummary/Widgets.php new file mode 100644 index 00000000000..b51d8551063 --- /dev/null +++ b/plugins/VisitsSummary/Widgets.php @@ -0,0 +1,25 @@ +add($category, 'VisitsSummary_WidgetLastVisits', $controller, 'getEvolutionGraph', array('columns' => array('nb_visits'))); + $widgetsList->add($category, 'VisitsSummary_WidgetVisits', $controller, 'getSparklines'); + $widgetsList->add($category, 'VisitsSummary_WidgetOverviewGraph', $controller, 'index'); + } + +} diff --git a/plugins/Widgetize/Controller.php b/plugins/Widgetize/Controller.php index 0061ee95f55..afdd38d42da 100644 --- a/plugins/Widgetize/Controller.php +++ b/plugins/Widgetize/Controller.php @@ -1,6 +1,6 @@ Plugins['Plugins']; - $plugins[] = 'DevicesDetection'; $pluginsTracker = Config::getInstance()->Plugins_Tracker['Plugins_Tracker']; $oldTrackerConfig = Config::getInstance()->Tracker; diff --git a/tests/PHPUnit/BenchmarkTestCase.php b/tests/PHPUnit/BenchmarkTestCase.php index d3c954ffdc1..6e57944af4f 100755 --- a/tests/PHPUnit/BenchmarkTestCase.php +++ b/tests/PHPUnit/BenchmarkTestCase.php @@ -1,6 +1,6 @@ cliMulti->request($urls); $message = "Response was: " . substr( implode("\n\n", $response), 0, 4000); - $this->assertTrue(false !== strpos($response[0], ''), $message); + $this->assertTrue(false !== strpos($response[0], ''), $message); $this->assertTrue(false !== strpos($response[0], 'Widgetize the full dashboard'). $message); } diff --git a/tests/PHPUnit/Integration/Core/CronArchive/FixedSiteIdsTest.php b/tests/PHPUnit/Integration/Core/CronArchive/FixedSiteIdsTest.php index de4c23d63b4..847af0e3c83 100644 --- a/tests/PHPUnit/Integration/Core/CronArchive/FixedSiteIdsTest.php +++ b/tests/PHPUnit/Integration/Core/CronArchive/FixedSiteIdsTest.php @@ -1,6 +1,6 @@